Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

making a CWnd (or derived control) invisible

Posted on 1998-08-04
4
Medium Priority
?
627 Views
Last Modified: 2013-11-19

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
Comment
Question by:VEngineer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 80 total points
ID: 1320203
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
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1320204
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
 
LVL 2

Author Comment

by:VEngineer
ID: 1320205
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
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1320206
Glad I could help!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question