Gdi::SetBkMode_I

This method sets the background mix mode of the specified device context. The background mix mode is used with text, hatched brushes, and with non-solid pen styles.

static WINGDIAPI int WINAPI SetBkMode_I(
  HDC hdc,
  int iBkMode
);

Parameters

  • hdc
    [in] Handle to the device context.
  • iBkMode
    [in] Integer that specifies the background mode. The following table shows the possible values.
    Value Description
    OPAQUE Background is filled with the current background color before the text, hatched brush, or pen is drawn.
    TRANSPARENT Background remains untouched.

Return Values

If the function succeeds, the return value specifies the previous background mode.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This method is an internal version of the SetBkMode function.

The Gdi::SetBkMode_I method affects the line styles for lines drawn using a pen created by the Gdi::CreatePen_I method.

You can also set the iBkMode parameter to driver-specific values. GDI passes such values to the device driver and otherwise ignores those values.

The iBKMode parameter is stored internally as a single byte.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Gdi.hpp.

See Also

SetBkMode | Gdi::CreatePen_I | Gdi::GetBkMode_I

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.