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
what is wrong?
Code:
wstring windowNameWstr = L"Untitled - Notepad";
HWND windowHandle = FindWindowW(NULL, windowNameWstr.c_str());
cout << windowHandle;
DWORD* procID;
GetWindowThreadProcessId(windowHandle, procID);