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:
wj32
2011-08-16 03:36:41 +00:00
parent 7ec7c16933
commit bf92f7c007
2 changed files with 6 additions and 9 deletions
-1
View File
@@ -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;
+6 -8
View File
@@ -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(