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

GetWindowText does not work

Status
Not open for further replies.

sumedha

Programmer
Apr 12, 2000
15
LK
hi,
the following function does not return the text in a edit box control. Anyone know any other way to get the text in an edit box control? I'm not using MFC. "SetWindowText" works fine, only "GetWindowText" does not work.

int GetWindowText(
HWND hWnd, // handle to window or control
LPTSTR lpString, // text buffer
int nMaxCount // maximum number of characters to copy
);
-=$umedha=-
 
I recall seeing something like this. Look into Invalidate. I seem to remember this getting the data properly.

Matt
 
If you are working in an MFC environment, you must call the function UpdateData(), before reading the modifications from a text box.

Hope this helps, s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
This function cannot retrieve the text of an edit control in another application. Use WM_GETTEXT message instead.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top