Toolbar with press button and ini
brother.gabriel
Wed Sep 16 07:19:02 PDT 2009
Thanks for your help, Mr. Casey;
The problem is here:
SendMessage(Toolbar,TB_PRESSBUTTON, ID_Toolbar+9, MAKELONG(true, 0))
It presses the button correctly, but after that, when you click the same pressed button with the mouse, the button is stuck. You have to press it twice to get it un-stuck. That is a problem if you assign a function to the button because the function is called each time the button is clicked with the mouse (the SendMessage does not call the mouse-click function).
Is there a problem in this code, or is there a uh, er, a (choke, breathe heavy) BUG in BCX_TOOLBAR ?
--- In BCX at yahoogroups.com, Ian Casey <ian at ...> wrote:>
> BG,
> Maybe this will give you a clue? its for a checkbox but I think the
> principle should be the same.
>
> Ian
>
> FUNCTION g_toggle(hWnd AS HWND) as INTEGER ' for radio &
> check boxes
> Dim a
> a = SendMessage(hWnd, BM_GETCHECK ,0,0)
> IF a THEN
> FUNCTION = SendMessage(hWnd, BM_SETCHECK ,BST_CHECKED,0)
> ELSE
> FUNCTION = SendMessage(hWnd, BM_SETCHECK ,BST_UNCHECKED,0)
> END IF
> END FUNCTION
>
More information about the BCX
mailing list