Hi,
In order to do this you first create your dialogs in the Resource Editor (remembering to remove the OK and Cancel buttons).
Set the following properties for the Dialog:
Styles Tab
Style = Child
Border = Thin
Title Bar = Yes
All other options = No
More Styles Tab
Disabled = Yes
All other options = No
Then call class wizard (Ctrl+W) and create a new class for the each of the dialogs. When creating the class set the base class to CPropertyPage and NOT CDialog.
Once you have done this Use the Insert menu option and insert a new Class and Set its base Class to CPorpertySheet.
Open the Header (.h) File for this new Class and #include the Headers for the two dialogs you just created.
Add two Private member variables one for each page.
e.g.
private:
CMyPage1 m_Page1 ;
CMyPage2 m_Page2 ;
Open the Source (.cpp) file and in the constructor add:
AddPage (&m_Page1) ;
AddPage (&m_Page2) ;
Done.
In the Source where you handle your menu options create a handler (or edit existing) to display the Porperty Pages, for example:
CMyPropertySheet* pProps = new CMyPropertySheet("My Caption", this) ;
if (pProps)
{
pProps->SetWizardMode() ;
pProps->DoModal() ;
}
else
{ AfxMessageBox("Unable to create Property Pages", MB_ICONSTOP | MB_OK) ; }
delete pProps ;
Of course remember to #include your PropertySheets header file in the sources header file.
HTH
William
Software Engineer
ICQ No. 56047340