⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sxbutton.h

📁 IP电话计费管理系统本地版
💻 H
字号:
#if !defined(AFX_SXBUTTON_H__5B793722_DFC2_4E9D_AF3D_7125650166A5__INCLUDED_)
#define AFX_SXBUTTON_H__5B793722_DFC2_4E9D_AF3D_7125650166A5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SXButton.h : header file
//
#define SXBUTTON_CENTER -1
/////////////////////////////////////////////////////////////////////////////
// CSXButton window

class CSXButton : public CButton
{
// Construction
public:
	CSXButton();

// Attributes
private:
// Positioning
    BOOL m_bUseOffset; 
    CPoint m_pointImage;
    CPoint m_pointText;
    int m_nImageOffsetFromBorder;
    int m_nTextOffsetFromImage;

// Image
    HICON m_hIcon; 
    HBITMAP m_hBitmap;
    HBITMAP m_hBitmapDisabled;
    int m_nImageWidth, m_nImageHeight;

// Color Tab
    char m_bColorTab; 
    COLORREF m_crColorTab;

// State
    BOOL m_bDefault;
    UINT m_nOldAction;
    UINT m_nOldState;

// Positioning
public:
int SetImageOffset( int nPixels ); 
int SetTextOffset( int nPixels );
CPoint SetImagePos( CPoint p );
CPoint SetTextPos( CPoint p );

// Image
BOOL SetIcon( UINT nID, int nWidth, int nHeight );
BOOL SetBitmap( UINT nID, int nWidth, int nHeight );
BOOL SetMaskedBitmap( UINT nID, int nWidth, int nHeight, COLORREF crTransparentMask );
BOOL HasImage() { return (BOOL)(( m_hIcon != 0 )| (m_hBitmap != 0 )); }

// Color Tab
void SetColorTab(COLORREF crTab);

// State
BOOL SetDefaultButton( BOOL bState = TRUE );

private:
BOOL SetBitmapCommon( UINT nID, int nWidth, int nHeight, COLORREF crTransparentMask, BOOL bUseMask );
void CheckPointForCentering( CPoint &p, int nWidth, int nHeight );
void Redraw();

public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSXButton)
	//}}AFX_VIRTUAL

virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);

// Implementation
public:
	virtual ~CSXButton();

	// Generated message map functions
protected:
	//{{AFX_MSG(CSXButton)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SXBUTTON_H__5B793722_DFC2_4E9D_AF3D_7125650166A5__INCLUDED_)

⌨️ 快捷键说明

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