예제 #1
0
COptionsDlg::COptionsDlg(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CMFCPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
	SetLook(CMFCPropertySheet::PropSheetLook_Tree, 150 /* Tree control width */);
	SetIconsList(IDB_OPTIONSIMAGES, 16 /* Image width */);

	// <snippet23>
	// The second parameter is the zero based index of an icon that is displayed when 
	// the control property page is not selected.
	// The third parameter is the zero based index of an icon that is displayed when
	// the control property page is selected.
	CMFCPropertySheetCategoryInfo* pCat1 = AddTreeCategory(_T("Environment"), 0, 1);
	// </snippet23>

	AddPageToTree(pCat1, &m_Page11, -1, 2);
	AddPageToTree(pCat1, &m_Page12, -1, 2);

	CMFCPropertySheetCategoryInfo* pCat2 = AddTreeCategory(_T("Source Control"), 0, 1);

	AddPageToTree(pCat2, &m_Page21, -1, 2);
	AddPageToTree(pCat2, &m_Page22, -1, 2);

	CMFCPropertySheetCategoryInfo* pCat3 = AddTreeCategory(_T("Text Editor"), 0, 1);

	AddPageToTree(pCat3, &m_Page31, -1, 2);
	AddPageToTree(pCat3, &m_Page32, -1, 2);
}
예제 #2
0
COptionsDlg::COptionsDlg(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CBCGPPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
	SetLook (CBCGPPropertySheet::PropSheetLook_Tree, 150 /* Tree control width */);
	SetIconsList (IDB_OPTIONSIMAGES, 16 /* Image width */);

	CBCGPPropSheetCategory* pCat1 = AddTreeCategory (_T("Environment"), 0, 1);

	AddPageToTree (pCat1, &m_Page11, -1, 2);
	AddPageToTree (pCat1, &m_Page12, -1, 2);

	CBCGPPropSheetCategory* pCat2 = AddTreeCategory (_T("Source Control"), 0, 1);

	AddPageToTree (pCat2, &m_Page21, -1, 2);
	AddPageToTree (pCat2, &m_Page22, -1, 2);

	CBCGPPropSheetCategory* pCat3 = AddTreeCategory (_T("Text Editor"), 0, 1);

	AddPageToTree (pCat3, &m_Page31, -1, 2);
	AddPageToTree (pCat3, &m_Page32, -1, 2);
}