Solved

making a CWnd (or derived control) invisible

Posted on 1998-08-04
4
613 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 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 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