开发者

Simulating a radio button check command

I've开发者_如何学C been trying to change the state of a radio button programatically:

SendMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_RADIO1, BST_CHECKED), (LPARAM)(hwnd_RADIO1));

Why won't this work?


How about using BM_SETCHECK? http://msdn.microsoft.com/en-us/library/bb775989(VS.85).aspx


Calling CheckRadioButton will select the provided nIDCheckButton as the active option. It also removes the checkmark from the other radio buttons making up the group.


Alternatively one can use the macro

Button_SetCheck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜