19.4 Drawing with Palette Colors

Once your application has created a logical palette, selected it into a device context, and realized it, you can use the palette to control the colors used by GDI functions that draw within the client area of the screen. For functions that require a color (such as CreatePen and CreateSolidBrush), you specify, directly or indirectly, which palette color you want to use.