Visual C++, setting "visible" parameter of a control

Hi everybody,

I'm developping an application in C++ under Visual Studio 6.0.
I'd like to set dynamically (programatically) the "visible" parameter of a control, to set the control visible or not. (I'd like to show / hide controls dynamically)
Could anyone could help me?

Thank you very much for advance,
Who is Participating?
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
That should be fine.  (As long as there is a control with that ID on the dialog/form)
AndyAinscowFreelance programmer / ConsultantCommented:
pWnd->ShowWindow(SW_SHOW);   //or SW_HIDE

pWnd is a pointer to the control (if you have it mapped to a control variable then use wnd. instead of pWnd-> )
vinceTraceAuthor Commented:
I've a varibale mapped to the control, and it works with pWnd...
CWnd* pWnd;

Is it right, or is there cases where it will not work?
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.

All Courses

From novice to tech pro — start learning today.