Click here to Skip to main content
13,548,809 members
Click here to Skip to main content
Add your own
alternative version


23 bookmarked
Posted 11 Apr 2002

Xgui - A set of Photoshop-like color pickers

, 15 May 2002
Rate this:
Please Sign up or sign in to vote.
An MFC Compliant adobe Photoshop-like Color Picker from xgui
<!-- Download Links --> <!-- Add the rest of your HTML here -->


Bobi B has written a very cool Photoshop-like color picker (you can click here to see how cool it is), but since this is compiled into a DLL, it is very hard to use with existing MFC projects. I decided therefore to create a simple class to mimic CGTColorDialogDlg - but this time based on CDialog.

<!-- Article image -->

Sample Image - xgui-extension.jpg

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
int nResponse = dlg.DoModal()
if (nResponse == IDOK)
    COLORREF crReturn = dlg.GetColor();

Technical Details

The Color Picker Dialog is constructed using the following classes:

  1. GTColorWellWnd - (GTColorWellWnd.h, GTColorWellWnd.cpp)
  2. GTColorSliderWnd - (GTColorSliderWnd.h,GTColorSliderWnd.cpp)
  3. GTColorSelectorWnd - (GTColorSelectorWnd.h,GTColorSelectorWnd.cpp)
  4. CGTColorDialogDlg - (CGTColorDialogDlg.h,CGTColorDialogDlg.cpp

The class inheritance diagrams are as follows:

Sample Image - A_Hierarchy_Chart.jpg


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

jack Mesic
Web Developer
United States United States
jack Mesic is the president of UCanCode Software Technology,Inc..

You may also be interested in...

Comments and Discussions

GeneralStrange crash...solved. Pin
Andreas Muegge16-Sep-02 5:39
memberAndreas Muegge16-Sep-02 5:39 
GeneralLooks nice. Pin
Anonymous11-Apr-02 22:16
memberAnonymous11-Apr-02 22:16 
GeneralThanks a lot Pin
Bill Cheng11-Apr-02 22:14
memberBill Cheng11-Apr-02 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02-2016 | 2.8.180515.1 | Last Updated 16 May 2002
Article Copyright 2002 by jack Mesic
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid