Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Powerbasic > Re: Read/write ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 178 of 276
Post > Topic >>

Re: Read/write status of Check Box via DLL in a 'host' EXE.

by "Michael Mattias" <michael.mattias@[EMAIL PROTECTED] > Feb 19, 2006 at 01:25 PM

<ibdoerre@[EMAIL PROTECTED]
> wrote in message
news:1140350947.572629.140810@[EMAIL PROTECTED]
> I wrote a DLL communicating with another program. The DLL is invoked by
> the EXE via an alert process. So they use the same memory.
> The DLL uses the predefined API functions inside the EXE.

> I want to avoid this nasty procedure and ask You here if anyone
> could tell me if I could directly change the check box status via
> memory access.

No, you may not; at least not in any sup****ted or reliable manner. Windows
reserves the right to move things around as it sees fit. I don't think it
actually DOES do this IN THE PARTICULAR CASE OF A CONTROL'S CURRENT STATE,
but all access to objects within Windows is sup****ted only using the
handles
provided for that purpose.

> Well, I managed already to do so but always have to invoke the
> EXE's tabbed dialog first to get access to the check box ID to
> manipulate it's status.

That should NEVER be necessary. Once you have a handle to the checkbox
control (or its parent window/dialog), you can always interrogate or
manipulate the check status. Sounds like you are passing the wrong
window/control handle to your function.

> For one essential task however there is no API function included.
> I want to read/write the status of a single Check Box inside the dialog
> of The EXE.

SendMessage  hCtrl, BM_GETCHECK/ BM_SETCHECK, wparam, lparam


--
Michael Mattias
Tal Systems, Inc.
Racine WI
mmattias@[EMAIL PROTECTED]

 




 5 Posts in Topic:
Read/write status of Check Box via DLL in a 'host' EXE.
ibdoerre@[EMAIL PROTECTED  2006-02-19 04:09:07 
Re: Read/write status of Check Box via DLL in a 'host' EXE.
"Michael Mattias&quo  2006-02-19 13:25:35 
Re: Read/write status of Check Box via DLL in a 'host' EXE.
ibdoerre@[EMAIL PROTECTED  2006-02-19 12:09:05 
Re: Read/write status of Check Box via DLL in a 'host' EXE.
"Michael Mattias&quo  2006-02-19 22:13:34 
Re: Read/write status of Check Box via DLL in a 'host' EXE.
ibdoerre@[EMAIL PROTECTED  2006-02-20 01:04:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:35:33 CDT 2008.