Skip to content

Instantly share code, notes, and snippets.

@brenttaylor
Created October 23, 2012 10:21
Show Gist options
  • Save brenttaylor/3938046 to your computer and use it in GitHub Desktop.
Save brenttaylor/3938046 to your computer and use it in GitHub Desktop.
#include <Windows.h>
HWND Wunderlist;
BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam) {
char title[14];
ZeroMemory(title, sizeof(title));
GetWindowTextA(hWnd, title, sizeof(title));
if (strncmp(title, "Wunderlist - ", 13) == 0) {
Wunderlist = hWnd;
return FALSE;
}
return TRUE;
}
int main(int argc, char **argv) {
EnumWindows(MyEnumProc, 0);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment