Checkbox problem

I have a simple dialog box with a check box. When the checkbox is clicked I intercept the click in the message procedure and attempt to get the current state, however the call only ever returns 0 i.e. unchecked.

Here is the call I am using, any ideas why this might be happening

int PRINTER_CONNECTED = (int)SendMessage(hwndPrinterConnected, BM_GETCHECK, 0, 0);

Thanks in advance,

Mark Coleman


Answer this question

Checkbox problem

  • Sathya E

    What styles has the checkbox

    If it is not of style BS_AUTOCHECKBOX you just receive a click. But the state doesn't change by itself. You have to set the check or uncheck it.



  • Len Aye

    Thats the problem, the AUTO flag is checked.

    I just don't understand what is happening.

    Mark Coleman

  • MiguelSilva

    Just check the whole stuff in the SPY++. Watch the message that are sent to the button.

  • Checkbox problem