Gdi32SetBkColor Method
Sets the current background color to the specified color value,
or to the nearest physical color if the device cannot represent the specified color value.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll")]
public static uint SetBkColor(
IntPtr hdc,
int color
)
<DllImportAttribute("GDI32.dll">]
Public Shared Function SetBkColor (
hdc As IntPtr,
color As Integer
) As UInteger
Dim hdc As IntPtr
Dim color As Integer
Dim returnValue As UInteger
returnValue = Gdi32.SetBkColor(hdc,
color)
public:
[DllImportAttribute(L"GDI32.dll")]
static unsigned int SetBkColor(
IntPtr hdc,
int color
)
[<DllImportAttribute("GDI32.dll")>]
static member SetBkColor :
hdc : IntPtr *
color : int -> uint32
No code example is currently available or this language may not be supported.
- hdc IntPtr
-
A handle to the device context.
- color Int32
-
The new background color. To make a COLORREF value, use the RGB macro.
UInt32
If the function succeeds, the return value specifies the previous background color as a COLORREF value.
If the function fails, the return value is CLR_INVALID (-1 or 0xFFFFFFFF).