用VC++在工具栏上添加平面组合框控件(5)
int CFlatComboBox::Offset()
{
// Thanks to Todd Brannam for this suggestion...
return ::GetSystemMetrics(SM_CXHTHUMB);
}
////////////////////////////////////// MainToolBar.h: interface for the CMainToolBar class.
#if !defined(AFX_MAINTOOLBAR_H__76CF28F4_005F_11D7_8F58_00E04C0BECE6__INCLUDED_)
#define AFX_MAINTOOLBAR_H__76CF28F4_005F_11D7_8F58_00E04C0BECE6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "FlatComboBox.h"
class CMainToolBar : public CToolBar
{
public:
CMainToolBar();
virtual ~CMainToolBar();
public:
CFlatComboBox m_wndZoom;
};
#endif
////////////////////////////// MainToolBar.cpp: implementation of the CMainToolBar class.
#include "stdafx.h"
#include "ToolBar.h"
#include "MainToolBar.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
CMainToolBar::CMainToolBar()
{
}
CMainToolBar::~CMainToolBar()
{
}
//////////////////////////////////////////////////////////////////////////////////////////////
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{