Gdi32ExtTextOut(IntPtr, Int32, Int32, ExtTextOutOptions, Rectangle, String, UInt32, Int32) Method

Draws text using the currently selected font, background color, and text color.

You can optionally provide dimensions to be used for clipping, opaquing, or both.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll", EntryPoint = "ExtTextOutW")]
public static bool ExtTextOut(
	IntPtr hdc,
	int x,
	int y,
	ExtTextOutOptions options,
	in Rectangle rect,
	string text,
	uint count,
	int[] dx
)

Parameters

hdc  IntPtr
A handle to the device context.
x  Int32
The x-coordinate, in logical coordinates, of the reference point used to position the string.
y  Int32
The y-coordinate, in logical coordinates, of the reference point used to position the string.
options  ExtTextOutOptions
Specifies how to use the application-defined rectangle.
rect  Rectangle
A pointer to an optional NativeRectangle structure that specifies the dimensions, in logical coordinates, of a rectangle that is used for clipping, opaquing, or both.
text  String
A pointer to a string that specifies the text to be drawn.

The string does not need to be zero-terminated, since cbCount specifies the length of the string.

count  UInt32
The length of the string pointed to by text parameter.

This value may not exceed 8192.

dx  Int32
A pointer to an optional array of values that indicate the distance between origins of adjacent character cells.

For example, dx[i] logical units separate the origins of character cell i and character cell i + 1.

Return Value

Boolean
If the string is drawn, the return value is .

If the function fails, the return value is .

Remarks

See Also