如题

解决方案 »

  1.   

    ::SetCheck 
    0 Set the button state to unchecked. 
    1 Set the button state to checked. 
    2 Set the button state to indeterminate. This value can be used only if the button has the BS_3STATE or BS_AUTO3STATE style. 
      

  2.   

    1、选中第一个Radio Button的group属性,并检查是否所有的Radio Button的ID号是连续的(若不是需更改)。
    2、为第一个Radio Button在class wizard中建立对应的变量,
    3、在对话框构造函数中设置该变量为0
      

  3.   

    或者把你要選中的狀態的Radio button對話框Tab_ID設置成其他的最前面(同時讓其他的相關Radio的ID跟著它的tab ID.).而且你要把最前面的屬性設置成Group
      

  4.   

    agree  blue2moon() ;
    在Member加入变量后,对话框类的构造函数会给他赋初值为-1;把它改为0就是选中第一个单选框,1为第二个....
      

  5.   

    在这个函数中加入
    为radio控件加入一个INIT型的变量 m_nRadio;
    BOOL CTestDlg::OnInitDialog()
    {
    CDialog::OnInitDialog();
             //m_nRadio=-1       //这是一个都不选中
               m_nRadio=0;       //选中第一个
               this->UpdateData(FALSE);
              
    }
      

  6.   

    在.h中设定一个变量m_Radio=0(若你默认是第一个时的状态,其余类推);
    假设你的Radio Button的ID分别是IDC_RADIO1,IDC_RADIO2...IDC_RADIO5
    在OnInitDialog()中加入
    CheckRadioButton(IDC_RADIO1,IDC_RADIO5,IDC_RADIO1);
    最后一个参数是你所指定的默认ID,也就是m_Radiod的默认对应项,接着你可以对每个Radio Button做出相应函数,在函数中对m_Radiod赋不同值。
    GoodLuck
      

  7.   

    faing,在不check out,100分哪够分了
      

  8.   

    最简单的方法,嘿嘿
    ::SendMessage(GetDlgItem(IDC_XXXXXX)->m_hWnd,BM_SETCHECK,1,0);