Draw.h
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:2k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- // Draw.h: interface for the CDraw class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_DRAW_H__B0CC5D4F_3CC2_4992_8998_3B0306401089__INCLUDED_)
- #define AFX_DRAW_H__B0CC5D4F_3CC2_4992_8998_3B0306401089__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "MemDC.h"
- #include "..DrawView.h"
- class CDraw
- {
- public:
- enum
- {
- SELECT = 1 ,LINE , RECT , CIRCLE , ROUNDRECT , PEN , PEN1 , TEXT , WBWND , WBWND1
- };
- CDraw( CDrawView * view );
- virtual ~CDraw( );
- //图元的id
- CString userName;
- int drawId;
- //获得类型
- int GetType( void ){ return this ? this->type : 0 ; }
- //设定画笔颜色
- virtual void SetColor( COLORREF color = RGB( 0 , 0 , 0 ) );
- //取得画笔颜色
- virtual COLORREF GetColor( void );
- //设定画笔宽度
- virtual void SetWidth( int width = 1 );
- //取得画笔宽度
- virtual int GetWidth( void );
- //设定画刷是否为空,缺省情况为空
- virtual void SetEmpty( bool m_bEmpty = true );
- //判断画刷是否为空
- virtual bool IsEmpty( void );
- //获得区域
- virtual CRgn & GetRgn( void ){ return this->rgn; }
- virtual void LButtonDown( UINT nFlags , CPoint point );
- virtual void LButtonUp( UINT nFlags , CPoint point );
- virtual void MouseMove( UINT nFlags , CPoint point );
- virtual CDC * Draw( CDC * pDC = NULL );
- protected:
- //位图
- CDrawView * view;
- //画布的总大小
- CSize dcSize;
- //类型
- int type;
- //每个图元都是一个区域
- CRgn rgn;
- //鼠标起点
- CPoint start;
- //鼠标终点
- CPoint end;
- //画笔
- CPen pen;
- //画刷
- CBrush brush;
- };
- #endif // !defined(AFX_DRAW_H__B0CC5D4F_3CC2_4992_8998_3B0306401089__INCLUDED_)