CDC::SelectPalette
Visual Studio 2012
Selects the logical palette that is specified by pPalette as the selected palette object of the device context.
CPalette* SelectPalette( CPalette* pPalette, BOOL bForceBackground );
The new palette becomes the palette object used by GDI to control colors displayed in the device context and replaces the previous palette.
An application can select a logical palette into more than one device context. However, changes to a logical palette will affect all device contexts for which it is selected. If an application selects a palette into more than one device context, the device contexts must all belong to the same physical device.