// CptSheet.cpp : implementation file // #include "stdafx.h" #include "KBEditors.h" #include "CptSheet.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CCptSheet IMPLEMENT_DYNAMIC(CCptSheet, CPropertySheet) CCptSheet::CCptSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(nIDCaption, pParentWnd, iSelectPage) { AddPage(&m_CCptPage); AddPage(&m_CPropPage); AddPage(&m_CFacetPage); AddPage(&m_RefineKBPage); AddPage(&m_ImagePage); } CCptSheet::CCptSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(pszCaption, pParentWnd, iSelectPage) { // m_psh.dwFlags |= PSH_NOAPPLYNOW; // m_psh.dwFlags |= PSH_MODELESS ; AddPage(&m_CCptPage); AddPage(&m_CPropPage); AddPage(&m_CFacetPage); AddPage(&m_RefineKBPage); AddPage(&m_ImagePage); } CCptSheet::~CCptSheet() { } BEGIN_MESSAGE_MAP(CCptSheet, CPropertySheet) //{{AFX_MSG_MAP(CCptSheet) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CCptSheet message handlers void CCptSheet::SeeDoc(CKBEditorsDoc*Doc) { m_Doc = Doc; } BOOL CCptSheet::OnInitDialog() { BOOL bResult = CPropertySheet::OnInitDialog(); CenterWindow(GetDesktopWindow()); // WS_SYSMENU /* CWnd* pApplyButton = GetDlgItem (ID_APPLY_NOW); ASSERT (pApplyButton); pApplyButton->ShowWindow (SW_HIDE); CWnd* pCancelButton = GetDlgItem (IDCANCEL ); ASSERT (pCancelButton); pCancelButton->ShowWindow (SW_HIDE); CWnd* pOkButton = GetDlgItem (IDOK); ASSERT (pOkButton); pOkButton->SetWindowText("Ok"); */ // pOkButton->SetWindowPos(&wndBottom ,50,50,50,50,SWP_SHOWWINDOW ); m_CCptPage.SeeDoc(m_Doc); /* Draw the Tree*/ m_CCptPage.DrawCptTree(); /* Let Prop Page see document and init the dialog */ m_CPropPage.SeeDoc(m_Doc); m_CFacetPage.SeeDoc(m_Doc); m_RefineKBPage.SeeDoc(m_Doc); m_ImagePage.SeeDoc(m_Doc); return bResult; } BOOL CCptSheet::CptDlgExist = TRUE; BOOL CCptSheet::DestroyWindow() { CptDlgExist = TRUE; return CPropertySheet::DestroyWindow(); }