getwindowinfo.h

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

H
57
字号
// GetWindowInfo.h: interface for the CGetWindowInfo class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GETWINDOWINFO_H__EAFAE1AE_C2C5_4CC6_BAE6_1ABEC9230EB6__INCLUDED_)
#define AFX_GETWINDOWINFO_H__EAFAE1AE_C2C5_4CC6_BAE6_1ABEC9230EB6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define BUFFER_SIZE 200

class CZWinInfo
{

public:
	CZWinInfo()
	{
		hWnd = NULL;
		memset(szWindowCaption, 0, 200);
	};

	char szWindowCaption[BUFFER_SIZE];

	char szWindowClassName[BUFFER_SIZE];
	HWND hWnd;
};

class CGetWindowInfo  
{
public:
	CGetWindowInfo();
	virtual ~CGetWindowInfo();

	int GetWindowFromCursorInfo();
	int EraseLastWindow();
	void Reset();
	
	CZWinInfo m_WinInfo;

private:
	int GetControlText(char *pszText, int nSize, HWND hWndControl);
	CWnd m_wndWindow;

	int GetRealWindow(HWND *phWnd, POINT ptPoint);
	int GetWindowFromCursorPos(HWND *phWnd);
	
	int DrawWindowFrame(HWND hWnd);
	int RedrawWindowFrame(HWND hWnd);

	int FillWindowInfo(HWND hWnd, CZWinInfo &WinInfo);
};


#endif // !defined(AFX_GETWINDOWINFO_H__EAFAE1AE_C2C5_4CC6_BAE6_1ABEC9230EB6__INCLUDED_)

⌨️ 快捷键说明

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