MonitorBar.cpp
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:1k
源码类别:
P2P编程
开发平台:
Visual C++
- // MonitorBar.cpp : implementation file
- //
- #include "stdafx.h"
- #include "testbt.h"
- #include "MonitorBar.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMonitorBar
- CMonitorBar::CMonitorBar()
- {
- m_pSetupRegister = 0;
- m_MonitorWnd.Refresh();
- }
- CMonitorBar::~CMonitorBar()
- {
- }
- BEGIN_MESSAGE_MAP(CMonitorBar, CSizingControlBar)
- //{{AFX_MSG_MAP(CMonitorBar)
- ON_WM_CREATE()
- ON_WM_SIZE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CMonitorBar message handlers
- BOOL CMonitorBar::CreateEx(CWnd *pParent, CSize &size, long lID, CSetupRegister* pSetupRegister)
- {
- m_pSetupRegister = pSetupRegister;
- return Create("hello", pParent, size, TRUE, lID);
- }
- int CMonitorBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (CSizingControlBar::OnCreate(lpCreateStruct) == -1)
- return -1;
- m_MonitorWnd.CreateEx(this, CRect(0, 0, 100, 100), 0, m_pSetupRegister);
- return 0;
- }
- void CMonitorBar::OnSize(UINT nType, int cx, int cy)
- {
- m_MonitorWnd.MoveWindow(CRect(0, 0, cx, cy));
- CSizingControlBar::OnSize(nType, cx, cy);
- }