DrawView.h
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:3k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- #if !defined(AFX_DRAWVIEW_H__90DA4246_4238_4D56_A1AC_3C4B7F356452__INCLUDED_)
- #define AFX_DRAWVIEW_H__90DA4246_4238_4D56_A1AC_3C4B7F356452__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // DrawView.h : header file
- //
- #include <afxmt.h>
- #include "DrawIterator.h"
- class CDraw;
- #pragma warning(disable:4786)
- #include <list>
- using namespace std;
- typedef list< CDraw * >DRAW_LIST;
- class CMainFrame;
- /////////////////////////////////////////////////////////////////////////////
- // CDrawView view
- class CDrawView : public CScrollView
- {
- public:
- enum ACTION
- {
- ADD = 1 , DEL , MODIFY , ITERATOR , LOCK , POSITION
- };
- CDrawView( CMainFrame * mainFrame );
- virtual ~CDrawView( );
- //主框架窗口
- CMainFrame * mainFrame;
- //选择画图
- void SelectDraw( int index , COLORREF color = RGB( 0 , 0 , 0 ) , int width = 1 , bool m_bEmpty = true );
- //取得当前的画图工具
- CDraw * GetDraw( void ){ return this->draw; }
- //取得内存dc
- CDC * GetMemDC( void ){ return & this->memDC; }
- //刷新
- void Reflush( void );
- //取得列表
- DRAW_LIST * LockList( void ){ this->session.Lock( ); return &this->drawList; }
- //解锁链表
- void UnlockList( void ){ this->session.Unlock( ); }
- //取得指示器
- CIterator * GetIterator( void ){ return this->iterator; }
- //组合数据
- void assembleData( CDraw * draw , ACTION action , int pos = 0 );
- //分析数据
- void parseData( char * buffer , int size );
- //白板通知外部程序
- void ( * OnWB )( void * pContext , CWnd * pWnd , char * buffer , int size );
- void * pContext;
- CString userName;
- protected:
- //{{AFX_VIRTUAL(CDrawView)
- virtual void OnDraw(CDC* pDC);
- //}}AFX_VIRTUAL
- //{{AFX_MSG(CDrawView)
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
- afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- afx_msg void OnOpen();
- afx_msg void OnSave();
- afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
- afx_msg void OnDrawFirst();
- afx_msg void OnDrawLast();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP( )
- private:
- CCriticalSection session;
- CDC memDC;
- CBitmap memBitmap;
- CIterator * iterator;
- DRAW_LIST drawList;
- CDraw * draw;
- int curDraw;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_DRAWVIEW_H__90DA4246_4238_4D56_A1AC_3C4B7F356452__INCLUDED_)