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

edit box

Status
Not open for further replies.

oaquao

Programmer
May 16, 2001
12
US
I have an MFC dialog based application, I have two forms and when I click a button on the first form I want to set the text of an edit box on the second form to a variable.
scoreDlg.DoModal();//second form
m_editScore.SetWindowText(score);//edit box on second form

Thanks for any help
oaquao
 
If m_editScore is a variable for the edit box you mapped with class wizard, just set it like this:

scoreDlg.m_editScore = "Some value";
scoreDlg.DoModal();

The framework handles the rest. :) Hope that this helped! ;-)
 
Yes, it did it works perfect.

Thank you,
oaquao
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top