diff --git a/2.x/trunk/phlib/include/treenewp.h b/2.x/trunk/phlib/include/treenewp.h index 5ac69417e..b9ae08f25 100644 --- a/2.x/trunk/phlib/include/treenewp.h +++ b/2.x/trunk/phlib/include/treenewp.h @@ -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; diff --git a/2.x/trunk/phlib/treenew.c b/2.x/trunk/phlib/treenew.c index 839bb1df0..c7812ea0d 100644 --- a/2.x/trunk/phlib/treenew.c +++ b/2.x/trunk/phlib/treenew.c @@ -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(