PropSheetDemo

所属分类:Windows编程
开发工具:Visual C++
文件大小:729KB
下载次数:17
上传日期:2010-01-19 10:25:50
上 传 者568267065
说明:  PropertySheet自定义,包含向导框及Tab属性页

文件列表:
PropSheetDemo 1.00\PropSheetDemo.sln (1366, 2009-11-18)
PropSheetDemo 1.00\PropSheetDemo.suo (26112, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\BuildLog.htm (11814, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\mt.dep (69, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\PropTabCtrl.exe.embed.manifest (660, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\PropTabCtrl.exe.embed.manifest.res (724, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\PropTabCtrl.exe.intermediate.manifest (625, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\PropTabCtrl.obj (20414, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\PropTabCtrl.res (23408, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\PropTabCtrlDlg.obj (36949, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\stdafx.obj (336050, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\Debug\vc80.pdb (692224, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrl.aps (58576, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrl.cpp (2149, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrl.h (534, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrl.rc (5025, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrl.vcproj (5462, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrl.vcproj.GIGATYTE-4DBCC7.WANGFENG.user (1427, 2009-11-27)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrlDlg.cpp (3252, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\PropTabCtrlDlg.h (631, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\res\PropTabCtrl.ico (21630, 2005-08-12)
PropSheetDemo 1.00\PropTabCtrl\res\PropTabCtrl.rc2 (402, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\Resource.h (544, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\stdafx.cpp (211, 2009-11-18)
PropSheetDemo 1.00\PropTabCtrl\stdafx.h (2864, 2009-11-18)
PropSheetDemo 1.00\PropWizard\Debug\BuildLog.htm (7502, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\mt.dep (69, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\MyPropSheet.obj (35968, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PageDlg1.obj (25359, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PageDlg2.obj (22991, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PageDlg3.obj (27522, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PropWizard.exe.embed.manifest (660, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PropWizard.exe.embed.manifest.res (724, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PropWizard.exe.intermediate.manifest (625, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PropWizard.obj (20362, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PropWizard.res (24808, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\PropWizardDlg.obj (39174, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\stdafx.obj (336042, 2009-11-27)
PropSheetDemo 1.00\PropWizard\Debug\vc80.pdb (708608, 2009-11-27)
... ...

一、使用 CPropertySheet 类及 CPropertyPage 类编写 向导属性对话框 1. 增加对话框资源,可为任意类型,不过最好选择 PROPPAGE 类型 2. 为每一个对话框资源新增一个类CPage1, CPage2, CPage3,其基类为 CPropertyPage 而非 CDialog 3. 可对对话框进行编辑,如新增控件,添加控件响应函数等 4. 为每一个对话框添加 OnSetActive 消息响应,当该窗体被激活时会执行该消息 5. 生成 Tab Control 或 Wizard 对话框,代码如下: CPropertySheet sheet; CPage1 page1; CPage2 page2; Cpage3 page3; sheet.AddPage(&page1); sheet.AddPage(&page2); sheet.AddPage(&page3); sheet.SetWizardMode();// 添加此条表示生成 Wizard 对话框,否则为 Tab Control sheet.EnableStackedTabs(TRUE);// 当为 Tab Control 时,设为 TRUE 表示会阶梯状分布 sheet.DoModal(); // CPage1.cpp BOOL CPage1::OnSetActive() { // TODO: Add your specialized code here and/or call the base class CPropertySheet *pPropSheet = ((CPropertySheet *)GetParent()); pPropSheet->SetWizardButtons(PSWIZB_NEXT);// 显示下一个属性框 CWnd *pWnd = pPropSheet->GetDlgItem( IDCANCEL ); pWnd->ShowWindow( FALSE );// 取消 CANCEL 按钮 pWnd = pPropSheet->GetDlgItem( IDHELP ); pWnd->ShowWindow( FALSE );// 取消 HELP 按钮 return CPropertyPage::OnSetActive(); } 二、使用 CMyPropSheet 自定义类编写 向导属性对话框 * CPropertySheet 实现分如下步骤: * 1. 自定义对话框,设计用户界面,添加 "Back" "Next" "Cancel" 按钮,该 * 对话框作为其他属性页的载体;添加对应类 CMyPropSheet * * 2. 自定义对话框,设计用户界面,设定 Border=None Style=Child,该对话 * 框作为一个属性页;添加对应类 CPage1 * * 3. 依照上述方法,添加属性页 CPage2, CPage3, ... * * 4. 通过 CMyPropSheet 的 AddPage, ShowPage 等方法控制向导框

近期下载者

相关文件


收藏者