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,     const RECT *prc,     BYTE alpha );

Parameters

hBufferedPaint
The handle of the buffered paint context, obtained through BeginBufferedPaint.
prc
[in] 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
The alpha value to set. The alpha value can range from zero (fully transparent) to 255 (fully opaque).

Return Value

Returns S_OK if successful, or an error value otherwise.

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.

Function Information

Stock ImplementationUxTheme.dll
Custom ImplementationNo
Headeruxtheme.h
Import libraryNone
Minimum operating systems Windows Vista
Tags :


Page view tracker