what is wrong with this code?

Posts 13 of 3 · Page 1 of 1
what is wrong with this code?
when i run my program with this code, it says "has encountered an error and needs to close", the last line is causing the error

Code:
wstring windowNameWstr = L"Untitled - Notepad";
        HWND windowHandle = FindWindowW(NULL, windowNameWstr.c_str());
        cout << windowHandle;
        DWORD* procID;
        GetWindowThreadProcessId(windowHandle, procID);
what is wrong?
@_corn_
i dont know
but try replacing HWND windowHandle = FindWindowW(NULL, windowNameWstr.c_str());
with HWND windowHandle = FindWindowA(NULL,"Untitled - Notepad")
ok, lol don't need it anymore. thanks anyway :P
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?