colorpalettebar.h

来自「此程序实现类似于windows画图工具的源代码。有铅笔」· C头文件 代码 · 共 40 行

H
40
字号
/*
 *   Author   :  msz
 *   Mail     :  jinhao7654321@163.com
 */
#ifndef __CCOLORPALETTEBAR__
#define __CCOLORPALETTEBAR__


// CColorPaletteBar
const int nColorNum=28;
class CColorPaletteBar : public CDialogBar
{
	DECLARE_DYNAMIC(CColorPaletteBar)

public:
	CColorPaletteBar();
	virtual ~CColorPaletteBar();

public:
	COLORREF m_colorFore, m_colorBack;
	CFont    m_font;
	COLORREF m_colorText;
protected:
	COLORREF m_colors[nColorNum];
	CRect m_rects[nColorNum];
	CRect m_rectColor, m_rectColorFore, m_rectColorBack;
	CRect m_rectFont;
	BOOL  m_bFontFoucsed;
protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnBnClickedBtnFont();
};

#endif

⌨️ 快捷键说明

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