65.9K
CodeProject is changing. Read more.
Home

Xguiplus - A set of Photoshop's-like color pickers

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.75/5 (11 votes)

Jul 15, 2002

viewsIcon

86964

downloadIcon

2516

An MFC compliant Adobe Photoshop's-like Color Picker from xgui

Introduction

Jack Mesic wrote an extension to xgui written by Bobi B. xgui has a Photoshop-like color chooser. I think it is an incredible job and only added the following:

  • Interactive numerical HSV and RGB representations
  • Interactive hexadecimal representation (HTML)

Jacks version.

Bobi B's original version

How to use it:

Very easy! Simply add the following code in the header file of the class where you want to display the Color Picker Dialog:

#include "GTColorDialogDlg.h"

And in the .cpp file:

CGTColorDialogDlg dlg
dlg.SetColor(RGB(0,0,255));
int nResponse = dlg.DoModal()
if (nResponse == IDOK)
{
    COLORREF crReturn = dlg.GetColor();
}

That's all