📄 focolorbutton.h
字号:
// Copyright UCanCode Software Technology Inc, All Rights Reserved
// You can contact us.
// Support@UCanCode.net
// http://www.ucancode.net
// //////////////////////////////////////////////////////////////////////////
// FOColorButton.h: interface for the CFOColorButton class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_FOCOLORBUTTON_H__900D5BB5_F3E6_11DD_A438_525400EA266C__INCLUDED_)
#define AFX_FOCOLORBUTTON_H__900D5BB5_F3E6_11DD_A438_525400EA266C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "FOColorCellObj.h"
class CFOColorButton : public CButton
{
DECLARE_DYNAMIC(CFOColorButton)
public:
// Constructor
CFOColorButton();
// Destructor
virtual ~CFOColorButton();
// Attach
BOOL Attach(const UINT nID,
CWnd* pParent,
const COLORREF crColor = RGB(192, 192, 192),
const COLORREF crOldColor = RGB(1, 1, 1),
const COLORREF DisabledColor = RGB(128, 128, 128),
const UINT nBevel = 2
);
// Set Current Color
void SetButtonColor(COLORREF crColor);
// Get Old Color
COLORREF SetOldColor(COLORREF crOld) { return m_crOldColor = crOld; }
protected:
// Draw Item
virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
// Draw Frame
virtual void DrawFrame(CDC *DC, CRect R, int Inset);
// Draw Filled Rectangle
virtual void DrawFilledRect(CDC *DC, CRect R, COLORREF color);
// Draw Line
virtual void DrawLine(CDC *DC, CRect EndPoints, COLORREF color);
// Draw Line
virtual void DrawLine(CDC *DC, long left, long top, long right, long bottom, COLORREF color);
protected:
//{{AFX_MSG(CFOColorButton)
afx_msg UINT OnGetDlgCode();
afx_msg void OnSysColorChange();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
// Old Color
COLORREF m_crOldColor;
// Current Color
COLORREF m_crColor;
// Disabled Color
COLORREF m_disabled;
// Bevel
UINT m_bevel;
};
#endif // !defined(AFX_FOCOLORBUTTON_H__900D5BB5_F3E6_11DD_A438_525400EA266C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -