Skip to content

Instantly share code, notes, and snippets.

@LeZuse
Created October 15, 2013 16:31
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeZuse/6994454 to your computer and use it in GitHub Desktop.
Save LeZuse/6994454 to your computer and use it in GitHub Desktop.
WinAPI EnumWindow example
#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;
}
@taban-17
Copy link

Nice👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment