mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
fixed treenew tooltip maximum width
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4460 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -125,7 +125,6 @@ typedef struct _PH_TREENEW_CONTEXT
|
||||
RECT TooltipRect; // text rectangle of an unfolding tooltip
|
||||
HFONT TooltipFont;
|
||||
HFONT NewTooltipFont;
|
||||
ULONG NewTooltipMaximumWidth;
|
||||
ULONG TooltipColumnId;
|
||||
WNDPROC FixedHeaderOldWndProc;
|
||||
WNDPROC HeaderOldWndProc;
|
||||
|
||||
@@ -5547,7 +5547,10 @@ VOID PhTnpGetTooltipText(
|
||||
if (!Context->NewTooltipFont)
|
||||
Context->NewTooltipFont = Context->Font;
|
||||
|
||||
Context->NewTooltipMaximumWidth = getCellTooltip.MaximumWidth;
|
||||
if (getCellTooltip.MaximumWidth <= MAXSHORT) // seems to be the maximum value that the tooltip control supports
|
||||
SendMessage(Context->TooltipsHandle, TTM_SETMAXTIPWIDTH, 0, getCellTooltip.MaximumWidth);
|
||||
else
|
||||
SendMessage(Context->TooltipsHandle, TTM_SETMAXTIPWIDTH, 0, MAXSHORT);
|
||||
}
|
||||
|
||||
if (Context->TooltipText)
|
||||
@@ -5566,11 +5569,6 @@ BOOLEAN PhTnpPrepareTooltipShow(
|
||||
SendMessage(Context->TooltipsHandle, WM_SETFONT, (WPARAM)Context->TooltipFont, FALSE);
|
||||
}
|
||||
|
||||
if (Context->NewTooltipMaximumWidth <= MAXSHORT) // seems to be the maximum value that the tooltip control supports
|
||||
SendMessage(Context->TooltipsHandle, TTM_SETMAXTIPWIDTH, 0, Context->NewTooltipMaximumWidth);
|
||||
else
|
||||
SendMessage(Context->TooltipsHandle, TTM_SETMAXTIPWIDTH, 0, MAXSHORT);
|
||||
|
||||
if (!Context->TooltipUnfolding)
|
||||
{
|
||||
SetWindowPos(
|
||||
@@ -5723,10 +5721,10 @@ VOID PhTnpGetHeaderTooltipText(
|
||||
|
||||
*Text = Context->TooltipText->Buffer;
|
||||
|
||||
// Always use the default font for column header tooltips.
|
||||
// Always use the default parameters for column header tooltips.
|
||||
Context->NewTooltipFont = Context->Font;
|
||||
Context->NewTooltipMaximumWidth = TNP_TOOLTIPS_DEFAULT_MAXIMUM_WIDTH;
|
||||
Context->TooltipUnfolding = FALSE;
|
||||
SendMessage(Context->TooltipsHandle, TTM_SETMAXTIPWIDTH, 0, TNP_TOOLTIPS_DEFAULT_MAXIMUM_WIDTH);
|
||||
}
|
||||
|
||||
PWSTR PhTnpMakeContextAtom(
|
||||
|
||||
Reference in New Issue
Block a user