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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I put text into a static ???

Status
Not open for further replies.

GOOOD

Programmer
Nov 9, 2001
4
0
0
DK
Hi,

I have just recently started in Visual C++. Now I have this problem. It's properly very simple. I have made a simple SDK Platform whit a button and a static. Now i would like to know, how I get text into the static when i press the button ?

Thanks,
GOOOD
 
It is very easy

1. Right click the static control and select class wizard
2. Click the Member Variables tab
3. Select your static control
4. Click add member variable and for type use Value/CString
5. Name your member variable

(lets say you named your variable m_staticText)

in your OnClick function for your button,
1. set m_staticText to a string.
2. Type "UpdateData(FALSE);" at the end of the funciton

That will do it for you.

Good LUck :)

matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top