Click here to Skip to main content
Licence 
First Posted 11 Apr 2002
Views 55,246
Bookmarked 22 times

Xgui - A set of Photoshop-like color pickers

By | 15 May 2002 | Article
An MFC Compliant adobe Photoshop-like Color Picker from xgui

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.

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

About the Author

jack Mesic

Web Developer

United States United States

Member

jack Mesic is the president of UCanCode Software Technology,Inc..

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralStrange crash...solved. PinmemberAndreas Muegge5:39 16 Sep '02  
GeneralLooks nice. PinmemberAnonymous22:16 11 Apr '02  
GeneralThanks a lot PinmemberBill Cheng22:14 11 Apr '02  

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.

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