PRB: Sending a WM_GETTEXT Does Not Return a String for Non-Text Static ControlsID: Q226323
|
BETA INFORMATION BETA INFORMATION BETA INFORMATION |
This article discusses a Beta release of a Microsoft product. The
information in this article is provided as-is and is subject to change
without notice. |
BETA INFORMATION BETA INFORMATION BETA INFORMATION |
The behavior of non-text-mode static controls (for example, SS_BITMAP, SS_ICON, and so forth, styles are set) was changed in Windows 2000 so that WM_GETTEXT does not return a string. In addition, WM_GETTEXTLENGTH also returns zero for these types of controls.
This behavior is by design.
In earlier versions of Windows and Windows NT, applications send a WM_GETTEXT message to a non-text static control to retrieve the control's ID.
Applications can use GetWindowLong, passing GWL_ID as the index value, or GetWindowLongPtr, using GWLP_ID to retrieve a control's ID.
Additional query words: WM_GETTEXT WM_GETTEXTLENGTH GetWindowText GetWindowTextLength static control
Keywords : kbWinOS2000 kbSDKPlatform kbStaticCtrl kbGrpUser
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 30, 1999