MFC
-
:)Hi everyone, Hi everyone im very new to visual c++ programming, although i worked on borland c++ before. i have a problem in controlling some controls according to a certain conditions. for example; I have two dialogs: The first one is to ask the user How many edit boxes he want to see? The second dialog should show him the number of edit boxes he entered in the first editbox; So if the user has entered (2) in the editbox in the first dialog, he must see two editboxes in the second dialog. It is very important for me to know this Please just remember that im very new to MFC programming, so write me a clear code as a beginner. thank you for reading my messege F.X
-
:)Hi everyone, Hi everyone im very new to visual c++ programming, although i worked on borland c++ before. i have a problem in controlling some controls according to a certain conditions. for example; I have two dialogs: The first one is to ask the user How many edit boxes he want to see? The second dialog should show him the number of edit boxes he entered in the first editbox; So if the user has entered (2) in the editbox in the first dialog, he must see two editboxes in the second dialog. It is very important for me to know this Please just remember that im very new to MFC programming, so write me a clear code as a beginner. thank you for reading my messege F.X
void CYourDialog::OnButtonEnterDlgNum(void) { char lpBuffer[256]; m_YourEditCtrl.GetWindowText(lpBuffer, 255); // you could also use this // GetDlgItem(IDC_YOUREDITCTRL)->GetWindowText(lpBuffer, 255); int iMax = atoi(lpBuffer); CEdit *ceEdit; for(int i = 0; i < m_yourint = iMax; i++) { ceEdit = new CEdit; ceEdit.Create(0/* your styles */, CRect(0, 0, 0, 0) /* your rect */, m_YourSecondDlg /* the CWnd object of your 2 dialog */, IDC_ID + i /* your ID (must be unique!)*/); } } hope this helps Я люблю русский язикь!