テキストをグレー表示で出力する
Declare Function GrayString Lib "user32.dll" Alias "GrayStringA" _
(ByVal hdc As Long, ByVal hBrush As Long, Byval lpOutputFunc As Long, _
ByVal lpData As String, ByVal nCount As Long, ByVal X As Long, ByVal Y As Long, _
ByVal nWidth As Long, ByVal nHeight As Long) As Long
Declare Function GrayString Lib "user32.dll" Alias "GrayStringA" _
(ByVal hdc As Integer, ByVal hBrush As Integer, Byval lpOutputFunc As Integer, _
ByVal lpData As String, ByVal nCount As Integer, ByVal X As Integer, ByVal Y As Integer, _
ByVal nWidth As Integer, ByVal nHeight As Integer) As Integer
BOOL GrayString(
HDC hDC,
HBRUSH hBrush,
GRAYSTRINGPROC lpOutputFunc,
LPARAM lpData,
int nCount,
int X,
int Y,
int nWidth,
int nHeight
);
引数
hdc
デバイスコンテキストのハンドルhBrush
グレー化するブラシのハンドルlpOutputFunc
0のとき、現在選択されているブラシを使う
文字列を描画するユーザー定義の関数へのポインタlpData
0のときTextOut()関数を使用する
TextOut()関数への出力ができない場合などの場合、例えばビットマップなどの場合
ユーザー定義の関数へのポインタを指定する
出力するテキストnCount
同、バイト数X
文字列を表示する矩形の左上墨のX座標Y
同、Y座標nWidth
出力範囲を指定する矩形の幅nHeight
同、高さ戻り値
正常終了のとき 0以外備考
エラーのとき 0
指定した矩形の範囲内に収まらないテキストは表示されない