INameSpaceTreeControlCustomDraw::ItemPrePaint method

Called before an item in the namespace tree control is drawn.

Syntax


HRESULT ItemPrePaint(
  [in]      HDC            hdc,
  [in]      RECT           *prc,
  [in]      NSTCCUSTOMDRAW *pnstccdItem,
  [in, out] COLORREF       *pclrText,
  [in, out] COLORREF       *pclrTextBk,
  [out]     LRESULT        *plres
);

Parameters

hdc [in]

Type: HDC

A handle to the control's device context. Use this HDC to perform any GDI functions.

prc [in]

Type: RECT*

A pointer to the RECT structure that describes the bounding rectangle of the area being drawn.

pnstccdItem [in]

Type: NSTCCUSTOMDRAW*

A pointer to the NSTCCUSTOMDRAW structure that determines the details of the drawing.

pclrText [in, out]

Type: COLORREF*

On entry, a pointer to a COLORREF structure that declares the default color of the text. When this method returns, contains a pointer to a COLORREF structure that declares the color that should be used in its place, if any. This allows the client to provide their own color if they do not want to use the default.

pclrTextBk [in, out]

Type: COLORREF*

On entry, a pointer to a COLORREF structure that declares the default color of the background. When this method returns, contains a pointer to a COLORREF structure that declares the color that should be used in its place, if any. This allows the client to provide their own color if they do not want to use the default.

plres [out]

Type: LRESULT*

When this method returns, contains a pointer to an LRESULT, which points to one or more of the values from the CDRF Constants enumeration.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

INameSpaceTreeControlCustomDraw

 

 

Show: