DrawTextExW
関数シグネチャ
// USER32.dll (Unicode / -W)
#include <windows.h>
INT DrawTextExW(
HDC hdc,
LPWSTR lpchText,
INT cchText,
RECT* lprc,
DRAW_TEXT_FORMAT format,
DRAWTEXTPARAMS* lpdtp // optional
);パラメーター
| 名前 | 型 | 方向 | 説明 | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hdc | HDC | in | 描画先のデバイスコンテキストへのハンドル。 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| lpchText | LPWSTR | inout | 描画するテキストを含む文字列へのポインター。cchText パラメーターが -1 の場合、この文字列は null 終端である必要があります。 dwDTFormat に DT_MODIFYSTRING が含まれている場合、この関数はこの文字列に最大 4 文字を追加することがあります。文字列を格納するバッファーは、これらの追加文字を収容できるだけの十分な大きさである必要があります。 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| cchText | INT | in | lpchText が指す文字列の長さ。cchText が -1 の場合、lpchText パラメーターは null 終端文字列へのポインターであると見なされ、DrawTextEx は文字数を自動的に計算します。 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| lprc | RECT* | inout | テキストを書式設定する四角形を論理座標で含む RECT 構造体へのポインター。 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| format | DRAW_TEXT_FORMAT | in | 書式設定オプション。このパラメーターには次の値を 1 つ以上指定できます。
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| lpdtp | DRAWTEXTPARAMS* | inoptional | 追加の書式設定オプションを指定する DRAWTEXTPARAMS 構造体へのポインター。このパラメーターは NULL でもかまいません。 |
戻り値の型: INT
公式ドキュメント
DrawTextEx 関数は、指定した四角形内に書式付きテキストを描画します。(Unicode)
戻り値
関数が成功した場合、戻り値はテキストの高さ(論理単位)です。DT_VCENTER または DT_BOTTOM が指定されている場合、戻り値は lprc->top から描画されたテキストの下端までのオフセットです。
関数が失敗した場合、戻り値は 0 です。
解説(Remarks)
DrawTextEx 関数は、エスケープメント(escapement)と向き(orientation)がいずれも 0 であるフォントのみをサポートします。
デバイスコンテキストのテキスト配置モードには、TA_LEFT、TA_TOP、TA_NOUPDATECP の各フラグが含まれている必要があります。
winuser.h ヘッダーは DrawTextEx を、UNICODE プリプロセッサ定数の定義に基づいてこの関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして定義します。エンコーディング中立のエイリアスの使用と、エンコーディング中立でないコードを混在させると、コンパイルエラーや実行時エラーを引き起こす不一致につながる可能性があります。詳細については、関数プロトタイプの規約を参照してください。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// USER32.dll (Unicode / -W)
#include <windows.h>
INT DrawTextExW(
HDC hdc,
LPWSTR lpchText,
INT cchText,
RECT* lprc,
DRAW_TEXT_FORMAT format,
DRAWTEXTPARAMS* lpdtp // optional
);[DllImport("USER32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int DrawTextExW(
IntPtr hdc, // HDC
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpchText, // LPWSTR in/out
int cchText, // INT
IntPtr lprc, // RECT* in/out
uint format, // DRAW_TEXT_FORMAT
IntPtr lpdtp // DRAWTEXTPARAMS* optional
);<DllImport("USER32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function DrawTextExW(
hdc As IntPtr, ' HDC
<MarshalAs(UnmanagedType.LPWStr)> lpchText As System.Text.StringBuilder, ' LPWSTR in/out
cchText As Integer, ' INT
lprc As IntPtr, ' RECT* in/out
format As UInteger, ' DRAW_TEXT_FORMAT
lpdtp As IntPtr ' DRAWTEXTPARAMS* optional
) As Integer
End Function' hdc : HDC
' lpchText : LPWSTR in/out
' cchText : INT
' lprc : RECT* in/out
' format : DRAW_TEXT_FORMAT
' lpdtp : DRAWTEXTPARAMS* optional
Declare PtrSafe Function DrawTextExW Lib "user32" ( _
ByVal hdc As LongPtr, _
ByVal lpchText As LongPtr, _
ByVal cchText As Long, _
ByVal lprc As LongPtr, _
ByVal format As Long, _
ByVal lpdtp As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DrawTextExW = ctypes.windll.user32.DrawTextExW
DrawTextExW.restype = ctypes.c_int
DrawTextExW.argtypes = [
wintypes.HANDLE, # hdc : HDC
wintypes.LPWSTR, # lpchText : LPWSTR in/out
ctypes.c_int, # cchText : INT
ctypes.c_void_p, # lprc : RECT* in/out
wintypes.DWORD, # format : DRAW_TEXT_FORMAT
ctypes.c_void_p, # lpdtp : DRAWTEXTPARAMS* optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
DrawTextExW = Fiddle::Function.new(
lib['DrawTextExW'],
[
Fiddle::TYPE_VOIDP, # hdc : HDC
Fiddle::TYPE_VOIDP, # lpchText : LPWSTR in/out
Fiddle::TYPE_INT, # cchText : INT
Fiddle::TYPE_VOIDP, # lprc : RECT* in/out
-Fiddle::TYPE_INT, # format : DRAW_TEXT_FORMAT
Fiddle::TYPE_VOIDP, # lpdtp : DRAWTEXTPARAMS* optional
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "user32")]
extern "system" {
fn DrawTextExW(
hdc: *mut core::ffi::c_void, // HDC
lpchText: *mut u16, // LPWSTR in/out
cchText: i32, // INT
lprc: *mut RECT, // RECT* in/out
format: u32, // DRAW_TEXT_FORMAT
lpdtp: *mut DRAWTEXTPARAMS // DRAWTEXTPARAMS* optional
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("USER32.dll", CharSet = CharSet.Unicode)]
public static extern int DrawTextExW(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpchText, int cchText, IntPtr lprc, uint format, IntPtr lpdtp);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_DrawTextExW' -Namespace Win32 -PassThru
# $api::DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp)#uselib "USER32.dll"
#func global DrawTextExW "DrawTextExW" wptr, wptr, wptr, wptr, wptr, wptr
; DrawTextExW hdc, varptr(lpchText), cchText, varptr(lprc), format, varptr(lpdtp) ; 戻り値は stat
; hdc : HDC -> "wptr"
; lpchText : LPWSTR in/out -> "wptr"
; cchText : INT -> "wptr"
; lprc : RECT* in/out -> "wptr"
; format : DRAW_TEXT_FORMAT -> "wptr"
; lpdtp : DRAWTEXTPARAMS* optional -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll" #cfunc global DrawTextExW "DrawTextExW" sptr, var, int, var, int, var ; res = DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp) ; hdc : HDC -> "sptr" ; lpchText : LPWSTR in/out -> "var" ; cchText : INT -> "int" ; lprc : RECT* in/out -> "var" ; format : DRAW_TEXT_FORMAT -> "int" ; lpdtp : DRAWTEXTPARAMS* optional -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "USER32.dll" #cfunc global DrawTextExW "DrawTextExW" sptr, sptr, int, sptr, int, sptr ; res = DrawTextExW(hdc, varptr(lpchText), cchText, varptr(lprc), format, varptr(lpdtp)) ; hdc : HDC -> "sptr" ; lpchText : LPWSTR in/out -> "sptr" ; cchText : INT -> "int" ; lprc : RECT* in/out -> "sptr" ; format : DRAW_TEXT_FORMAT -> "int" ; lpdtp : DRAWTEXTPARAMS* optional -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; INT DrawTextExW(HDC hdc, LPWSTR lpchText, INT cchText, RECT* lprc, DRAW_TEXT_FORMAT format, DRAWTEXTPARAMS* lpdtp) #uselib "USER32.dll" #cfunc global DrawTextExW "DrawTextExW" intptr, var, int, var, int, var ; res = DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp) ; hdc : HDC -> "intptr" ; lpchText : LPWSTR in/out -> "var" ; cchText : INT -> "int" ; lprc : RECT* in/out -> "var" ; format : DRAW_TEXT_FORMAT -> "int" ; lpdtp : DRAWTEXTPARAMS* optional -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; INT DrawTextExW(HDC hdc, LPWSTR lpchText, INT cchText, RECT* lprc, DRAW_TEXT_FORMAT format, DRAWTEXTPARAMS* lpdtp) #uselib "USER32.dll" #cfunc global DrawTextExW "DrawTextExW" intptr, intptr, int, intptr, int, intptr ; res = DrawTextExW(hdc, varptr(lpchText), cchText, varptr(lprc), format, varptr(lpdtp)) ; hdc : HDC -> "intptr" ; lpchText : LPWSTR in/out -> "intptr" ; cchText : INT -> "int" ; lprc : RECT* in/out -> "intptr" ; format : DRAW_TEXT_FORMAT -> "int" ; lpdtp : DRAWTEXTPARAMS* optional -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procDrawTextExW = user32.NewProc("DrawTextExW")
)
// hdc (HDC), lpchText (LPWSTR in/out), cchText (INT), lprc (RECT* in/out), format (DRAW_TEXT_FORMAT), lpdtp (DRAWTEXTPARAMS* optional)
r1, _, err := procDrawTextExW.Call(
uintptr(hdc),
uintptr(lpchText),
uintptr(cchText),
uintptr(lprc),
uintptr(format),
uintptr(lpdtp),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction DrawTextExW(
hdc: THandle; // HDC
lpchText: PWideChar; // LPWSTR in/out
cchText: Integer; // INT
lprc: Pointer; // RECT* in/out
format: DWORD; // DRAW_TEXT_FORMAT
lpdtp: Pointer // DRAWTEXTPARAMS* optional
): Integer; stdcall;
external 'USER32.dll' name 'DrawTextExW';result := DllCall("USER32\DrawTextExW"
, "Ptr", hdc ; HDC
, "Ptr", lpchText ; LPWSTR in/out
, "Int", cchText ; INT
, "Ptr", lprc ; RECT* in/out
, "UInt", format ; DRAW_TEXT_FORMAT
, "Ptr", lpdtp ; DRAWTEXTPARAMS* optional
, "Int") ; return: INT●DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp) = DLL("USER32.dll", "int DrawTextExW(void*, char*, int, void*, dword, void*)")
# 呼び出し: DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp)
# hdc : HDC -> "void*"
# lpchText : LPWSTR in/out -> "char*"
# cchText : INT -> "int"
# lprc : RECT* in/out -> "void*"
# format : DRAW_TEXT_FORMAT -> "dword"
# lpdtp : DRAWTEXTPARAMS* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。const std = @import("std");
extern "user32" fn DrawTextExW(
hdc: ?*anyopaque, // HDC
lpchText: [*c]u16, // LPWSTR in/out
cchText: i32, // INT
lprc: [*c]RECT, // RECT* in/out
format: u32, // DRAW_TEXT_FORMAT
lpdtp: [*c]DRAWTEXTPARAMS // DRAWTEXTPARAMS* optional
) callconv(std.os.windows.WINAPI) i32;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。proc DrawTextExW(
hdc: pointer, # HDC
lpchText: ptr uint16, # LPWSTR in/out
cchText: int32, # INT
lprc: ptr RECT, # RECT* in/out
format: uint32, # DRAW_TEXT_FORMAT
lpdtp: ptr DRAWTEXTPARAMS # DRAWTEXTPARAMS* optional
): int32 {.importc: "DrawTextExW", stdcall, dynlib: "USER32.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。pragma(lib, "user32");
extern(Windows)
int DrawTextExW(
void* hdc, // HDC
wchar* lpchText, // LPWSTR in/out
int cchText, // INT
RECT* lprc, // RECT* in/out
uint format, // DRAW_TEXT_FORMAT
DRAWTEXTPARAMS* lpdtp // DRAWTEXTPARAMS* optional
);ccall((:DrawTextExW, "USER32.dll"), stdcall, Int32,
(Ptr{Cvoid}, Ptr{UInt16}, Int32, Ptr{RECT}, UInt32, Ptr{DRAWTEXTPARAMS}),
hdc, lpchText, cchText, lprc, format, lpdtp)
# hdc : HDC -> Ptr{Cvoid}
# lpchText : LPWSTR in/out -> Ptr{UInt16}
# cchText : INT -> Int32
# lprc : RECT* in/out -> Ptr{RECT}
# format : DRAW_TEXT_FORMAT -> UInt32
# lpdtp : DRAWTEXTPARAMS* optional -> Ptr{DRAWTEXTPARAMS}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。local ffi = require("ffi")
ffi.cdef[[
int32_t DrawTextExW(
void* hdc,
uint16_t* lpchText,
int32_t cchText,
void* lprc,
uint32_t format,
void* lpdtp);
]]
local user32 = ffi.load("user32")
-- user32.DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp)
-- hdc : HDC
-- lpchText : LPWSTR in/out
-- cchText : INT
-- lprc : RECT* in/out
-- format : DRAW_TEXT_FORMAT
-- lpdtp : DRAWTEXTPARAMS* optional
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
-- Unicode(-W): uint16_t* には UTF-16LE のバッファ(ffi.new("uint16_t[?]", ...))を渡す。const koffi = require('koffi');
const lib = koffi.load('USER32.dll');
const DrawTextExW = lib.func('__stdcall', 'DrawTextExW', 'int32_t', ['void *', 'uint16_t *', 'int32_t', 'void *', 'uint32_t', 'void *']);
// DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp)
// hdc : HDC -> 'void *'
// lpchText : LPWSTR in/out -> 'uint16_t *'
// cchText : INT -> 'int32_t'
// lprc : RECT* in/out -> 'void *'
// format : DRAW_TEXT_FORMAT -> 'uint32_t'
// lpdtp : DRAWTEXTPARAMS* optional -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("USER32.dll", {
DrawTextExW: { parameters: ["pointer", "buffer", "i32", "pointer", "u32", "pointer"], result: "i32" },
});
// lib.symbols.DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp)
// hdc : HDC -> "pointer"
// lpchText : LPWSTR in/out -> "buffer"
// cchText : INT -> "i32"
// lprc : RECT* in/out -> "pointer"
// format : DRAW_TEXT_FORMAT -> "u32"
// lpdtp : DRAWTEXTPARAMS* optional -> "pointer"
// 文字列は "buffer"。Unicode(-W) は new TextEncoder() ではなく UTF-16LE のバイト列(末尾に \x00\x00)を Uint8Array で渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t DrawTextExW(
void* hdc,
uint16_t* lpchText,
int32_t cchText,
void* lprc,
uint32_t format,
void* lpdtp);
C, "USER32.dll");
// $ffi->DrawTextExW(hdc, lpchText, cchText, lprc, format, lpdtp);
// hdc : HDC
// lpchText : LPWSTR in/out
// cchText : INT
// lprc : RECT* in/out
// format : DRAW_TEXT_FORMAT
// lpdtp : DRAWTEXTPARAMS* optional
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface User32 extends StdCallLibrary {
User32 INSTANCE = Native.load("user32", User32.class, W32APIOptions.UNICODE_OPTIONS);
int DrawTextExW(
Pointer hdc, // HDC
char[] lpchText, // LPWSTR in/out
int cchText, // INT
Pointer lprc, // RECT* in/out
int format, // DRAW_TEXT_FORMAT
Pointer lpdtp // DRAWTEXTPARAMS* optional
);
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。@[Link("user32")]
lib LibUSER32
fun DrawTextExW = DrawTextExW(
hdc : Void*, # HDC
lpchText : UInt16*, # LPWSTR in/out
cchText : Int32, # INT
lprc : RECT*, # RECT* in/out
format : UInt32, # DRAW_TEXT_FORMAT
lpdtp : DRAWTEXTPARAMS* # DRAWTEXTPARAMS* optional
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef DrawTextExWNative = Int32 Function(Pointer<Void>, Pointer<Utf16>, Int32, Pointer<Void>, Uint32, Pointer<Void>);
typedef DrawTextExWDart = int Function(Pointer<Void>, Pointer<Utf16>, int, Pointer<Void>, int, Pointer<Void>);
final DrawTextExW = DynamicLibrary.open('USER32.dll')
.lookupFunction<DrawTextExWNative, DrawTextExWDart>('DrawTextExW');
// hdc : HDC -> Pointer<Void>
// lpchText : LPWSTR in/out -> Pointer<Utf16>
// cchText : INT -> Int32
// lprc : RECT* in/out -> Pointer<Void>
// format : DRAW_TEXT_FORMAT -> Uint32
// lpdtp : DRAWTEXTPARAMS* optional -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function DrawTextExW(
hdc: THandle; // HDC
lpchText: PWideChar; // LPWSTR in/out
cchText: Integer; // INT
lprc: Pointer; // RECT* in/out
format: DWORD; // DRAW_TEXT_FORMAT
lpdtp: Pointer // DRAWTEXTPARAMS* optional
): Integer; stdcall;
external 'USER32.dll' name 'DrawTextExW';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "DrawTextExW"
c_DrawTextExW :: Ptr () -> CWString -> Int32 -> Ptr () -> Word32 -> Ptr () -> IO Int32
-- hdc : HDC -> Ptr ()
-- lpchText : LPWSTR in/out -> CWString
-- cchText : INT -> Int32
-- lprc : RECT* in/out -> Ptr ()
-- format : DRAW_TEXT_FORMAT -> Word32
-- lpdtp : DRAWTEXTPARAMS* optional -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let drawtextexw =
foreign "DrawTextExW"
((ptr void) @-> (ptr uint16_t) @-> int32_t @-> (ptr void) @-> uint32_t @-> (ptr void) @-> returning int32_t)
(* hdc : HDC -> (ptr void) *)
(* lpchText : LPWSTR in/out -> (ptr uint16_t) *)
(* cchText : INT -> int32_t *)
(* lprc : RECT* in/out -> (ptr void) *)
(* format : DRAW_TEXT_FORMAT -> uint32_t *)
(* lpdtp : DRAWTEXTPARAMS* optional -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library user32 (t "USER32.dll"))
(cffi:use-foreign-library user32)
(cffi:defcfun ("DrawTextExW" draw-text-ex-w :convention :stdcall) :int32
(hdc :pointer) ; HDC
(lpch-text :pointer) ; LPWSTR in/out
(cch-text :int32) ; INT
(lprc :pointer) ; RECT* in/out
(format :uint32) ; DRAW_TEXT_FORMAT
(lpdtp :pointer)) ; DRAWTEXTPARAMS* optional
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $DrawTextExW = Win32::API::More->new('USER32',
'int DrawTextExW(HANDLE hdc, LPWSTR lpchText, int cchText, LPVOID lprc, DWORD format, LPVOID lpdtp)');
# my $ret = $DrawTextExW->Call($hdc, $lpchText, $cchText, $lprc, $format, $lpdtp);
# hdc : HDC -> HANDLE
# lpchText : LPWSTR in/out -> LPWSTR
# cchText : INT -> int
# lprc : RECT* in/out -> LPVOID
# format : DRAW_TEXT_FORMAT -> DWORD
# lpdtp : DRAWTEXTPARAMS* optional -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。関連項目
- f DrawTextExA (ANSI版) — 書式オプションを指定して矩形内に文字列を描画する(ANSI版)。
- f DrawTextW — 矩形内に書式を指定して文字列を描画する(Unicode版)。