wingrvw.h

来自「API经典入门」· C头文件 代码 · 共 78 行

H
78
字号
// wingrvw.h : interface of the CWingrepView class
//
/////////////////////////////////////////////////////////////////////////////

class CWingrepCntrItem;

class CWingrepView : public CView
{
protected: // create from serialization only
	CWingrepView();
	DECLARE_DYNCREATE(CWingrepView)

// Attributes
public:
	CWingrepDoc* GetDocument();
	// m_pSelection holds the selection to the current CWingrepCntrItem.
	// For many applications, such a member variable isn't adequate to
	//  represent a selection, such as a multiple selection or a selection
	//  of objects that are not CWingrepCntrItem objects.  This selection
	//  mechanism is provided just to help you get started.

	// TODO: replace this selection mechanism with one appropriate to your app.
	CWingrepCntrItem* m_pSelection;
	COleDropTarget m_dropTarget;

// Operations
public:
	CWingrepCntrItem* GetItemContaining(CPoint point);
	void SetSelection (CWingrepCntrItem* pItem);
	void SetupTracker(CRectTracker* pTracker, 
			CWingrepCntrItem* pItem, CRect* pTrueRect);

// Drag Drop
	virtual DROPEFFECT OnDragEnter(COleDataObject* pDataObject,
						DWORD dwKeyState, CPoint point);
	virtual void OnDragLeave();
	virtual DROPEFFECT OnDragOver(COleDataObject* pDataObject,
						DWORD dwKeyState, CPoint point);
	virtual BOOL OnDrop(COleDataObject* pDataObject,
						DROPEFFECT dropEffect, CPoint point);
	
// Implementation
public:
	virtual ~CWingrepView();
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	virtual void OnInitialUpdate(); // called first time after construct

	// OLE Container support
	virtual BOOL IsSelected(const CObject* pDocItem) const;

// Generated message map functions
protected:
	//{{AFX_MSG(CWingrepView)
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnInsertObject();
	afx_msg void OnCancelEdit();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in wingrvw.cpp
inline CWingrepDoc* CWingrepView::GetDocument()
   { return (CWingrepDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?