SetFocus
Hello, I'm trying to perform a check to see if a window is open or not. If it is, SetFocus on it. I'm not too sure how to use the function.
Here's the code:
1 2 3 4 5 6
|
HWND WindowOpen = FindWindow(NULL, "Untitled - Notepad");
if(WindowOpen)
{
std::cout << "Window is open" << std::endl;
HWND WINAPI SetFocus(_In_opt_ HWND hWnd);
}
|
Since cout isn't working then I'm assuming the condition isn't even being met, that having said, what am I doing wrong here?
Last edited on
Topic archived. No new replies allowed.