SysLogView.cpp
上传用户:maryhy001
上传日期:2007-05-02
资源大小:2317k
文件大小:2k
- // SysLogView.cpp : implementation file
- #include "stdafx.h"
- #include "trfAgent.h"
- #include "SysLogView.h"
- /////////////////////////////////////////////////////////////////////////////
- IMPLEMENT_DYNCREATE(CSysLogView, CView)
- CSysLogView::CSysLogView(){}
- CSysLogView::~CSysLogView(){}
- BEGIN_MESSAGE_MAP(CSysLogView, CView)
- //{{AFX_MSG_MAP(CSysLogView)
- ON_WM_CREATE()
- ON_WM_SIZE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CSysLogView drawing
- void CSysLogView::OnDraw(CDC* pDC)
- {
- CDocument* pDoc = GetDocument();
- // TODO: add draw code here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CSysLogView diagnostics
- #ifdef _DEBUG
- void CSysLogView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CSysLogView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- #endif //_DEBUG
- int CSysLogView::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (CView::OnCreate(lpCreateStruct) == -1)
- return -1;
-
- DWORD dwstyle = ES_MULTILINE | ES_READONLY | ES_WANTRETURN | ES_AUTOHSCROLL |
- WS_TABSTOP | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL;
- if(!this->m_EditSysLog.Create(dwstyle, CRect(0, 0, 0, 0), this, 1))
- {
- TRACE0("Failed to create m_EditSysLog windown");
- return -1;
- }
- return 0;
- }
- void CSysLogView::OnSize(UINT nType, int cx, int cy)
- {
- CView::OnSize(nType, cx, cy);
- if(NULL != m_EditSysLog.GetSafeHwnd())
- {
- CRect rc;
- this->GetClientRect(&rc);
- m_EditSysLog.MoveWindow(&rc);
- }
- }