• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Hiding and showing controls (CEdit, CCombo etc)

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
The_Brain
Asked:
The_Brain
1 Solution
 
MirkwoodCommented:
Sure like this
->ShowWindow(SW_HIDE)
->ShowWindow(SW_SHOW)
0
 
The_BrainAuthor Commented:
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
 
Meir RivkinFull stack Software EngineerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now