colorbar.h

来自「一个复杂的画图系统」· C头文件 代码 · 共 71 行

H
71
字号
/*** file name: ColorBar.h*/#if !defined(AFX_COLORBAR_H__86EB2B05_60E2_11D2_B57D_0020AF15448E__INCLUDED_)#define AFX_COLORBAR_H__86EB2B05_60E2_11D2_B57D_0020AF15448E__INCLUDED_#if _MSC_VER >= 1000#pragma once#endif // _MSC_VER >= 1000#include "globals.h"#define BLOCKWIDTH		20#define BLOCKHEIGHT		20/////////////////////////////////////////////////////////////////////////////// CMainDialogBar dialogclass CColorBar : public CDialogBar{	//Attributesprivate:	unsigned int 	m_curColor; //The current foreground color	PALETTEENTRY	m_colorArr[20];							//the 20 colors in the color bar	CRect			m_drawRect;	CRect			m_colorRect;	CRect			m_repaintRect;		//Functionspublic:	void	DrawConvexBorder(CPaintDC *dc, RECT *rect);    void	DrawConcaveBorder(CPaintDC *dc, RECT *rect);     void	DrawConvexLine(CPaintDC *dc, RECT *rect) ;    void	ComputeRect();	// Constructionpublic:	CColorBar(CWnd* pParent = NULL);   // standard constructor// Dialog Data	//{{AFX_DATA(CMainDialogBar)	enum { IDD = IDD_COLORBAR };	//}}AFX_DATA// Overrides	// ClassWizard generated virtual function overrides	//{{AFX_VIRTUAL(CMainDialogBar)	protected:	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support	//}}AFX_VIRTUAL// Implementationprotected:	// Generated message map functions	//{{AFX_MSG(CMainDialogBar)	afx_msg void OnPaint();	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);	//}}AFX_MSG	DECLARE_MESSAGE_MAP()};//{{AFX_INSERT_LOCATION}}// Microsoft Developer Studio will insert additional declarations immediately before the previous line.#endif // !defined(AFX_COLORBAR_H__86EB2B05_60E2_11D2_B57D_0020AF15448E__INCLUDED_)

⌨️ 快捷键说明

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