BM_GETSTATE returns an int.
You might want to try IsDlgButtonChecked function as well:
if (IsDlgButtonChecked(hwnd, IDC_XXXX)==BST_CHECKED)
{
...
}
Works with toggles, like checkboxes, toggle buttons.
rpeter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to see a message... so im trying to:
CHAR debug[50];
debug[50]=(SendMessage(ThatDamnedControl, BM_GETSTATE, (WPARAM)0 ,(LPARAM)0));
MessageBox (NULL, TEXT (debug), "The Message is...", MB_ICONERROR);
The window pop with a lot of junk ascii. Any ideas?
what are you trying to do?
Used in that format, it returns a 1 or 0 (on or off).
do this:
int bstate;
char debug[50];
bstate = SendMessage(.......);
sprintf(debug, "The Message is... %d", bstate);
MessageBox(...);
BM_GETSTATE returns an int.
You might want to try IsDlgButtonChecked function as well:
if (IsDlgButtonChecked(hwnd, IDC_XXXX)==BST_CHECKED)
{
...
}
Works with toggles, like checkboxes, toggle buttons.
rpeter