GrayString function Null safety user32
The GrayString function draws gray text at the specified location. The function draws the text by copying it into a memory bitmap, graying the bitmap, and then copying the bitmap to the screen. The function grays the text regardless of the selected brush and background. GrayString uses the font currently selected for the specified device context.
BOOL GrayStringW(
HDC hDC,
HBRUSH hBrush,
GRAYSTRINGPROC lpOutputFunc,
LPARAM lpData,
int nCount,
int X,
int Y,
int nWidth,
int nHeight
);
Implementation
int GrayString(
int hDC,
int hBrush,
Pointer<NativeFunction<OutputProc>> lpOutputFunc,
int lpData,
int nCount,
int X,
int Y,
int nWidth,
int nHeight) {
final _GrayString = _user32.lookupFunction<
Int32 Function(
IntPtr hDC,
IntPtr hBrush,
Pointer<NativeFunction<OutputProc>> lpOutputFunc,
IntPtr lpData,
Int32 nCount,
Int32 X,
Int32 Y,
Int32 nWidth,
Int32 nHeight),
int Function(
int hDC,
int hBrush,
Pointer<NativeFunction<OutputProc>> lpOutputFunc,
int lpData,
int nCount,
int X,
int Y,
int nWidth,
int nHeight)>('GrayStringW');
return _GrayString(
hDC, hBrush, lpOutputFunc, lpData, nCount, X, Y, nWidth, nHeight);
}