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

📄 xskinbutton.h

📁 一个在WINCE5.0下开发的MP4播放器,可以播放多种视频文件,画面优质.
💻 H
字号:
#if !defined(AFX_MYB_H__3832DDEF_0C12_11D5_B6BE_00E07D8144D0__INCLUDED_)
#define AFX_MYB_H__3832DDEF_0C12_11D5_B6BE_00E07D8144D0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bitmapsk.h"

#define WM_CXSHADE_RADIO WM_USER+0x100
/////////////////////////////////////////////////////////////////////////////
// CxSkinButton window
class CxSkinButton : public CButton
{
// Construction
public:
	CxSkinButton();
    ~CxSkinButton();

    COLORREF SetTextColor(COLORREF newColor);
    void     SetSkin(LPCTSTR normal, LPCTSTR down, LPCTSTR over = NULL, LPCTSTR disabled = NULL,
                    LPCTSTR focus = NULL, LPCTSTR mask = NULL, short drawmode = 1, 
                    short border = 1, short margin = 4);
    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);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CxSkinButton)
	public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL
	// Generated message map functions

protected:
    HRGN    CreateRgnFromBitmap(HBITMAP hBmp, COLORREF 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);

    void    DestroyBitmap();

protected:
	BOOL        m_bChecked;					//radio & check buttons
	DWORD       m_nStyle;					//radio & check buttons
    BOOL        m_bButtonDown;
	CBitmapSK   m_bmpNormal;
    CBitmapSK   m_bmpDown;
    CBitmapSK   m_bmpDisabled;
    CBitmapSK   m_bmpMask;
    CBitmapSK   m_bmpOver;
    CBitmapSK   m_bmpFocus;
	short       m_nFocusRectMargin;         //dotted margin offset
	COLORREF    m_clrText;			        //button text color
	HRGN	    m_hClipRgn;				//clipping region
	BOOL	    m_bBorder;				//0=flat; 1=3D;
	short	    m_nDrawMode;				//0=normal; 1=stretch; 2=tiled;

protected:
    //{{AFX_MSG(CxSkinButton)
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg BOOL OnClicked();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	afx_msg LRESULT OnMouseLeave(WPARAM, LPARAM);
	afx_msg LRESULT OnRadioInfo(WPARAM, LPARAM);
	afx_msg LRESULT OnBMSetCheck(WPARAM, LPARAM);
	afx_msg LRESULT OnBMGetCheck(WPARAM, LPARAM);
	DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYB_H__3832DDEF_0C12_11D5_B6BE_00E07D8144D0__INCLUDED_)

⌨️ 快捷键说明

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