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 3 of 5 Topic 178 of 276
Post > Topic >>

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

by ibdoerre@[EMAIL PROTECTED] Feb 19, 2006 at 12:09 PM

Hi Michael,
The following is what I've done until now.
:
Function SimulateButtonClickWithParams(hWndButton As Long, lCheck As
Long) As Long
    'INPUT: hWndButton als Handle des Buttons, lCheck = 1 oder 0
    local lRet As Long
    local hWndParent As Long

    hWndParent = GetParent(hWndButton)
    If hWndParent <> 0& Then
        If SendMessageLong(hWndButton, BM_GETCHECK, 0&, 0&) = 1& Then
            If lCheck = 0& Then 'uncheck
                lRet = SendMessageLong(hWndButton, BM_CLICK, 0&,
lCheck) 'lCheck = 0
            End If
        ElseIf SendMessageLong(hWndButton, BM_GETCHECK, 0&, 0&) = 0&
Then
            If lCheck = 1& Then
                lRet = SendMessageLong(hWndButton, BM_CLICK, 0&,
lCheck) 'lCheck = 1
            End If
        End If
        SimulateButtonClickWithParams = lRet
    End If
End Function

The button handle is correct but the function works only when I first
programaticaly show the tab control where the button resides. I wonder
why.....

Bert
 




 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 Fri Jul 25 15:35:11 CDT 2008.