Skip to content

Commit 1c57301

Browse files
committed
Fix changing searchbox banner text
1 parent f189b16 commit 1c57301

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ProcessHacker/searchbox.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ LRESULT CALLBACK PhpSearchWndSubclassProc(
719719
DrawText(
720720
bufferDc,
721721
context->CueBannerText->Buffer,
722-
(UINT)context->CueBannerText->Length / 2,
722+
(UINT)context->CueBannerText->Length / sizeof(WCHAR),
723723
&clientRect,
724724
DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_NOCLIP
725725
);
@@ -789,6 +789,15 @@ LRESULT CALLBACK PhpSearchWndSubclassProc(
789789
return 1;
790790
}
791791
break;
792+
case EM_SETCUEBANNER:
793+
{
794+
PWSTR text = (PWSTR)lParam;
795+
796+
PhMoveReference(&context->CueBannerText, PhCreateString(text));
797+
798+
RedrawWindow(hWnd, NULL, NULL, RDW_FRAME | RDW_INVALIDATE);
799+
}
800+
return TRUE;
792801
}
793802

794803
return CallWindowProc(oldWndProc, hWnd, uMsg, wParam, lParam);

0 commit comments

Comments
 (0)