Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3445,17 +3445,21 @@ protected override unsafe void WndProc(ref Message m)
// Paint the background
g.FillRectangle(SystemBrushes.ControlDark, ClientRectangle);

RECT formattingRect = default;
PInvokeCore.SendMessage(this, PInvokeCore.EM_GETRECT, (WPARAM)0, ref formattingRect);
Rectangle textBounds = formattingRect;

// Paint the text
TextRenderer.DrawText(
g,
Text,
Font,
ClientRectangle,
textBounds,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use ClientRectangle? I think what really makes a difference is the modification to TextFormatFlags.EndEllipsis, because it indicates that when the text is too long, it will no longer be omitted with "...".

SystemColors.GrayText,
TextFormatFlags.Left
| TextFormatFlags.Top
| TextFormatFlags.WordBreak
| TextFormatFlags.EndEllipsis);
| TextFormatFlags.TextBoxControl);

return;
}
Expand Down
Loading