HWND h;
h = FindWindow(NULL,"firefox");
ShowWindow(h,FALSE);
The above code should make the window for mozilla firefox get hidden,but nothing happens.Can anybody give me an ideea why?
HWND h;
h = FindWindow(NULL,"firefox");
ShowWindow(h,FALSE);
The above code should make the window for mozilla firefox get hidden,but nothing happens.Can anybody give me an ideea why?
yes,it doesn't find firefox.I tried firefox.exe,Firefox all possible names,but it doesn't find it.Why?
FindWindow uses GetWindowText to get the window name for comparison. It is unlikely that your firefox window only has the word "firefox" in it's title...
It's better to give the class name rather than windows caption. Just use spy++ or a similar tool to get it.