📄 zbutton.h
字号:
#if !defined(AFX_ZBUTTON_H__1CFD8078_BFDA_4634_9183_A5AB4E6596F7__INCLUDED_)
#define AFX_ZBUTTON_H__1CFD8078_BFDA_4634_9183_A5AB4E6596F7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// zButton.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CzButton window
class CzButton : public CButton
{
// Construction
public:
CzButton();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CzButton)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CzButton();
// Generated message map functions
protected:
//{{AFX_MSG(CzButton)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
bool m_button_down;
short m_FocusRectMargin; //dotted margin offset
CBitmap m_bNormal,m_bDown,m_bDisabled,m_bMask,m_bOver,m_bFocus; //skin bitmaps
short m_DrawMode; //0=normal; 1=stretch; 2=tiled;
BOOL m_Border; //0=flat; 1=3D;
bool m_Checked; //radio & check buttons
bool m_tracking;
COLORREF m_TextColor; //button text color
void FillWithBitmap(CDC* dc, HBITMAP hbmp, RECT r);
void DrawBitmap(CDC* dc, HBITMAP hbmp, RECT r, int DrawMode);
int GetBitmapWidth (HBITMAP hBitmap);
int GetBitmapHeight (HBITMAP hBitmap);
HRGN hClipRgn; //clipping region
HRGN CreateRgnFromBitmap(HBITMAP hBmp, COLORREF color);
public:
void SetPosition(CRect RC, int pos);
void SetSkin(UINT normal,UINT down, UINT over=0, UINT disabled=0, UINT focus=0,UINT mask=0,
short drawmode=1,short border=1,short margin=4);
COLORREF SetTextColor(COLORREF new_color);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ZBUTTON_H__1CFD8078_BFDA_4634_9183_A5AB4E6596F7__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -