WinApi Color picker
-
Ich suche einen Color Picker,
etwa sowas http://www.devcomponents.com/dotnetbar/img/ColorPickerItem.png
Kann man das nur mit der WinApi realisieren?
Danke!
-
ChooseColor !?
=>
CHOOSECOLOR cc; // common dialog box structure static COLORREF acrCustClr[16]; // array of custom colors HWND hwnd; // owner window HBRUSH hbrush; // brush handle static DWORD rgbCurrent; // initial color selection // Initialize CHOOSECOLOR ZeroMemory(&cc, sizeof(cc)); cc.lStructSize = sizeof(cc); cc.hwndOwner = hwnd; cc.lpCustColors = (LPDWORD) acrCustClr; cc.rgbResult = rgbCurrent; cc.Flags = CC_FULLOPEN | CC_RGBINIT; if (ChooseColor(&cc)==TRUE) { hbrush = CreateSolidBrush(cc.rgbResult); rgbCurrent = cc.rgbResult; }
-
ChooseColor !?
Nö, das ist nicht der ColorPicker aus dem Screenshot. Ich denke eher, er sucht diesen hier: XColorHexagonCtrl - a non-MFC color picker control that displays a color hexagon
-
Er suchte auch "einen" und nicht "den"... aber Alternativen sind immer gut!
-
Vielen Dank, ich nehme die Lösung von Jochen

-
Hallo,
Ich probiere das auch gerade aus, kriege aber einen Linkfehler. Welche Libs muss ich dafür linken?
PS: Ich meine das Beispiel von Jochen.
-
die normalen