这样干吧:
1,使用资源编辑器创建一系列差不多大的对话框模板;
2,为每个模板生成一个类,注意:一定要选中CProperPage作为基类;
3,使用ClassWizard生成一个CPropertySheet中派生出来的类;
4,在Sheet类头文件为每个Page类生成一个对象;
5,在Sheet类构造函数里用AddPage()把每个Page类的对象加进来。
然后将BOOL CMyApp::InitInstance()改为:
{
// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable, you should remove from the following
//  the specific initialization routines you do not need.#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endifCMyProperSheet aProperSheet(_T("你的名字"));
m_pMainWnd = &aProperSheet;
aProperSheet.DoModal();
return FALSE;
}