Created
October 23, 2012 10:21
-
-
Save brenttaylor/3938046 to your computer and use it in GitHub Desktop.
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> | |
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