CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Quick Question

  1. #1
    Join Date
    Apr 1999
    Posts
    72

    Quick Question

    I'm trying to put two wizards together. The user can check a radio button with a varible of m_Typical, if they select the Custom button then click Next it will start another wizard, if not they will start to install the software.
    I tried this but it can't find the varible:

    if (m_Typical);
    {
    CInstall.DoModal();
    }
    else
    CCustom.DoModal();
    }
    }

    I'm sure it wrong, but can someone check it and help me with it.

    Thanks,
    Nathan Strandberg


  2. #2
    Join Date
    Apr 1999
    Posts
    11

    Re: Quick Question

    You need to call UpdateData() before you access the variable (m_Typical). that function will do DDX and set the varible value depending on user's selection. Hope this will help. Good luck.

    Allen


  3. #3
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: Quick Question

    Hi.
    When I use radio button which must be grouped, I use BN_CLICKED message handler
    by class wizard.
    When I clicked one radio button by this message handler,
    I put the code m_btnOne.SetCheck(CHECKED or UNCHECKED) - I forget.
    I put all radio buttons each time.
    This is absolute manual work.
    In this case, I didn't put UpdateData().

    Hope for help.
    -Masaaki Onishi-



  4. #4
    Join Date
    Apr 2001
    Posts
    13

    Re: Quick Question

    Hi
    u can try like this also...

    int iCheck;
    iCheck =
    GetCheckedRadioButton(IDC_RADIO1,IDC_RADIO2);
    if(iCheck == IDC_RADIO1)
    CInstall.DoModal();
    else
    CCustom.DoModal();


    Hope this works fine.

    & also try removing that semicolon after

    condition in the if statement

    Good Luck

    Bye

    Mahesh Kumar C D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured