DrawDibRealize

The DrawDibRealize function realizes the palette of the DrawDib DC for use with the specified DC.

UINT DrawDibRealize(
  HDRAWDIB hdd,     
  HDC hdc,          
  BOOL fBackground  
);

Parameters

hdd

Handle to a DrawDib DC.

hdc

Handle to the DC containing the palette.

fBackground

Background palette flag. If this value is nonzero, the palette is a background palette. If this value is zero and the DC is attached to a window, the logical palette becomes the foreground palette when the window has the input focus. (A DC is attached to a window when the window class style is CS_OWNDC or when the DC is obtained by using the GetDC function.)

Return Values

Returns the number of entries in the logical palette mapped to different values in the system palette. If an error occurs or no colors were updated, it returns zero.

Remarks

To select the palette of the DrawDib DC as a background palette, use the DrawDibDraw function and specify the DDF_BACKGROUNDPAL flag.

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Vfw.h.
**  Library:** Use Vfw32.lib.

See Also

DrawDib, DrawDib Functions, GetDC, DrawDibDraw