CGXStyleSheet::CreatePages
virtual void CreatePages();
Remarks
Override this method if you want to use your own pages in the style sheet or if you only want to display specific pages. See example.
Example
This example illustrates how to override this method. Only specific pages will be displayed. See the declaration of CGXStyleSheet for the meaning of the pointers to the default pages.
class CMyStyleSheet : public CGXStyleSheet
{
// Construction
public:
CMyStyleSheet(UINT nIDCaption, CGXStylesMap& stylesMap, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
CMyStyleSheet(LPCTSTR pszCaption, CGXStylesMap& stylesMap, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
virtual void CreatePages();
};
CMyStyleSheet::CMyStyleSheet(UINT nIDCaption, CGXStylesMap& stylesMap, CWnd* pParentWnd, UINT iSelectPage)
:CGXStyleSheet(nIDCaption, stylesMap, pParentWnd, iSelectPage)
{
}
CMyStyleSheet::CMyStyleSheet(LPCTSTR pszCaption, CGXStylesMap& stylesMap, CWnd* pParentWnd, UINT iSelectPage)
:CGXStyleSheet(pszCaption, stylesMap, pParentWnd, iSelectPage)
{
}
void CMyStyleSheet::CreatePages()
{
m_pFontPage = CreateFontPage();
m_pColorPage = CreateColorPage();
m_pBorderPage = CreateBorderPage();
m_pAlignmentPage = CreateAlignmentPage();
#if _MFC_VER < 0x0300 && defined(USE_TABDLG)
AddPage(m_pFontPage, "Font");
AddPage(m_pColorPage, "Color");
AddPage(m_pBorderPage, "Border");
AddPage(m_pAlignmentPage, "Align");
#else
AddPage(m_pFontPage);
AddPage(m_pColorPage);
AddPage(m_pBorderPage);
AddPage(m_pAlignmentPage);
#endif
}