Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Why I can't hide certain apps?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 03 May 2013 - 07:17 AM

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?



Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9675

Like
0Likes
Like

Posted 03 May 2013 - 07:23 AM

Did you check the return value for FindWindow() to make sure that it succeeded?

#3 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 03 May 2013 - 07:25 AM

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



#4 Dave Hunt   Crossbones+   -  Reputation: 2479

Like
1Likes
Like

Posted 03 May 2013 - 07:30 AM

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



#5 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 03 May 2013 - 07:34 AM

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



#6 Vortez   Crossbones+   -  Reputation: 2704

Like
1Likes
Like

Posted 07 May 2013 - 12:17 AM

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






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS