Skip to content

Commit

Permalink
Update treenew.c
Browse files Browse the repository at this point in the history
  • Loading branch information
dmex committed Oct 17, 2024
1 parent f34bd11 commit 2ee7995
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions phlib/treenew.c
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,7 @@ LONG PhTnpInsertColumnHeader(
memset(&item, 0, sizeof(HDITEM));
item.mask = HDI_WIDTH | HDI_TEXT | HDI_FORMAT | HDI_LPARAM | HDI_ORDER;
item.cxy = Column->Width;
item.pszText = Column->Text;
item.pszText = (PWSTR)Column->Text;
item.fmt = 0;
item.lParam = (LPARAM)Column;

Expand Down Expand Up @@ -3009,7 +3009,7 @@ VOID PhTnpChangeColumnHeader(
if (Mask & TN_COLUMN_TEXT)
{
item.mask |= HDI_TEXT;
item.pszText = Column->Text;
item.pszText = (PWSTR)Column->Text;
}

if (Mask & TN_COLUMN_WIDTH)
Expand Down Expand Up @@ -3358,7 +3358,7 @@ VOID PhTnpAutoSizeColumnHeader(
// Check the column header text width.
if (Column->Text)
{
PWSTR text;
PCWSTR text;
SIZE_T textCount;
HDC hdc;
SIZE textSize;
Expand Down Expand Up @@ -6535,7 +6535,7 @@ BOOLEAN PhTnpGetHeaderTooltipText(
LOGICAL result;
PPH_TREENEW_COLUMN column;
RECT itemRect;
PWSTR text;
PCWSTR text;
SIZE_T textCount;
HFONT oldFont;
HDC hdc;
Expand Down Expand Up @@ -6731,12 +6731,12 @@ BOOLEAN TnHeaderCustomPaint(
if (column->Text)
{
PWSTR textBuffer;
INT textLength;
LONG textLength;
RECT textRect;
HFONT oldFont;
PH_STRINGREF headerString;
ULONG fmt = 0;
INT sdf = 0;
LONG sdf = 0;

if (FlagOn(column->Alignment, PH_ALIGN_LEFT))
SetFlag(fmt, HDF_LEFT);
Expand All @@ -6758,8 +6758,8 @@ BOOLEAN TnHeaderCustomPaint(
sdf = HSAS_SORTEDUP;
}

textBuffer = column->Text;
textLength = (INT)PhCountStringZ(column->Text);
textBuffer = (PWSTR)column->Text;
textLength = (LONG)PhCountStringZ(column->Text);

textRect = CustomDraw->rc;
textRect.left += PhGetDpi(5, Context->WindowDpi);
Expand Down Expand Up @@ -6790,7 +6790,7 @@ BOOLEAN TnHeaderCustomPaint(
DrawText(
CustomDraw->hdc,
headerString.Buffer,
(INT)headerString.Length / (INT)sizeof(WCHAR),
(LONG)headerString.Length / (LONG)sizeof(WCHAR),
&textRect,
DT_SINGLELINE | DT_HIDEPREFIX | DT_WORD_ELLIPSIS | DT_TOP | DT_RIGHT);
if (oldFont) SelectFont(CustomDraw->hdc, oldFont);
Expand Down

0 comments on commit 2ee7995

Please sign in to comment.