systemmsgview.cpp
资源名称:1731.rar [点击查看]
上传用户:swkcbjrc
上传日期:2016-04-02
资源大小:45277k
文件大小:2k
源码类别:
游戏
开发平台:
Visual C++
- // systemmsgview.cpp : implementation file
- //
- #include "stdafx.h"
- #include "..GameHigh.h"
- #include "..includesystemmsgview.h"
- #include "macros.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CSystemMsgView
- IMPLEMENT_DYNCREATE(CSystemMsgView, CView)
- CSystemMsgView::CSystemMsgView()
- {
- }
- CSystemMsgView::~CSystemMsgView()
- {
- }
- BEGIN_MESSAGE_MAP(CSystemMsgView, CView)
- //{{AFX_MSG_MAP(CSystemMsgView)
- ON_WM_CREATE()
- ON_WM_SIZE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CSystemMsgView drawing
- void CSystemMsgView::OnDraw(CDC* pDC)
- {
- CDocument* pDoc = GetDocument();
- // TODO: add draw code here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CSystemMsgView diagnostics
- #ifdef _DEBUG
- void CSystemMsgView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CSystemMsgView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CSystemMsgView message handlers
- int CSystemMsgView::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (CView::OnCreate(lpCreateStruct) == -1)
- return -1;
- RECT rect;
- memset(&rect, 0, sizeof(RECT));
- m_SystemMsg.Create(ES_LEFT|ES_MULTILINE|WS_VISIBLE,rect,this,0);
- CWnd* pWnd =&m_SystemMsg;
- SAFE_CHECKWND(pWnd)
- {
- COLORREF clrBk =RGB(150, 175, 230);
- m_SystemMsg.SetBackgroundColor(FALSE, clrBk);
- m_SystemMsg.SetReadOnly(TRUE);
- m_SystemMsg.AppendText("连接游戏完成...", RGB(125, 125, 125));
- }
- return 0;
- }
- void CSystemMsgView::OnSize(UINT nType, int cx, int cy)
- {
- CView::OnSize(nType, cx, cy);
- CWnd* pWnd =&m_SystemMsg;
- SAFE_CHECKWND(pWnd)
- {
- RECT rect;
- memset(&rect, 0, sizeof(RECT));
- this->GetClientRect(&rect);
- m_SystemMsg.MoveWindow(&rect);
- }
- }