S
Sebastien Lange
Hi,
I'd like to implement In-place tooltip for some controls/area within my
application.
For example, listbox or treeview.
The following doc explains what it is, and almost how to do it:
http://msdn.microsoft.com/library/d...c/platform/commctls/tooltip/usingtooltips.asp
case TTN_SHOW:
if (fMyStringIsTruncated) {
RECT rc;
GetMyItemRect(&rc);
SendMessage(hwndToolTip, TTM_ADJUSTRECT, TRUE, (LPARAM)&rc);
SetWindowPos(hwndToolTip,
NULL,
rc.left, rc.top,
0, 0,
SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
}
But I don't know where to put this code? In the WndProc of the form
container, or the control itself?
I tried with both solutions, but nothing works. If I'm using Windows Forms
Tooltip component, how can I get the handle of the tooltip? Or maybe should
I create the tooltip myself?
Any C# sample (or VB.NET) is appreciated.
Thanks,
Sebastien
I'd like to implement In-place tooltip for some controls/area within my
application.
For example, listbox or treeview.
The following doc explains what it is, and almost how to do it:
http://msdn.microsoft.com/library/d...c/platform/commctls/tooltip/usingtooltips.asp
case TTN_SHOW:
if (fMyStringIsTruncated) {
RECT rc;
GetMyItemRect(&rc);
SendMessage(hwndToolTip, TTM_ADJUSTRECT, TRUE, (LPARAM)&rc);
SetWindowPos(hwndToolTip,
NULL,
rc.left, rc.top,
0, 0,
SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
}
But I don't know where to put this code? In the WndProc of the form
container, or the control itself?
I tried with both solutions, but nothing works. If I'm using Windows Forms
Tooltip component, how can I get the handle of the tooltip? Or maybe should
I create the tooltip myself?
Any C# sample (or VB.NET) is appreciated.
Thanks,
Sebastien