Solved

making a CWnd (or derived control) invisible

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 58
Looking for a specific application/software 2 92
pre4 challenge 19 88
Fibonacci challenge 11 84
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. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

20 Experts available now in Live!

Get 1:1 Help Now