2009년 11월 5일 목요일

현재 마우스 위치의 윈도우 핸들 얻기 - WindowFromPoint()

<!--StartFragment-->

POINT  Point;


char ClassName[128];

 

GetCursorPos(&Point);

HWND hWnd = WindowFromPoint(Point);

GetClassName(hWnd, (char *)&ClassName, 128);

if (*ClassName)
OutputDebugString(ClassName);

댓글 없음:

댓글 쓰기