Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds a standard icon and title string to a tooltip.
wParam
Set wParam to one of the following values to specify the icon to be displayed. As of Windows Vista and later, this parameter can also contain an HICON value. Any value greater than TTI_ERROR_LARGE is assumed to be an HICON.
Value | Meaning |
---|---|
|
No icon. |
|
Info icon. |
|
Warning icon |
|
Error Icon |
|
Large error Icon |
|
Large error Icon |
|
Large error Icon |
lParam
Pointer to the title string. You must assign a value to lParam.
Returns TRUE if successful, FALSE if not.
The title of a tooltip appears above the text, in a different font. It is not sufficient to have a title; the tooltip must have text as well, or it is not displayed.
When wParam contains an HICON, a copy of the icon is created by the tooltip window.
When calling TTM_SETTITLE, the string pointed to by lParam must not exceed 100 TCHARs in length, including the terminating NULL.
The following example shows how to add a title and a system icon to a tooltip.
// hwndTip is the handle of the tooltip window.
HICON hIcon = LoadIcon(NULL, IDI_INFORMATION);
SendMessage(hwndTip, TTM_SETTITLE, (WPARAM)hIcon, L"Title text");
DestroyIcon(hIcon);
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
Header |
|
Unicode and ANSI names |
TTM_SETTITLEW (Unicode) and TTM_SETTITLEA (ANSI) |
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!