TrueTypeフォントの文字幅(A,B,C寸法)を取得する
Declare Function GetCharABCWidths lib "gdi32.dll" Alias "GetCharABCWidthsA" _hdc
(ByVal hdc As Long, ByVal ufirstChar As Long, ByVal uLastChar As Long, lpabc As ABC) As Long
デバイスコンテキストのハンドルuFirstChar
最初の文字のASCII値uLastChar
最後の文字のASCII値lpabc
(戻り値)データを受け取るABC構造体の配列戻り値
正常終了のとき 0以外備考
エラーのとき 0
TrueTypeでないフォントの場合はGetCharWidth32()関数を使う。 ABC寸法については以下の図を参照。![]()