Export (0) Print
Expand All
Expand Minimize

BufferedPaintSetAlpha function

Sets the alpha to a specified value in a given rectangle. The alpha controls the amount of transparency applied when blending with the buffer onto the destination target device context (DC).

Syntax


HRESULT BufferedPaintSetAlpha(
  HPAINTBUFFER hBufferedPaint,
  _In_  const RECT *prc,
  BYTE alpha
);

Parameters

hBufferedPaint

Type: HPAINTBUFFER

The handle of the buffered paint context, obtained through BeginBufferedPaint.

prc [in]

Type: const RECT*

A pointer to a RECT structure that specifies the rectangle in which to set the alpha. Set this parameter to NULL to specify the entire buffer.

alpha

Type: BYTE

The alpha value to set. The alpha value can range from zero (fully transparent) to 255 (fully opaque).

Return value

Type: HRESULT

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

Remarks

This function sets the alpha value for each pixel in the target rectangle. Passing an alpha value of 255 makes pixels fully opaque. The BufferedPaintMakeOpaque macro, which is defined in uxtheme.h, sets alpha values to 255. It is typically used to call GDI to draw into a memory buffer and then to make it opaque in order to draw it on glass.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Uxtheme.h

DLL

UxTheme.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft