pickerbutton.h

来自「SQLBig5BugTool 宽字符操作问题」· C头文件 代码 · 共 87 行

H
87
字号
#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 + =
减小字号Ctrl + -
显示快捷键?