View Full Version : C / C++ Newbies...
15 Sep 2002, 08:37 PM
I've noticed quite a few C/C++ newbies making posts here, including myself.
I have several books, but none of them answer a simple question - how can I read the contents of a textbox?
I think it would be really nice if someone could make a sample plugin that excersized creating dialogs (or rather just opening them), retrieving and saving preferences, etc.
15 Sep 2002, 09:25 PM
[in] Handle to the dialog box that contains the control. nIDDlgItem
[in] Specifies the identifier of the control whose title or text is to be retrieved.
[out] Long pointer to the buffer to receive the title or text.
[in] Specifies the maximum length, in characters, of the string to be copied to the buffer pointed to by lpString. If the length of the string exceeds the limit, the string is truncated.
The number of characters copied to the buffer, not including the terminating null character, indicates success. Zero indicates failure. To get extended error information, call GetLastError.
The GetDlgItemText function sends a WM_GETTEXT message to the control.
15 Sep 2002, 09:32 PM
Or if you are using the edit box control...
send the EM_GETLINE message w/SendMessage
15 Sep 2002, 10:48 PM
GetDlgItemText will retrieve the text from the edit's as well. EM_GETLINE will only retrieve a single line if the edit is multi-line.
16 Sep 2002, 06:07 AM
this one is really interesting i tink http://www.winprog.org/tutorial/
vBulletin® v3.8.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.