Created
October 15, 2013 16:31
-
-
Save LeZuse/6994454 to your computer and use it in GitHub Desktop.
WinAPI EnumWindow example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
BOOL CALLBACK EnumWindowsProc(HWND hWnd, long lParam) { | |
char buff[255]; | |
if (IsWindowVisible(hWnd)) { | |
GetWindowText(hWnd, (LPSTR) buff, 254); | |
printf("%s\n", buff); | |
} | |
return TRUE; | |
} | |
int main() { | |
EnumWindows(EnumWindowsProc, 0); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice👍