Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp Thread Process and Window Pin
phamdoan6-Jul-04 16:49
phamdoan6-Jul-04 16:49 
GeneralEnumThreadWindows Function Pin
Blake Miller7-Jul-04 5:02
Blake Miller7-Jul-04 5:02 
GeneralDumb RichEditView Question Pin
merkit6-Jul-04 16:28
merkit6-Jul-04 16:28 
GeneralRe: Dumb RichEditView Question Pin
David Crow7-Jul-04 3:33
David Crow7-Jul-04 3:33 
GeneralCheckRadioButton makes recursive calls Pin
elephantstar6-Jul-04 13:57
elephantstar6-Jul-04 13:57 
GeneralRe: CheckRadioButton makes recursive calls Pin
David Crow7-Jul-04 3:54
David Crow7-Jul-04 3:54 
GeneralRe: CheckRadioButton makes recursive calls Pin
elephantstar7-Jul-04 9:41
elephantstar7-Jul-04 9:41 
GeneralRe: CheckRadioButton makes recursive calls Pin
David Crow7-Jul-04 10:01
David Crow7-Jul-04 10:01 
elephantstar wrote:
-When the user selects cancel (CASE IDCANCEL) in the popup dialog box, it would call OnCheckBox1() to check the first radio button. The first button is the default selection.

Blake's suggestion is definitely the cleanest. Assign each of the radio buttons a CButton member variable (e.g., m_btnRadio1, m_btnRadio2, m_btnRadio3). Something like:

void CCheckBox::OnCheckBox1( void )
{
    m_btnRadio2.SetCheck(BST_UNCHECKED);
    m_btnRadio3.SetCheck(BST_UNCHECKED);
}
 
void CCheckBox::OnCheckBox2( void )
{
    CMyDialog dlg;
    int nReturn;
 
    nReturn = dlg.DoModal();
    if (IDABORT == nReturn || IDCANCEL == nReturn)
        m_btnRadio1.SetCheck(BST_CHECKED);
    else
        m_btnRadio1.SetCheck(BST_UNCHECKED);
    
    m_btnRadio3.SetCheck(BST_UNCHECKED);
}
 
void CCheckBox::OnCheckBox3( void )
{
    m_btnRadio1.SetCheck(BST_UNCHECKED);
    m_btnRadio2.SetCheck(BST_UNCHECKED);
}




"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen


GeneralRe: CheckRadioButton makes recursive calls Pin
elephantstar7-Jul-04 11:55
elephantstar7-Jul-04 11:55 
GeneralRe: CheckRadioButton makes recursive calls Pin
Blake Miller7-Jul-04 5:11
Blake Miller7-Jul-04 5:11 
GeneralRe: CheckRadioButton makes recursive calls Pin
elephantstar7-Jul-04 9:48
elephantstar7-Jul-04 9:48 
GeneralRe: CheckRadioButton makes recursive calls Pin
Blake Miller7-Jul-04 11:38
Blake Miller7-Jul-04 11:38 
GeneralRe: CheckRadioButton makes recursive calls Pin
elephantstar7-Jul-04 12:40
elephantstar7-Jul-04 12:40 
GeneralRe: CheckRadioButton makes recursive calls Pin
David Crow8-Jul-04 2:41
David Crow8-Jul-04 2:41 
GeneralRe: CheckRadioButton makes recursive calls Pin
elephantstar8-Jul-04 11:14
elephantstar8-Jul-04 11:14 
GeneralRe: CheckRadioButton makes recursive calls Pin
David Crow9-Jul-04 4:50
David Crow9-Jul-04 4:50 
GeneralCalling all people, I need your input. Pin
mayanxn036-Jul-04 13:17
mayanxn036-Jul-04 13:17 
GeneralRe: Calling all people, I need your input. Pin
David Crow7-Jul-04 3:57
David Crow7-Jul-04 3:57 
GeneralInsertMenuItem makes menu display with wrong width Pin
siggapet6-Jul-04 13:03
siggapet6-Jul-04 13:03 
GeneralTray icon tooltip Pin
ace//236-Jul-04 10:06
ace//236-Jul-04 10:06 
GeneralRe: Tray icon tooltip Pin
Ravi Bhavnani6-Jul-04 10:44
professionalRavi Bhavnani6-Jul-04 10:44 
GeneralRe: Tray icon tooltip Pin
ThatsAlok7-Jul-04 0:18
ThatsAlok7-Jul-04 0:18 
QuestionWhat's the best leak finder tool for VC 6? Pin
CherezZaboro6-Jul-04 9:46
CherezZaboro6-Jul-04 9:46 
AnswerRe: What's the best leak finder tool for VC 6? Pin
Johan Rosengren6-Jul-04 10:44
Johan Rosengren6-Jul-04 10:44 
GeneralRe: What's the best leak finder tool for VC 6? Pin
CherezZaboro6-Jul-04 11:40
CherezZaboro6-Jul-04 11:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.