Juergen Thuemmler
11/21/2007 6:00:00 AM
> I need to read the state of a radio button in another process. Not much
> is known
> about the other process, other than the fact that it was created with .NET
> controls. I have read on various forums that SendMessage(conrolhandle,
> BM_GETCHECK, 0,0) does not work on .NET controls.
As a workaround, you can check the controls style for WS_MAXIMIZEBOX. If it
is set, the radio button is checked. I played around with Spy++ and found
this working for option button, but not for checkboxes. A better method is
to use the Active Accessibility for checking the role and state of the
control. The classic "window view" gives you only a buttonlike class for
option buttons and checkboxes, but with accessibility (see
AccessibleObjectFromWindow() function) you get the correct information about
the control and its state.
Juergen.