drawview.h

来自「电子白板程序」· C头文件 代码 · 共 91 行

H
91
字号
#if !defined(AFX_DRAWVIEW_H__3C99A9BB_2943_4FEF_8E68_BB4BE11F7864__INCLUDED_)
#define AFX_DRAWVIEW_H__3C99A9BB_2943_4FEF_8E68_BB4BE11F7864__INCLUDED_
#pragma warning(disable:4786)
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DrawView.h : header file
//
#include "DrawBase.h"
#include <map>
using namespace std;

typedef map< CString , CDrawBase * >DRAW_MAP;

class CDrawFrame;
/////////////////////////////////////////////////////////////////////////////
// CDrawView view

class CDrawView : public CScrollView
{
public:

	         CDrawView( CDrawFrame * pFrame );

    virtual ~CDrawView();
	//取得主窗口
	CDrawFrame & GetFrame( void );
    //用户名
	CString  username;
	//白板通知外部程序
	bool  ( * OnWB )( void * pContext , HWND hWnd , const char * buffer , int size );
    //设备上下文
	void  * pContext;
    //获得图元列表
	DRAW_MAP & GetDrawMap(){ return this->drawmap; }
    //获得当前页面
	int  GetPage( void ){ return this->page; }

	bool Assemble( CDrawBase * draw );

protected:

	static DWORD WINAPI OnSend( void * pContext );

	//{{AFX_VIRTUAL(CDrawView)
	virtual void OnDraw(CDC* pDC);
	//}}AFX_VIRTUAL
    afx_msg void OnTool( UINT id );
	afx_msg void OnLine( UINT id );
	afx_msg void OnParse( WPARAM wParam , LPARAM lParam );
	afx_msg void OnScrollButton( UINT id );
	afx_msg BOOL OnScrollNotify( NMCSBCUSTOMDRAW *nm , LRESULT* result );
	//{{AFX_MSG(CDrawView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnColor();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnDestroy();
	afx_msg void OnOpen();
	afx_msg void OnSave();
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:

	DWORD    send_threadid;

	bool     capture;

	DRAW_MAP drawmap;

	CMenu  menu;

	CDrawBase * draw;

	bool m_bDraw;

	int page;
};

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DRAWVIEW_H__3C99A9BB_2943_4FEF_8E68_BB4BE11F7864__INCLUDED_)

⌨️ 快捷键说明

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