Jump to content
  • Advertisement
Sign in to follow this  
noatom

Why I can't hide certain apps?

This topic is 2046 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
Did you check the return value for FindWindow() to make sure that it succeeded?

Share this post


Link to post
Share on other sites

yes,it doesn't find firefox.I tried firefox.exe,Firefox all possible names,but it doesn't find it.Why? 

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

damn.I always check msdn for functions,but this time I didn't,and it bit my... Thanks a lot!

Share this post


Link to post
Share on other sites

It's better to give the class name rather than windows caption. Just use spy++ or a similar tool to get it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!