|Since the original poster didn't respond to your message, I'll take a shot at it. I just imported the code in a VC6 project so I'll give directions for that compiler.
Download and unzip the source code using the link at top of this page.
Open your project. From the menu select Project >> Add to Project... >> Files, and select the files SelColorDlg.cpp and SelColorDlg.h that you just unzipped.
Open the file ColorSel.rc and copy the following 'dialog'-code from that file --unless you're using a newer version than I have, you can also copy it from below.
IDD_COLSEL DIALOG DISCARDABLE 0, 0, 277, 183
STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select Colour"
FONT 8, "MS Shell Dlg"
LTEXT "Current Colour:",IDC_STATIC,166,7,48,8
LTEXT "New Colour:",IDC_STATIC,224,7,40,8
PUSHBUTTON "<< &Add Custom Colour",ID_ADDCOLOUR,174,136,89,14
Next, open the .rc-file from your own project. Look up the section that begins with the following remark:
Paste the 'dialog'-code right below this remark. Next, open the file Resource.h from the zip-file and copy the following code from it --again, you can also copy the code below.
#define ID_ADDCOLOUR 3
#define IDD_COLSEL 129
#define IDC_DRAGITEM 130
#define IDC_HUE 1001
#define IDC_SAT 1002
#define IDC_LUM 1003
#define IDC_RED 1004
#define IDC_GREEN 1005
#define IDC_BLUE 1006
#define IDC_REF 1007
Now open the resource.h file from your own project and copy the above #defines into it. Change the values from these defines so that they are unique; in other words, no value should be the same as any of the values that you already had in your own resource.h file.
And finally, at the bottom of your resource.h file you may find the following lines:
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 131
#define _APS_NEXT_COMMAND_VALUE 32773
#define _APS_NEXT_CONTROL_VALUE 1008
#define _APS_NEXT_SYMED_VALUE 101
Important: Change the values to reflect the changes you've made in the previous step, so that your IDE knows which constant values it can use for any new resources, commands or controls.