Getting text from a text field - RealWorld forums

Log-in or register.

Getting text from a text field

canadian_coder
on June 27th 2006

Hi Folks;

As you might have guessed I'm pretty new to the whole Win32 programming so bear with me.

I have an application that produces a number of text fields, drop-down lists and a couple buttons. In this thread I'm hoping to find someone who knows how I can get text from a text field (or could point me to some examples or a list of functions).

Thanks!

Vlasta
on June 28th 2006

The basic way in Win32 is to send a WM_GETTEXT message to the text field. It may look like this:

TCHAR buffer[100];
SendMessage(handleToYourTextBox, WM_GETTEXT, 100, (LPARAM)buffer);

If you are using something like MFC, WTL, or .NET Framework, there also is another way specific for your framework.

Page views: 9889       Posts: 2      
Vista & Win 7 icons
I wish there were...
What about ICL files?