📄 pickerbutton.h
字号:
#if !defined(AFX_PickerButton_H__4B6B5B3E_B46E_4A81_AB38_09C4403C43FF__INCLUDED_)
#define AFX_PickerButton_H__4B6B5B3E_B46E_4A81_AB38_09C4403C43FF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PickerButton.h : header file
//
class IMousePicker
{
public:
virtual long OnPickerStart(UINT nFlags, CPoint& point)
{
return 0;
};
virtual long OnPickerStop(UINT nFlags, CPoint& point)
{
return 0;
};
virtual long OnPickerMouseMove(UINT nFlags, CPoint& point)=0;
};
/////////////////////////////////////////////////////////////////////////////
// CPickerButton window
class CPickerButton : public CButton
{
// Construction
public:
CPickerButton(LPCTSTR lpCursorName );
// Attributes
public:
// Operations
public:
HWND GetWndLast()
{
return m_hWndLast;
};
void EraseLastWindowFrame();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPickerButton)
//}}AFX_VIRTUAL
// Implementation
public:
void EnableDrawFrame(const BOOL bEnableDrawFrame);
bool IsPickerStarted();
void SetMousePicker(IMousePicker* pMousePicker);
virtual ~CPickerButton();
// Generated message map functions
protected:
//{{AFX_MSG(CPickerButton)
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
DECLARE_MESSAGE_MAP()
private:
IMousePicker* m_IMousePicker;
bool m_bIsPickerStarted;
LPCTSTR m_lpCursorName;
HWND m_hWndLast;
BOOL m_bEnableDrawFrame;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PickerButton_H__4B6B5B3E_B46E_4A81_AB38_09C4403C43FF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -