我啊,笨...,還是記下來好...
建立一個SDI應用程序,Project->Add to Project->Components and Contrals...->Visual C++ Components文件夾->Property Sheet
點Insert,如果屬性頁是下一步形式的,選Wizard,...,點Close
實際上是不是下一步形式的屬性頁,代碼表現在在基類的構造函數中,有一個SetWizardMode();,把它屏蔽了就是正常屬性頁。
要修改“上一步”“下一步”“完成”需要在各個屬性頁對應的類中繼承OnSetActive()和OnKillActive()函數,代碼例如:
BOOL CPro1::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
CProSheet* psheet = (CProSheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
}
BOOL CPro1::OnKillActive()
{
// TODO: Add your specialized code here and/or call the base class
CProSheet* psheet = (CProSheet*) GetParent();
psheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
return CPropertyPage::OnKillActive();
}