Skip to content

Instantly share code, notes, and snippets.



Created Oct 15, 2013
What would you like to do?
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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.