Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

DrawThemeParentBackgroundEx function

Used by partially-transparent or alpha-blended child controls to draw the part of their parent in front of which they appear. Sends a WM_ERASEBKGND message followed by a WM_PRINTCLIENT.

Syntax


HRESULT DrawThemeParentBackgroundEx(
  _In_  HWND hwnd,
  _In_  HDC hdc,
  _In_  DWORD dwFlags,
  _In_  const RECT *prc
);

Parameters

hwnd [in]

Type: HWND

Handle of the child control.

hdc [in]

Type: HDC

HDC of the child control.

dwFlags [in]

Type: DWORD

Zero or more of the following values. If this value is zero, this function returns S_OK only if the parent handled WM_PRINTCLIENT.

ValueMeaning
DTPB_WINDOWDC

If set, hdc is assumed to be a window DC, not a client DC.

DTPB_USECTLCOLORSTATIC

If set, this function sends a WM_CTLCOLORSTATIC message to the parent and uses the brush if one is provided. Otherwise, it uses COLOR_BTNFACE.

DTPB_USEERASEBKGND

If set, this function returns S_OK without sending a WM_CTLCOLORSTATIC message if the parent actually painted on WM_ERASEBKGND.

 

prc [in]

Type: const RECT*

Optional. The area to be drawn, in child coordinates. If this parameter is NULL, the area to be drawn includes the entire area occupied by the child control.

Return value

Type: HRESULT

S_OK if successful; otherwise, S_FALSE.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Uxtheme.h

Library

UxTheme.lib

DLL

UxTheme.dll

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.