Click here to Skip to main content
Click here to Skip to main content
Go to top

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 -->

Introduction

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
dlg.SetColor(RGB(0,0,255));
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

License

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

Share

About the Author

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

Comments and Discussions

 
GeneralStrange crash...solved. PinmemberAndreas Muegge16-Sep-02 5:39 
GeneralLooks nice. PinmemberAnonymous11-Apr-02 22:16 
GeneralThanks a lot PinmemberBill Cheng11-Apr-02 22:14 

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

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

| Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 16 May 2002
Article Copyright 2002 by jack Mesic
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid