想用 Windows 內建視窗類,但不知類名怎麼查。
// 列舉頂層視窗類名
EnumWindows((hwnd, lParam) => {
char cls[256];
GetClassName(hwnd, cls, 256);
printf("HWND:%p Class:%s\n", hwnd, cls);
return TRUE;
}, 0);
常用系統類:`Button`、`Static`、`Edit`、`ListBox`、`ComboBox`、`ScrollBar`、`MDIClient`、`#32768`(選單)、`#32769`(桌面)、`#32770`(對話框)、`SysTreeView32`、`SysListView32`、`SysTabControl32`、`SysHeader32`、`ToolbarWindow32`、`RebarWindow32`、`TOOLTIPS_CLASS32`。