⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 painttoolbar.cpp

📁 Visual C++_ 600 编程学习捷径
💻 CPP
字号:
// PaintToolbar.cpp : implementation file
//

#include "stdafx.h"
#include "draw.h"
#include "PaintToolbar.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPaintToolbar

CPaintToolbar::CPaintToolbar()
{
}

CPaintToolbar::~CPaintToolbar()
{
}


BEGIN_MESSAGE_MAP(CPaintToolbar, CToolBar)
	//{{AFX_MSG_MAP(CPaintToolbar)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPaintToolbar message handlers

void CPaintToolbar::SetColumns(UINT nColumns)
{
	m_nColumns = nColumns;
	int nCount = GetToolBarCtrl().GetButtonCount();
	for(int i = 0; i < nCount; i++)
	{
		UINT nStyle = GetButtonStyle(i);
		BOOL bWrap = (((i + 1) % nColumns) == 0);
		if(bWrap)
			nStyle |= TBBS_WRAPPED;
		else 
			nStyle &= ~TBBS_WRAPPED;
		SetButtonStyle(i, nStyle);
	}
	Invalidate();
	GetParentFrame()->RecalcLayout();
}

#ifdef _DEBUG
void CPaintToolbar::AssertValid() const
{
	CWnd::AssertValid();
}

void CPaintToolbar::Dump(CDumpContext& dc) const
{
	CWnd::Dump(dc);
}

#endif //_DEBUG

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -