ChatView.cpp
资源名称:anywhere.zip [点击查看]
上传用户:zhenhuadz
上传日期:2007-01-07
资源大小:1511k
文件大小:2k
源码类别:
远程控制编程
开发平台:
Visual C++
- // ChatView.cpp : implementation file
- //
- #include "stdafx.h"
- #include "AnyServer.h"
- #include "ChatView.h"
- #include "AnyServerDoc.h"
- #include "ChatClientView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CChatView
- IMPLEMENT_DYNCREATE(CChatView, CEditView)
- CChatView::CChatView()
- {
- }
- CChatView::~CChatView()
- {
- }
- BEGIN_MESSAGE_MAP(CChatView, CEditView)
- //{{AFX_MSG_MAP(CChatView)
- ON_WM_CTLCOLOR_REFLECT()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CChatView drawing
- void CChatView::OnDraw(CDC* pDC)
- {
- CAnyServerDoc* pDoc = (CAnyServerDoc*)GetDocument();
- }
- /////////////////////////////////////////////////////////////////////////////
- // CChatView diagnostics
- #ifdef _DEBUG
- void CChatView::AssertValid() const
- {
- CEditView::AssertValid();
- }
- void CChatView::Dump(CDumpContext& dc) const
- {
- CEditView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CChatView message handlers
- void CChatView::OnInitialUpdate()
- {
- CEditView::OnInitialUpdate();
- GetEditCtrl().LimitText(4096);
- }
- HBRUSH CChatView::CtlColor(CDC* pDC, UINT nCtlColor)
- {
- // TODO: Change any attributes of the DC here
- pDC->SetTextColor(RGB(0,0,255));
- pDC->SetBkColor(RGB(192,192,192));
- HBRUSH hBrush=(HBRUSH)::GetStockObject(LTGRAY_BRUSH);
- // TODO: Return a non-NULL brush if the parent's handler should not be called
- return hBrush;
- }