📄 hoverbutton.h
字号:
/*
Copyright 2006 - 2007, All Rights Reserved.
图片按钮类
作者 - 张鲁夺(zhangluduo)
MSN - zhangluduo@msn.com
QQ群 - 34064264
为所有爱我的人和我爱的人努力!
*/
#if !defined(AFX_HOVERBUTTON_H__3C967C0A_9F0F_4944_B32F_5616D59E2850__INCLUDED_)
#define AFX_HOVERBUTTON_H__3C967C0A_9F0F_4944_B32F_5616D59E2850__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// HoverButton.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// HoverButton window
class HoverButton : public CButton
{
public:
HoverButton();
virtual ~HoverButton();
public:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(HoverButton)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(HoverButton)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
enum STATUS
{
NORMAL,
MOUSEMOVE,
LBUTTONDOWN,
DISABLED
};
HBITMAP m_hBitmap;
bool m_bIsMouseMove;
private:
bool GetBitmapSize(HBITMAP hBmp, int* nWidth, int* nHeight);
void DrawBitmap(HBITMAP hBmp, STATUS Status);
public:
bool LoadBitmap(HMODULE hModule, UINT nBitmapID);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HoverButton_H__3C967C0A_9F0F_4944_B32F_5616D59E2850__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -