// RuleSheet.cpp : implementation file // #include "stdafx.h" #include "KBEditors.h" #include "RuleSheet.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CRuleSheet IMPLEMENT_DYNAMIC(CRuleSheet, CPropertySheet) CRuleSheet::CRuleSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(nIDCaption, pParentWnd, iSelectPage) { AddPage(&m_RulePage); AddPage(&m_DebugPage); } CRuleSheet::CRuleSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(pszCaption, pParentWnd, iSelectPage) { AddPage(&m_RulePage); AddPage(&m_DebugPage); } CRuleSheet::~CRuleSheet() { } BEGIN_MESSAGE_MAP(CRuleSheet, CPropertySheet) //{{AFX_MSG_MAP(CRuleSheet) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CRuleSheet message handlers BOOL CRuleSheet::RuleDlgExist = TRUE; BOOL CRuleSheet::DestroyWindow() { RuleDlgExist = TRUE; return CPropertySheet::DestroyWindow(); } void CRuleSheet::SeeDoc(CKBEditorsDoc*Doc) { m_Doc = Doc; } BOOL CRuleSheet::OnInitDialog() { BOOL bResult = CPropertySheet::OnInitDialog(); m_RulePage.SeeDoc(m_Doc); m_RulePage.DrawTree(); m_DebugPage.SeeDoc(m_Doc); CenterWindow(GetDesktopWindow()); return bResult; }