Sunday, October 16, 2005

Pop our dialog window in Visual C++

1. Resource view: dialog-insert dialog
2. create edit box - double click - new class - base class (dialog), add new function
3. add variables: public(left) categroy-value(right)
4. include the new class head file in the main file: #include "SettingDlg.h"
5. suppose the new class is CSettingDlg, after click OK, the values that input in the editbox will send to variable:

CSettingDlg dlg;
// dlg.m_nWidth = m_nLineWidth;
if(IDOK == dlg.DoModal() )
{
UpdateData(FALSE);
m_nLineWidth = dlg.m_nWidth;
}

//Radio button;
1. Static field
2. Drag radio button, ctrl-Drag to copy several
3. Change caption.
4. Make the first button "grou" (properties);

No comments:

Post a Comment