#if !defined(AFX_CPTPAGE_H__F9BC3094_A5A2_11D3_9695_0040C7772DA0__INCLUDED_) #define AFX_CPTPAGE_H__F9BC3094_A5A2_11D3_9695_0040C7772DA0__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // CptPage.h : header file // ///////////////////////////////////////////////////////////////////////////// // CCptPage dialog class CTreeItem : public CObject { public: CTreeItem(HTREEITEM TreeItem); HTREEITEM TreeItem; }; typedef CTypedPtrMap CMapStrToTreeItem; class CCptPage : public CPropertyPage { DECLARE_DYNCREATE(CCptPage) public: HRESULT SaveDocument(MSXML::IXMLDOMDocument *pDoc, BSTR pBFName); void PrintChild(HTREEITEM hItem, MSXML::IXMLDOMNode* parent, MSXML::IXMLDOMDocument *pDoc); MSXML::IXMLDOMNode * CreateDOMNodeFromString(MSXML::IXMLDOMDocument* pDoc, int type, const char *s, const char * tagName); MSXML::IXMLDOMNode * CCptPage :: CreateDOMNodeFromItem(MSXML::IXMLDOMDocument* pDoc, int type, HTREEITEM hItem, const char * tagName); BSTR AsciiToBSTR(const char* pszFName); // CMap MapStrToTreeItem; CMapStrToTreeItem MapStrToTreeItemOnto; CMapStrToTreeItem MapStrToTreeItemKB; CKBEditorsDoc * m_Doc; void SeeDoc(CKBEditorsDoc*Doc); CString OldStr; // Temp to refer to the last str before editing CString str1; // Temp to refer string of the tree at edit get focus BOOL StatusAdd; /*true mean come from add event */ BOOL SetEditFocus; BOOL SetDescFocus; void AddChildInTree(HTREEITEM TreeItem,long ID); void DrawCptTree(); void DeleteTreeItems(HTREEITEM TreeItem); CString GetOutputRole(CString str,CString OutRole); CString GetInputRole(CString str,CString InRole); void AddCptToKB(CString ConceptName); // Construction public: HTREEITEM Search(HTREEITEM TreeItem, CString str); void AdjustType(CString str, CString& ssProp, CString & ssType); void CCptPage::AdjustPrompt(CString str, CString &ssProp, CString &ssPrompt); void CCptPage::AdjustLegal(CString str, CString &ssProp, CString &ssLegal); void CCptPage:: AddLegal(CString ssLegal, CProperty* Prop); void CCptPage::GetProp(CString str, CString &ssProp); CCptPage(); ~CCptPage(); // Dialog Data //{{AFX_DATA(CCptPage) enum { IDD = IDD_CPTDLG }; CTreeCtrl m_OntoTree; CTreeCtrl m_CptTree; CString m_NameA; CString m_Desc; //}}AFX_DATA // Overrides // ClassWizard generate virtual function overrides //{{AFX_VIRTUAL(CCptPage) public: virtual BOOL OnSetActive(); virtual BOOL OnKillActive(); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: CString AdjustProperty(CString str); CConcept * GetConcept(CString str); long GetSuperID(CString str); // Generated message map functions //{{AFX_MSG(CCptPage) afx_msg void OnRclickCpttree(NMHDR* pNMHDR, LRESULT* pResult); virtual BOOL OnInitDialog(); afx_msg void OnEndlabeleditCpttree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnBeginlabelEditCptTree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnSetfocusCptnamea(); afx_msg void OnAddconcept(); afx_msg void OnDselect(); afx_msg void OnDelconcept(); afx_msg void OnImport(); afx_msg void OnExport(); afx_msg void OnSetfocusCptdescription(); afx_msg void OnFind(); afx_msg void OnLoop(); afx_msg void OnExportXml(); afx_msg void OnADDFromOnto(); afx_msg void OnDELFromOnto(); afx_msg void OnSelchangedOntoTREE(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnSelchangedCpttree(NMHDR* pNMHDR, LRESULT* pResult); DECLARE_EVENTSINK_MAP() //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_CPTPAGE_H__F9BC3094_A5A2_11D3_9695_0040C7772DA0__INCLUDED_)