|
|
| how do i disable radio buttons? |
|
| Author |
Message |
boldeagle

|
Posted: Visual C++ General, how do i disable radio buttons? |
Top |
void CDlg_Log::NoSel(BOOL flag) { GetDlgItem(IDC_RADIO1)->EnableWindow(flag); GetDlgItem(IDC_RADIO2)->EnableWindow(flag); void CDlg_Log::OnRadio1() { // TODO: Add your control notification handler code here m_rad1 = 0; NoSel(FALSE); for (int i=0;i<1000000000;i++) { i++; continue; } NoSel(TRUE);
}
void CDlg_Log::OnRadio2() { // TODO: Add your control notification handler code here m_rad1 = 1; NoSel(FALSE); for (int i=0;i<1000000000;i++) { i++; continue; }NoSel(TRUE);
}
radio1 and radio2 are in one group,when i select radio1,i hope both buttons become disabled until the cycle in onradio1 finish.but during the preceture,i press radio2,when the cycle in onradio1 finished,i found radio2 is become selected,why
Visual C++16
|
| |
|
| |
 |
Bite Qiu - MSFT

|
Posted: Visual C++ General, how do i disable radio buttons? |
Top |
|
| |
 |
boldeagle

|
Posted: Visual C++ General, how do i disable radio buttons? |
Top |
maybe i didn't discribe the question fully,i mean after i click radio1,both radios become grayed,at this time i click radio2(notice:radio2 is gray now),when the cycle finish in onradio1,both radios become enabled,but u can find radio2 become seleccted now
|
| |
|
| |
 |
Bite Qiu - MSFT

|
Posted: Visual C++ General, how do i disable radio buttons? |
Top |
this elaboration makes sense to me, but as I said, this topic is OTP (Off Topic Post), you will get more attention and response when you post it in right place, good luck :)
|
| |
|
| |
 |
| |
|