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!

dcPrint????????

Status
Not open for further replies.

kohm1

Programmer
Jul 20, 2003
2
0
0
US
I would like to understand how you can print the string from an edit box using dcPrint?

Example: dcPrint.TextOut(50,150,Editbox string here);

anyhelp greatly appreciated
ThankYou in advance.


 
What you have to do is get the string from the edit box. This is pretty simple, but can be different depending on whether you are using the edit box as a normal control or in a normal resource dialog.
If the edit box is being used simply as a normal control, you would do something similar to this:

CClientDC dcPrint(this);
CString str;
// the name of your edit box is MyEditBox
MyEditBox.GetWindowText(str);
dcPrint.TextOut(50,150,str);

Hope that helps!

-Bones
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top