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

Newbie needs simple help

Status
Not open for further replies.

tpmoody

Technical User
Jul 6, 2005
6
US
Not too new, just haven't written any Windows code in four years. I now have a job with Visual Studio .NET 2003 and I am trying to get up-to-speed. All I need for now is this: I have a dialog program I am creating with a button. I want to click the button and have text displayed in a static text box. I was an easy Hello World program but am stumped. I am the only one here at work so I have no support base. I have created the dialog, the button and the static text box. I have added an event handler for the button, I just do not know how to print out text into this static box. I have created CString displayMyString = "Hello Cruel World"; and would like that to be diplayed. No, I am not a student, just a solo employee that is struggling to re-learn the little I knew about MFC and Window programming.
Tim Moody
 
Take a read-only edit box (w/o a border, for example) instead of a static text box, then use common SetWindowText() via a pointer obtained with GetDlgItem(IDC_...) in OnButton handler.
May be it helps...
 
Thanks, I'll give it a try. Just wish I had more time............
Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top