CColorComboBox

CColorComboBox - A combobox color picker
For my WYSIWYG web page designer I needed a simple color picker, so I created this very basic control, using an owner drawn CCombobox. It look and works exactly like the color picker from Frontpage Express.
By default it displays the standard 16 colors, but you can add your own colors using:

int AddString(LPCTSTR lpszItem, COLORREF itemColor);

To get the current selected color use:

COLORREF GetCurColor();

To programmatically select another color use:

void SetCurColor(COLORREF color);

The last item in the list alows you to select a custom color. When you select this item it brings up the standard color dialog.


Download example executable

Download source code
This class is part of the Pablo Software Solutions MFC Extension Package - Controls Edition
 

[Home] [Products] [Source Code] [Downloads]

© 2015 - Pablo Software Solutions
All rights reserved.