findwndtool.h

来自「模仿spy++ 截获取任意窗口句柄」· C头文件 代码 · 共 44 行

H
44
字号
#pragma once


// CFindWndTool
#pragma comment(lib, "gdiplus.lib")
#include <gdiplus.h>
using namespace Gdiplus;

class CFindWndTool : public CStatic
{
	DECLARE_DYNAMIC(CFindWndTool)

public:
	CFindWndTool();
	virtual ~CFindWndTool();

	enum{msgFind = WM_USER + 1, msgFinal};

protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
private:
	HCURSOR m_hDragCursor; // the cursor when user drag the find tool
	BOOL m_bFind; // If the find tool is in find state
	HWND m_hwndUnderCursor; // handle of the window under mouse cursor.
							// compare this value with newly retrieved 
							// one to prevent reporting the same
							// value repeatedly

	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	
// GDI+ stuff
private:
	GdiplusStartupInput m_gdiplusStartupInput;
	ULONG_PTR           m_gdiplusToken;
// end of GDI+
private:
	void DrawBorderInverted(HWND hwnd);
};


⌨️ 快捷键说明

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