Re: Making a control Visible
Change the Control ID to something other than IDC_STATIC, let's say IDC_STATIC_DESC. Now in ClassWizard, create a member variable of type control for IDC_STATIC_DESC, let's call it m_CtrlStDesc.
Now in the header file you'll have a public class member:
CStatic m_CtrlStDesc;
CStatic is derived from CWnd so it inherits all CWnd's member functions... the one you're looking for is CWnd::ShowWindow()
So to make the control visible:
m_CtrlStDesc.ShowWindow(SW_SHOW);
and to hide it:
m_CtrlStDesc.ShowWindow(SW_HIDE);
Hope that helps.
Rail
Recording Engineer/Software Developer
Rail Jon Rogut Software
[email protected]
http://home.earthlink.net/~railro/
Re: Making a control Visible
just put this code where you want.
CStatic *pStatic;
pStatic=(CStatic *)GetDlgItem(IDC_STATIC1);
pStatic->ShowWindow(SW_SHOW);
Is that what you want?. I hope so.
by nfuox
Re: Making a control Visible
Thanks for the input. I appreciate your tiome and effort. It worked great!
John