|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| -
| Header File
| winuser.h
| Unicode
| No
| Platform Notes
| None
|
|
|
WM_SETTEXT
An application sends a WM_SETTEXT message to set the text of a window.
WM_SETTEXT
wParam = 0; // not used; must be zero
lParam = (LPARAM)(LPCTSTR)lpsz; // address of window-text string
Parameters
lpsz
Value of lParam. Points to a null-terminated string that is the window text.
Return Values
The return value is TRUE if the text is set. It is FALSE (for an edit
control), LB_ERRSPACE (for a list box), or CB_ERRSPACE (for a combo box) if
insufficient space is available to set the text in the edit control. It is CB_ERR if this
message is sent to a combo box without an edit control.
Default Action
The DefWindowProc function sets and displays the window text.
Remarks
For an edit control, the text is the contents of the edit control. For a combo
box, the text is the contents of the edit-control portion of the combo box.
For a button, the text is the button name. For other windows, the text is the
window title.
This message does not change the current selection in the list box of a combo
box. An application should use the CB_SELECTSTRING message to select the item
in a list box that matches the text in the edit control.
See Also
DefWindowProc, CB_SELECTSTRING, WM_GETTEXT
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|