OSDN Git Service

v0.0.1 release
[winautomata/winautomata.git] / window_from_point.c
1 #include <windows.h>
2 #include <stdio.h>
3
4 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
5             PSTR lpCmdLine, int nCmdShow)
6 {
7     POINT point;
8     GetCursorPos(&point);
9     HWND cursor_wnd = WindowFromPoint(point);
10
11     char buf[1024];
12     GetClassName(cursor_wnd, buf, 1024);
13
14     printf("%s\n", buf);
15
16     return 0;
17 }