Solved

making a CWnd (or derived control) invisible

Posted on 1998-08-04
4
603 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
  • 3
4 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 20 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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.

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now