www.pudn.com > GGBT.rar > CategoryBar.cpp
// CategoryBar.cpp : implementation file
//
#include "stdafx.h"
#include "testbt.h"
#include "CategoryBar.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCategoryBar
CCategoryBar::CCategoryBar()
{
m_pSetupRegister = 0;
}
CCategoryBar::~CCategoryBar()
{
}
BEGIN_MESSAGE_MAP(CCategoryBar, CSizingControlBar)
//{{AFX_MSG_MAP(CCategoryBar)
ON_WM_CREATE()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCategoryBar message handlers
BOOL CCategoryBar::CreateEx(CWnd *pParent, CSize &sz, long lParam, CSetupRegister* pSetupRegister)
{
m_pSetupRegister = pSetupRegister;
return Create("hello", pParent, sz, TRUE, lParam);
}
int CCategoryBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CSizingControlBar::OnCreate(lpCreateStruct) == -1)
return -1;
assert(m_pSetupRegister);
m_CategoryBarWnd.CreateEx(this, CRect(0, 0, 100, 100), 0, m_pSetupRegister);
return 0;
}
void CCategoryBar::OnSize(UINT nType, int cx, int cy)
{
m_CategoryBarWnd.MoveWindow(CRect(0, 0, cx, cy));
CSizingControlBar::OnSize(nType, cx, cy);
}