Question : check box to edit box

Hi expert

I have a MFC check box on other dialog form. I have two check box which is user can choose either check box # 1 or check box # 2.

How?
1. If I want showing the user selection (let say check box #2) in edit box. This edit box located on other dialog form.

Answer : check box to edit box

Do the following for check box # 1 or check box # 2.
void CMyDlg::Onchk1()
{
      CButton *pButton=(CButton*)GetDlgItem(IDC_CHK1);
      int nState=pButton->GetCheck();
      if(nState==1)
      {
            UpdateData(TRUE);
                CEditDlg *dlg;
                dlg->SetDlgItemText(IDC_EDT,"Checkbox1 Selected");
      }
}
Random Solutions  
 
programming4us programming4us