GetCheckedRadioButton函数!!

来源:百度知道 编辑:UC知道 时间:2024/07/05 01:00:17
GetCheckedRadioButton函数在win32应用程序中如何用,要包含哪些头文件?

一下是MFC的实现,看得出是循环迭代,找出被check的button,楼主有时可以查看MFC的实现来学习。

int CWnd::GetCheckedRadioButton(int nIDFirstButton, int nIDLastButton) const
{
for (int nID = nIDFirstButton; nID <= nIDLastButton; nID++)
{
if (IsDlgButtonChecked(nID))
return nID; // id that matched
}
return 0; // invalid ID
}

win32的基本控件通常只要包含windows.h即可