//WM_CREATE消息里创建: ::CreateWindowEx(0, "button", "radio button", WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,50, 350, 110, 30, hwnd, (HMENU)ID_RADIO, GetModuleHandle(NULL), NULL); //选中时响应 case ID_RADIO: { // 是否选中单选按钮 BOOL bChecked = ::IsDlgButtonChecked(hwnd, ID_RADIO); // 设置按钮ID为ID_OK的有效状态 这里是无效 即灰化 ::EnableWindow(::GetDlgItem(hwnd, ID_OK), bChecked); // 设置本控件状态 ::CheckDlgButton(hwnd, ID_RADIO, !bChecked); }