If a CPalette object is not already attached to the Windows palette, a temporary CPalette object is created and attached. Return ValueĪ pointer to a CPalette object if successful otherwise NULL. static CPalette* PASCAL FromHandle(HPALETTE hPalette) Ī handle to a Windows GDI color palette. Returns a pointer to a CPalette object when given a handle to a Windows palette object. See the Windows SDK for more information about the LOGPALETTE structure. Points to a LOGPALETTE structure that contains information about the colors in the logical palette. BOOL CreatePalette(LPLOGPALETTE lpLogPalette) Initializes a CPalette object by creating a Windows logical color palette and attaching it to the CPalette object. See the Windows SDK for more information about CreateHalftonePalette and StretchDIBits. The logical halftone palette returned by the CreateHalftonePalette member function should then be selected and realized into the device context before the CDC::StretchBlt or StretchDIBits function is called. RemarksĪn application should create a halftone palette when the stretching mode of a device context is set to HALFTONE. Nonzero if the function is successful otherwise 0. CPalette::CreateHalftonePaletteĬreates a halftone palette for the device context. The object has no attached palette until you call CreatePalette to attach one. CPalette::CPaletteĬonstructs a CPalette object. See LOGPALETTE in the Windows SDK for more information about this structure. The AnimatePalette function will only change entries with the PC_RESERVED flag set in the corresponding palPaletteEntry member of the LOGPALETTE structure that is attached to the CPalette object. #Belle palette sans reference updateWhen an application calls AnimatePalette, it does not have to update its client area, because Windows maps the new entries into the system palette immediately. Points to the first member of an array of PALETTEENTRY structures to replace the palette entries identified by nStartIndex and nNumEntries. Specifies the number of entries in the palette to be animated. Specifies the first entry in the palette to be animated. Replaces entries in the logical palette attached to the CPalette object. Header: afxwin.h CPalette::AnimatePalette Construct a CPalette object and use its member functions to create the actual palette, a graphics device interface (GDI) object, and to manipulate its entries and other properties.įor more information on using CPalette, see Graphic Objects. Windows uses the application's logical palette (a list of needed colors) and the system palette (which defines available colors) to determine the colors used.Ī CPalette object provides member functions for manipulating the palette referred to by the object. #Belle palette sans reference fullThe interface allows the application to take full advantage of the color capabilities of the output device without severely interfering with the colors displayed by other applications. Returns the HPALETTE attached to the CPalette.Ī palette provides an interface between an application and a color output device (such as a display device). Sets RGB color values and flags in a range of entries in a logical palette. Retrieves a range of palette entries in a logical palette.Ĭhanges the size of the logical palette specified by the CPalette object to the specified number of entries. Returns the index of the entry in the logical palette that most closely matches a color value. Retrieves the number of palette entries in a logical palette. The application does not have to update its client area, because Windows maps the new entries into the system palette immediately.Ĭreates a halftone palette for the device context and attaches it to the CPalette object.Ĭreates a Windows color palette and attaches it to the CPalette object. Replaces entries in the logical palette identified by the CPalette object. You must initialize the CPalette object with one of the initialization member functions before it can be used. Syntax class CPalette : public CGdiObjectĬonstructs a CPalette object with no attached Windows palette.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |