www.pudn.com > MarkupDemo.rar > MarkupDemoView.h


// MarkupDemoView.h : interface of the CMarkupDemoView class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_MARKUPDEMOVIEW_H__3539C01C_BDCC_4064_9ED8_3A761443AF72__INCLUDED_) 
#define AFX_MARKUPDEMOVIEW_H__3539C01C_BDCC_4064_9ED8_3A761443AF72__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "DividerCtrl.h" 
 
#include "Markup.h" 
 
 
class CMarkupDemoView : public CView 
{ 
protected: // create from serialization only 
	CMarkupDemoView(); 
	DECLARE_DYNCREATE(CMarkupDemoView) 
		 
	CEdit m_edit; 
	CFont m_font; 
	CTreeCtrl m_tree; 
	CImageList m_ilTree; 
	CDividerCtrl m_divider; 
	void CalcSize( int cx, int cy ); 
	 
	int m_nAddAttrib; 
	 
	void GetNthWisePos( HTREEITEM hItem, CUIntArray& aNths ); 
	void SetPos( HTREEITEM hItem, BOOL bChild = FALSE ); 
 
	CString SetEditTextFromDoc(); 
	HTREEITEM AddElemToTree(HTREEITEM hParentItem); 
	BOOL ElemHasSubItems(); 
 
// Attributes 
public: 
	CMarkupDemoDoc* GetDocument(); 
 
	CMarkup* m_pXML; 
 
	void GetEditText( CString& csDoc ); 
 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CMarkupDemoView) 
	public: 
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view 
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 
	virtual void OnInitialUpdate(); 
	protected: 
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); 
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); 
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); 
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); 
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	virtual ~CMarkupDemoView(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CMarkupDemoView) 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnMarkupFind(); 
	afx_msg void OnMarkupAdd(); 
	afx_msg void OnMarkupAddChild(); 
	afx_msg void OnMarkupAddAttrib(); 
	afx_msg void OnEditCopy(); 
	afx_msg void OnEditCut(); 
	afx_msg void OnEditPaste(); 
	afx_msg void OnEditUndo(); 
	afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI); 
	//}}AFX_MSG 
	afx_msg void OnChangeEdit(); 
	afx_msg LRESULT OnAppMessage( WPARAM, LPARAM ); 
	DECLARE_MESSAGE_MAP() 
}; 
 
#ifndef _DEBUG  // debug version in MarkupDemoView.cpp 
inline CMarkupDemoDoc* CMarkupDemoView::GetDocument() 
   { return (CMarkupDemoDoc*)m_pDocument; } 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_MARKUPDEMOVIEW_H__3539C01C_BDCC_4064_9ED8_3A761443AF72__INCLUDED_)