🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

EDITTEXT Controls

Started by
0 comments, last by UraniumRod 24 years, 6 months ago
I was just wondering if any one out there could tell me how to send and recieve text from a EDITTEXT control in a windows dialog based program. Thanks.
------------------------------"My sword is like a menacing cloud, but instead of rain, blood will pour in its path." - Sehabeddin, Turkish Military Commander 1438.
Advertisement
If you mean set and get the text from a normal text box on a Dialog Box in pure Win32 (no MFC) then here is how...

Getting text:

char Buffer[255];
GetDlgItemText(hDlg, TXT_MYTEXT, (char*)&Buffer, sizeof(Buffer));

-------------------------------------
Setting text:
SetDlgItemText(hDlg, TXT_MYTEXT, "This goes into the control");

(These both assume hDlg is the HWND of your dialog, and that TXT_MYTEXT is the resource ID of your text box)

Hope this helps

Steve Vallis

This topic is closed to new replies.

Advertisement