Version 1.2 of the OS/2 PM ColorWheel color-picker dialog library by Alessandro Cantatore.
Wraps the undocumented OS/2 ColorSelectClass control from WPCONFIG.DLL into a
ready-to-use modal dialog with R/G/B spin buttons.
- Modal "Edit Color" dialog built around the OS/2 Workplace Shell color wheel control
- R, G, B spin buttons (0–255) stay in sync with the wheel
- OK / Undo / Cancel buttons; Close button and system-menu Close behave like Cancel
- Live color-change notifications to the owner window via
WM_COLORWHEELCHANGED - Caller-supplied dialog title (defaults to "Edit Color")
- Supports OS/2 Warp 3 and Warp 4 (selects the correct undocumented message numbers at runtime)
LONG APIENTRY WinEditColorDlg(
HWND hwndParent, /* parent window — dialog centers over this */
HWND hwndOwner, /* owner — receives WM_COLORWHEELCHANGED */
COLOR color, /* initial RGB color (LONG) */
PSZ pszTitle /* dialog title; NULL -> "Edit Color" */
);Returns the selected RGB color as a LONG, or CLR_ERROR on failure.
While the dialog is open the owner window receives:
| Message | mp1 | mp2 |
|---|---|---|
WM_COLORWHEELCHANGED (0x0601) |
new LONG RGB color |
MPVOID |
(On Warp 3 the message number is 0x130C instead.)
See h/editcol.h for the full constant and structure reference.
EDITCOL.DLLmust be in a directory listed inLIBPATH.WPCONFIG.DLL(part of the OS/2 Workplace Shell) must be present — it is loaded at dialog-open time to register theColorSelectClasswindow class.
- Add
h\to your compiler's include path and#include <editcol.h>. - Link against
lib\EDITCOL.LIB. - Ship
EDITCOL.DLLwith your application.
wcc386 -bt=os2 -bm -Ih myapp.c
wlink system os2v2_pm name myapp.exe file myapp.obj lib lib\EDITCOL.LIB option stack=65536
Run from the project root:
wmake -f Makefile.wat 2>&1 | tee compile.log
Outputs:
| File | Description |
|---|---|
dll\EDITCOL.DLL |
Rebuilt DLL |
lib\EDITCOL.LIB |
Import library (generated by wlink) |
sample\TEST.EXE |
Test application |
The build produces zero errors and zero warnings with Open Watcom 2.0.
Click any mouse button on the client window to open the "Edit Color" dialog. The window background updates live as you drag the color wheel, and the title bar shows the current RGB values. After dismissing, the title bar shows the returned color for 5 seconds before reverting to the window title.
Makefile.wat Open Watcom 2.0 build file (run from project root)
README.md This file
readme.TXT Original distribution readme (v1.1)
file_id.diz BBS description
dll\
EDITCOL.DLL Rebuilt dialog DLL
lib\
EDITCOL.LIB Import library for EDITCOL.DLL
h\
editcol.h Public header — WinEditColorDlg, CLR, constants
src\
editcol.c DLL implementation
editcol.rc Dialog resource template
editcol.def Original module definition (reference)
editcol.mak Original IBM VisualAge C++ makefile (reference)
sample\
test.c Sample PM application
test.rc Resource script (icon)
test.ICO Application icon
test.mak Original IBM VisualAge C++ makefile (reference)
BSD 3-Clause — see readme.TXT for the original terms.
- Alessandro Cantatore — original library (v1.0–1.1)
- Paul Ratcliffe — original color wheel concept
Open Watcom 2.0 port (v1.2, 2026)