Seznam existujících samostatných oken ve Windows
#include <stdio.h> #include <windows.h> #include <locale.h> #include <assert.h> BOOL CALLBACK enum_windows_proc(HWND hwnd, LPARAM lparam) { wchar_t text[1000]; wchar_t trida[255]; GetWindowText(hwnd, text, sizeof(text) / sizeof(wchar_t)); GetClassName(hwnd, trida, sizeof(trida) / sizeof(wchar_t)); wprintf(L"%s - %s\n", text, trida); return TRUE; } int main() { _wsetlocale(LC_ALL, L"Czech"); EnumWindows(enum_windows_proc, 0); printf("\nhotovo\n"); getchar(); return EXIT_SUCCESS; }