1

I'm using the CHOOSECOLOR dialog, but in my app(C++/WinAPI) it looks wierd. Dialog has large luminosity slider and I do not why. I haven't found a way to make the slider smaller.

a busy cat http://toxicbumble.com/color_dialog.png

Dialog is created by this code (it's example code from MSDN):

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;

ChooseColor(&cc);
zdenek
  • 97
  • 1
  • 9
  • 2
    You're right, your slider does look too big, I compared it to mspaint's color chooser on my computer. How does mspaint's color chooser dialog look like on your computer? If it has a big slider as well, it might be something with the Windows theme you have on that computer, rather than a problem with your code. – sashoalm Mar 13 '14 at 10:22
  • Color dialog in MS Paint on my computer is ok. [screenshot](http://toxicbumble.com/color_dialog_mspaint.png) – zdenek Mar 13 '14 at 11:57
  • 1
    I ran your code in a new project on my computer, but couldn't reproduce the problem. I modified it a bit, can you try running it in a new project on your computer? http://pastebin.com/reKbhDzC – sashoalm Mar 13 '14 at 13:59
  • I tried your sample in new project and color dialog looks perfect. I must try to move my whole application to a new project. – zdenek Mar 13 '14 at 14:41

0 Answers0