Instead of default white BackGrounds for Dialogs Controls (Edit / ListBox),
i set a light blue color, with something like:


> ...Else_If D?Message e &WM_CTLCOLOREDIT
> jmp L1>
>
> ...Else_If D?Message e &WM_CTLCOLORBTN ; Doesn't work !!!!!!?????!!!!!
> Beep | jmp L1>
>
> ...Else_If D?Message e &WM_CTLCOLORDLG
> jmp L1>
>
> ...Else_If D?Message e &WM_CTLCOLORLISTBOX
>L1: api 'GDI32.SetBkColor' D?wParam D?DialogsBackColor


But the Back Color of Radio and Check Buttons remains white.

About WM_CTLCOLORBTN, Win doc says:

"The text color of a check box or radio button applies to the box or button,
its check mark, and the text. The focus rectangle for these buttons remains
the system default color (typically black)"....

The color i want to change is the one of the little white circle (or square).
Is this impossible? Is there one missing info in Win doc? (BS_NOTIFY doesn't
change anything, nor setting the Mode OPAQUE).


betov.
Posted on 2001-09-02 12:04:54 by Betov
I'm not sure, but I think the check/radio buttons are implemented
as bitmaps, and thus changing their color is a little harder than
your usual text color change.

If this is true, you'll probably have to code ownerdrawn buttons :(
Posted on 2001-09-02 13:18:20 by f0dder
The way to check is to change you sytem display setting so modify this color setting.. How i tested my tree-view coded for proper trasparency of icons.

NaN
Posted on 2001-09-02 13:27:19 by NaN
> I'm not sure, but I think the check/radio buttons are
> implemented as bitmaps

no, it's more funny, they are characters from the
marlett.ttf font, which resists hidden in the font folder.

GDI renders the radio button out of four single chars.
If you temporary rename the marlet font, you will miss
all the little graphics, like window buttons, combobox
and scrollbar buttons and check/radio buttons.

Funny side-effect: under Win2K these items are smoothed
because of the new TTF render engine.

(I'm sorry, but I dont know how to change that color,
the way posted by NaN seems to be the best one...)

beaster.
Posted on 2001-09-03 04:17:16 by beaster
Now that is indeed very interesting, beaster! I basted my assumptions
on a few DLLs and EXEs I've seen, but... those weren't actually
system DLLs.

Anyway, the items aren't smoothed on my computer, but I guess
that's because smoothing is only activated when fonts are rendered
above a certain minimum size. (messing with sizes): nope, still not
becoming smoothed. *shrug*.
Posted on 2001-09-03 09:20:14 by f0dder