Called by the framework when the container calls the IViewObject::GetColorSet member function.

virtual BOOL OnGetColorSet(
   HDC hicTargetDev,
   LPLOGPALETTE* ppColorSet 


Points to the target device for which the picture should be rendered. If this value is NULL, the picture should be rendered for a default target device, usually a display device.


Specifies the information context on the target device indicated by ptd. This parameter can be a device context, but is not one necessarily. If ptd is NULL, hicTargetDev should also be NULL.


A pointer to the location into which the set of colors that would be used should be copied. If the function does not return the color set, NULL is returned.

Nonzero if a valid color set is returned; otherwise 0.

The container calls this function to obtain all the colors needed to draw the OLE control. The container can use the color sets obtained in conjunction with the colors it needs to set the overall color palette. The default implementation returns FALSE.

Override this function to do any special processing of this request.

Header: afxctl.h

Ajouts de la communauté