Hi
I am trying to change the value of a checkbox using the user32 library. I cannot simply use sendkeys to toggle the value of the checkbox because I need to know what the current state is. I tried using sendmessageA from the win32 library, but this only changed the state visually on the screen but does not trigger an event in the program that I am trying to access.
Does anyone know a way of reading the state of a checkbox using user32. I have a handle to the object of type TCheckBox, but I don't know which function to call.
I suspect it is something like
IsDlgButtonChecked(HWND hDlg, int nIDButton);
but I don't know how to get the nIDButton
Thanks
I am trying to change the value of a checkbox using the user32 library. I cannot simply use sendkeys to toggle the value of the checkbox because I need to know what the current state is. I tried using sendmessageA from the win32 library, but this only changed the state visually on the screen but does not trigger an event in the program that I am trying to access.
Does anyone know a way of reading the state of a checkbox using user32. I have a handle to the object of type TCheckBox, but I don't know which function to call.
I suspect it is something like
IsDlgButtonChecked(HWND hDlg, int nIDButton);
but I don't know how to get the nIDButton
Thanks