123 references to DRAW_TEXT_FORMAT
System.Windows.Forms (62)
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (6)
500
DRAW_TEXT_FORMAT
flags =
DRAW_TEXT_FORMAT
.DT_WORDBREAK |
DRAW_TEXT_FORMAT
.DT_EDITCONTROL;
504
flags |=
DRAW_TEXT_FORMAT
.DT_HIDEPREFIX;
509
flags |=
DRAW_TEXT_FORMAT
.DT_RTLREADING;
510
flags |=
DRAW_TEXT_FORMAT
.DT_RIGHT;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (8)
1908
DRAW_TEXT_FORMAT
format =
DRAW_TEXT_FORMAT
.DT_EDITCONTROL |
DRAW_TEXT_FORMAT
.DT_EXPANDTABS |
DRAW_TEXT_FORMAT
.DT_NOCLIP
1909
|
DRAW_TEXT_FORMAT
.DT_SINGLELINE |
DRAW_TEXT_FORMAT
.DT_NOPREFIX;
1913
format |=
DRAW_TEXT_FORMAT
.DT_RIGHT |
DRAW_TEXT_FORMAT
.DT_RTLREADING;
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (4)
140
DRAW_TEXT_FORMAT
.DT_LEFT |
DRAW_TEXT_FORMAT
.DT_VCENTER |
DRAW_TEXT_FORMAT
.DT_END_ELLIPSIS |
DRAW_TEXT_FORMAT
.DT_NOPREFIX);
System\Windows\Forms\Rendering\TextExtensions.cs (19)
19
private static void ValidateFlags(
DRAW_TEXT_FORMAT
flags)
25
private static (
DRAW_TEXT_FORMAT
Flags, TextPaddingOptions Padding) SplitTextFormatFlags(TextFormatFlags flags)
29
return ((
DRAW_TEXT_FORMAT
)flags, TextPaddingOptions.GlyphOverhangPadding);
33
DRAW_TEXT_FORMAT
windowsGraphicsSupportedFlags = (
DRAW_TEXT_FORMAT
)((uint)flags & ~GdiUnsupportedFlagMask);
63
(
DRAW_TEXT_FORMAT
dt, TextPaddingOptions padding) = SplitTextFormatFlags(flags);
155
DRAW_TEXT_FORMAT
flags,
161
bool isTop = !flags.HasFlag(
DRAW_TEXT_FORMAT
.DT_BOTTOM) && !flags.HasFlag(
DRAW_TEXT_FORMAT
.DT_VCENTER);
162
if (isTop || flags.HasFlag(
DRAW_TEXT_FORMAT
.DT_SINGLELINE) || flags.HasFlag(
DRAW_TEXT_FORMAT
.DT_CALCRECT))
170
flags |=
DRAW_TEXT_FORMAT
.DT_CALCRECT;
182
if (flags.HasFlag(
DRAW_TEXT_FORMAT
.DT_VCENTER))
217
(
DRAW_TEXT_FORMAT
dt, TextPaddingOptions padding) = SplitTextFormatFlags(flags);
252
if (proposedSize.Height == int.MaxValue && dt.HasFlag(
DRAW_TEXT_FORMAT
.DT_SINGLELINE))
255
dt &= ~(
DRAW_TEXT_FORMAT
.DT_BOTTOM |
DRAW_TEXT_FORMAT
.DT_VCENTER);
261
dt &= ~(
DRAW_TEXT_FORMAT
.DT_WORDBREAK);
264
dt |=
DRAW_TEXT_FORMAT
.DT_CALCRECT;
System\Windows\Forms\Rendering\TextFormatFlags.cs (22)
14
Bottom = (int)
DRAW_TEXT_FORMAT
.DT_BOTTOM,
15
EndEllipsis = (int)
DRAW_TEXT_FORMAT
.DT_END_ELLIPSIS,
16
ExpandTabs = (int)
DRAW_TEXT_FORMAT
.DT_EXPANDTABS,
17
ExternalLeading = (int)
DRAW_TEXT_FORMAT
.DT_EXTERNALLEADING,
19
HidePrefix = (int)
DRAW_TEXT_FORMAT
.DT_HIDEPREFIX,
20
HorizontalCenter = (int)
DRAW_TEXT_FORMAT
.DT_CENTER,
21
Internal = (int)
DRAW_TEXT_FORMAT
.DT_INTERNAL,
26
Left = (int)
DRAW_TEXT_FORMAT
.DT_LEFT,
29
ModifyString = (int)
DRAW_TEXT_FORMAT
.DT_MODIFYSTRING,
30
NoClipping = (int)
DRAW_TEXT_FORMAT
.DT_NOCLIP,
31
NoPrefix = (int)
DRAW_TEXT_FORMAT
.DT_NOPREFIX,
32
NoFullWidthCharacterBreak = (int)
DRAW_TEXT_FORMAT
.DT_NOFULLWIDTHCHARBREAK,
33
PathEllipsis = (int)
DRAW_TEXT_FORMAT
.DT_PATH_ELLIPSIS,
34
PrefixOnly = (int)
DRAW_TEXT_FORMAT
.DT_PREFIXONLY,
35
Right = (int)
DRAW_TEXT_FORMAT
.DT_RIGHT,
36
RightToLeft = (int)
DRAW_TEXT_FORMAT
.DT_RTLREADING,
37
SingleLine = (int)
DRAW_TEXT_FORMAT
.DT_SINGLELINE,
38
TextBoxControl = (int)
DRAW_TEXT_FORMAT
.DT_EDITCONTROL,
43
Top = (int)
DRAW_TEXT_FORMAT
.DT_TOP,
45
VerticalCenter = (int)
DRAW_TEXT_FORMAT
.DT_VCENTER,
46
WordBreak = (int)
DRAW_TEXT_FORMAT
.DT_WORDBREAK,
47
WordEllipsis = (int)
DRAW_TEXT_FORMAT
.DT_WORD_ELLIPSIS,
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (3)
396
(
DRAW_TEXT_FORMAT
)flags,
671
(
DRAW_TEXT_FORMAT
)flags,
694
(
DRAW_TEXT_FORMAT
)flags,
System.Windows.Forms.Design (1)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
187
PInvoke.DrawText(hdc, t, Text.Length, ref rect,
DRAW_TEXT_FORMAT
.DT_CALCRECT);
System.Windows.Forms.Primitives (14)
Windows.Win32.PInvoke.USER32.dll.g.cs (6)
739
/// <inheritdoc cref="DrawText(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.PCWSTR, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
)"/>
741
internal static unsafe int DrawText(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PCWSTR lpchText, int cchText, ref winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
format)
769
internal static extern unsafe int DrawText(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PCWSTR lpchText, int cchText, winmdroot.Foundation.RECT* lprc, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
format);
771
/// <inheritdoc cref="DrawTextEx(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.PWSTR, int, winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
, winmdroot.Graphics.Gdi.DRAWTEXTPARAMS*)"/>
773
internal static unsafe int DrawTextEx(winmdroot.Graphics.Gdi.HDC hdc, ref Span<char>lpchText, int cchText, ref winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
format, winmdroot.Graphics.Gdi.DRAWTEXTPARAMS? lpdtp)
809
internal static extern unsafe int DrawTextEx(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.PWSTR lpchText, int cchText, winmdroot.Foundation.RECT* lprc, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
format, [Optional] winmdroot.Graphics.Gdi.DRAWTEXTPARAMS* lpdtp);
Windows.Win32.PInvoke.UXTHEME.dll.g.cs (6)
168
/// <inheritdoc cref="DrawThemeText(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.PCWSTR, int, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
, uint, winmdroot.Foundation.RECT*)"/>
170
internal static unsafe winmdroot.Foundation.HRESULT DrawThemeText(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, string pszText, int cchText, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
dwTextFlags, uint dwTextFlags2, in winmdroot.Foundation.RECT pRect)
225
internal static extern unsafe winmdroot.Foundation.HRESULT DrawThemeText(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.PCWSTR pszText, int cchText, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
dwTextFlags, uint dwTextFlags2, winmdroot.Foundation.RECT* pRect);
976
/// <inheritdoc cref="GetThemeTextExtent(winmdroot.UI.Controls.HTHEME, winmdroot.Graphics.Gdi.HDC, int, int, winmdroot.Foundation.PCWSTR, int, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
, winmdroot.Foundation.RECT*, winmdroot.Foundation.RECT*)"/>
978
internal static unsafe winmdroot.Foundation.HRESULT GetThemeTextExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, string pszText, int cchCharCount, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
dwTextFlags, winmdroot.Foundation.RECT? pBoundingRect, out winmdroot.Foundation.RECT pExtentRect)
1036
internal static extern unsafe winmdroot.Foundation.HRESULT GetThemeTextExtent(winmdroot.UI.Controls.HTHEME hTheme, winmdroot.Graphics.Gdi.HDC hdc, int iPartId, int iStateId, winmdroot.Foundation.PCWSTR pszText, int cchCharCount, winmdroot.Graphics.Gdi.
DRAW_TEXT_FORMAT
dwTextFlags, [Optional] winmdroot.Foundation.RECT* pBoundingRect, winmdroot.Foundation.RECT* pExtentRect);
Windows\Win32\PInvoke.DrawTextEx.cs (2)
8
/// <inheritdoc cref="DrawTextEx(HDC, PWSTR, int, RECT*,
DRAW_TEXT_FORMAT
, DRAWTEXTPARAMS*)"/>
13
DRAW_TEXT_FORMAT
format,
System.Windows.Forms.Tests (46)
Text\FontMetrics.cs (46)
94
{ "Arial", 9.0f, new Size(-1, -1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(173, 15) },
95
{ "Arial", 12.0f, new Size(-1, -1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(215, 18) },
96
{ "Microsoft Sans Serif", 16.0f, new Size(-1, -1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(299, 26) },
97
{ "Times New Roman", 11.0f, new Size(-1, -1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(179, 17) },
98
{ "MS Gothic", 10.0f, new Size(-1, -1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(189, 14) },
99
{ "Arial", 9.0f, new Size(0, 0), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(173, 15) },
100
{ "Arial", 12.0f, new Size(0, 0), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(215, 18) },
101
{ "Microsoft Sans Serif", 16.0f, new Size(0, 0), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(299, 26) },
102
{ "Times New Roman", 11.0f, new Size(0, 0), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(179, 17) },
103
{ "MS Gothic", 10.0f, new Size(0, 0), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(189, 14) },
104
{ "Arial", 9.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(173, 15) },
105
{ "Arial", 12.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(215, 18) },
106
{ "Microsoft Sans Serif", 16.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(299, 26) },
107
{ "Times New Roman", 11.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(179, 17) },
108
{ "MS Gothic", 10.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(189, 14) },
109
{ "Arial", 9.0f, new Size(300, 300), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(173, 15) },
110
{ "Arial", 12.0f, new Size(300, 300), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(215, 18) },
111
{ "Microsoft Sans Serif", 16.0f, new Size(300, 300), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(299, 26) },
112
{ "Times New Roman", 11.0f, new Size(300, 300), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(179, 17) },
113
{ "MS Gothic", 10.0f, new Size(300, 300), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(189, 14) },
114
{ "Arial", 9.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(173, 15) },
115
{ "Arial", 12.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(215, 18) },
116
{ "Microsoft Sans Serif", 16.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(299, 26) },
117
{ "Times New Roman", 11.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(179, 17) },
118
{ "MS Gothic", 10.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Size(189, 14) },
119
{ "Arial", 9.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(173, 15) },
120
{ "Arial", 12.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(215, 18) },
121
{ "Microsoft Sans Serif", 16.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(299, 26) },
122
{ "Times New Roman", 11.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(179, 17) },
123
{ "MS Gothic", 10.0f, new Size(1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(189, 14) },
124
{ "Arial", 9.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(173, 15) },
125
{ "Arial", 12.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(215, 18) },
126
{ "Microsoft Sans Serif", 16.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(299, 26) },
127
{ "Times New Roman", 11.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(179, 17) },
128
{ "MS Gothic", 10.0f, new Size(int.MaxValue, int.MaxValue), (uint)
DRAW_TEXT_FORMAT
.DT_SINGLELINE, new Size(189, 14) },
150
(
DRAW_TEXT_FORMAT
)dt,
158
{ "Arial", 9.0f, new Rectangle(1, 1, 1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 1, 1, 1) },
159
{ "Arial", 12.0f, new Rectangle(1, 1, 1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 1, 1, 1) },
160
{ "Microsoft Sans Serif", 16.0f, new Rectangle(1, 1, 1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 1, 1, 1) },
161
{ "Times New Roman", 11.0f, new Rectangle(1, 1, 1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 1, 1, 1) },
162
{ "MS Gothic", 10.0f, new Rectangle(1, 1, 1, 1), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 1, 1, 1) },
163
{ "Arial", 9.0f, new Rectangle(1, 1, 100, 100), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 86, 100, 100) },
164
{ "Arial", 12.0f, new Rectangle(1, 1, 100, 100), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 83, 100, 100) },
165
{ "Microsoft Sans Serif", 16.0f, new Rectangle(1, 1, 100, 100), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 75, 100, 100) },
166
{ "Times New Roman", 11.0f, new Rectangle(1, 1, 100, 100), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 84, 100, 100) },
167
{ "MS Gothic", 10.0f, new Rectangle(1, 1, 100, 100), (uint)
DRAW_TEXT_FORMAT
.DT_BOTTOM, new Rectangle(1, 87, 100, 100) },