• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 638
  • Last Modified:

making a CWnd (or derived control) invisible


How can you make a CWnd control not visible, codewise?  I know you can set the option in the properties box when you right click, but is there a way to set it in the code so I can make it visible/invisible when necessary?
0
VEngineer
Asked:
VEngineer
  • 3
1 Solution
 
thresher_sharkCommented:
Try the following:

YourWnd.ShowWindow (SW_HIDE);

or if you are doing it within one of your window's member functions, just do the following:

ShowWindow (SW_HIDE);

If you have any questions, feel free to ask.
0
 
thresher_sharkCommented:
Also, if you want to show the window again, use the following:

ShowWindow (SW_SHOW);

If you look up ShowWindow in InfoViewer, you'll see that you can do all sorts of things with it, like minimizing the window, maximizing it, restoring etc.
0
 
VEngineerAuthor Commented:
Thanks for the help, as well as taking a brief moment to explain instead of just tossing code as the answer .. it works fine.
0
 
thresher_sharkCommented:
Glad I could help!
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now