Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to hide a label?

Status
Not open for further replies.

tpremore

Technical User
Apr 13, 2001
22
US
If I have a button, I can hide it with code using something like:
GetDlgItem(IDC_BUTTON10)->ShowWindow(FALSE);

Since a static text item does not have unique ID, I cannot hide it the same way. How *can* I hide it?
 
You can come ture..............like this way


CStatic *pStatic = ...........

pStatic->ShowWindow(FALSE);
 
But a Static text CAN have an uniqueID, just change it's name from IDC_STATIC to something else.
You can assign it a variable and you will see it appear in the member variables section of the ClassWizard as a confirmation.
Then you can treat it like any other control.

Hope this helps, s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top