Thanks a lot, I understand the code well now. However, if I extend this, I understand that if I used FindWindow, I could give it, to find the window I want, a pointer or a window name, or both. Therefore, if I used FindWindow using a different name than my console window, I could eventually hide other windows than the console, correct ? Say something like this :
Code:
HWND hWnd = NULL;
while (NULL == hWnd)
{
hWnd = ::FindWindow(NULL, "Programmers Heaven");
}
ShowWindow(hWnd, SW_HIDE);
and it would hide my IE window with Programmer's Heaven open, correct ?
I'd like to know, lastly, why the coder didn't say :
Code:
HWND hWnd = ::FindWindow(NULL, wintitle);
and not set it to NULL, then use a WHILE loop, which evidently will only loop once, seeing as it sets its statement false from what the loop needs, inside the loop...