mybutton.h

来自「随着计算机信息技术的飞速发展」· C头文件 代码 · 共 50 行

H
50
字号
#pragma once

// CMyButton

#include <uxtheme.h>
#pragma comment(lib,"uxtheme.lib")

#include <shlwapi.h>
#pragma comment(lib,"shlwapi.lib")

class CMyButton : public CButton
{
	DECLARE_DYNAMIC(CMyButton)

public:
	CMyButton();
	CMyButton(HWND);
	virtual ~CMyButton();

protected:
	HTHEME m_hTheme;
	HWND m_hParent;
	BOOL m_bSelect;
	BOOL m_bFocus;
	BOOL m_bPaint;
	
protected:
	BOOL InitTrackEvent(HWND,DWORD);
	void DrawSelectState(UINT,int&);
	void DrawFocusState(UINT,int&);
	BOOL DrawButtonEdge(int);

protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	
protected:
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);

public:
	afx_msg UINT OnNcHitTest(CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
};


⌨️ 快捷键说明

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