Solved

Hiding and showing controls (CEdit, CCombo etc)

Posted on 1999-01-12
3
219 Views
Last Modified: 2013-11-20
This has to be a simple answer, (pach)

I need to hide and show all types of controls within a dialog or form.

Thanks
0
Comment
Question by:The_Brain
3 Comments
 
LVL 13

Accepted Solution

by:
Mirkwood earned 30 total points
ID: 1327512
Sure like this
->ShowWindow(SW_HIDE)
->ShowWindow(SW_SHOW)
0
 
LVL 1

Author Comment

by:The_Brain
ID: 1327513
Thank you VERY much, (i thought it would look like that, (I just couldn't find an example.)

Mirkwood do you have ICQ, I Think I have your number, I will have to check When I get home.  Thanks for the QUICK :^) answer.
increased to 35 for speed. :)
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 4218994
the Brian....

what if u have a 20 buttons on a dilaogBox?

do u want to write 20 times the code
((CButton*)GetDlgItem(ID_CONTROL))->ShowWindow(SW_HIDE) ????
for each one of the controls (buttons in this case) u need this line ....

what u should do is use GetNextDlgTabItem, with a simple loop u can retrieve all controls in ones dialogBox and hide/show/disable/enable/resize etc.

got it ????
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

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

19 Experts available now in Live!

Get 1:1 Help Now