GetBkMode function (wingdi.h)

The GetBkMode function returns the current background mix mode for a specified device context. The background mix mode of a device context affects text, hatched brushes, and pen styles that are not solid lines.

Syntax

int GetBkMode(
  [in] HDC hdc
);

Parameters

[in] hdc

Handle to the device context whose background mode is to be returned.

Return value

If the function succeeds, the return value specifies the current background mix mode, either OPAQUE or TRANSPARENT.

If the function fails, the return value is zero.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See also

GetBkColor

Painting and Drawing Functions

Painting and Drawing Overview

SetBkMode