📄 colorbar.h
字号:
/*** 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -