flat assembler
Message board for the users of flat assembler.
Index
> Windows > WM_GETTEXT |
Author |
|
vbVeryBeginner 20 Nov 2004, 05:10
The DefWindowProc function copies the text associated with the window into the specified buffer and returns the number of characters copied. Note, for non-text static controls this gives you the text with which the control was originally created, that is, the ID number. However, it gives you the ID of the non-text static control as originally created. That is, if you subsequently used a STM_SETIMAGE to change it the original ID would still be returned.
For an edit control, the text to be copied is the content of the edit control. For a combo box, the text is the content of the edit control (or static-text) portion of the combo box. For a button, the text is the button name. For other windows, the text is the window title. To copy the text of an item in a list box, an application can use the LB_GETTEXT message. When the WM_GETTEXT message is sent to a static control with the SS_ICON style, a handle to the icon will be returned in the first four bytes of the buffer pointed to by lParam. This is true only if the WM_SETTEXT message has been used to set the icon. Rich Edit: If the text to be copied exceeds 64K, use either the EM_STREAMOUT or EM_GETSELTEXT message. Windows 2000: Sending a WM_GETTEXT message to a non-text static control, such as a static bitmap or static icon control, does not return a string value. Instead, it returns zero. In addition, in previous versions of Windows and Windows NT, applications could send a WM_GETTEXT message to a non-text static control to retrieve the control's ID. To retrieve a control's ID in Windows 2000, applications can use GetWindowLong passing GWL_ID as the index value or GetWindowLongPtr using GWLP_ID. copied from PSDK 2000 (July Edition) |
|||
20 Nov 2004, 05:10 |
|
mike.dld 20 Nov 2004, 10:46
Win32 Programmer's Reference wrote: The GetWindowText function copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is a control, the text of the control is copied. |
|||
20 Nov 2004, 10:46 |
|
vbVeryBeginner 21 Nov 2004, 10:51
like subject
|
|||||||||||
21 Nov 2004, 10:51 |
|
Hicel 21 Nov 2004, 14:25
Many Many Thanks to both of you!!
But what does 0xFE mean?? |
|||
21 Nov 2004, 14:25 |
|
vbVeryBeginner 21 Nov 2004, 14:51
it just some reserved byte for the edit buffer
i guess you could change it to 0xFF |
|||
21 Nov 2004, 14:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.