Does any one know how to change color of the button?
i tried to add this:
	.elseif eax==WM_CTLCOLORBTN

invoke GetWindowLong,lParam,GWL_ID
.if eax==1005
.if hBrush
invoke DeleteObject,hBrush
invoke SetBkMode,wParam,TRANSPARENT
INVOKE SetTextColor,wParam,0FFFFh
invoke CreateSolidBrush,0FF0000h
mov hBrush,eax
mov eax,FALSE

to the ControlColors (CtlColor.rap) example which came with RadASM but it ain't working... i've try and try and try and i just couldn't color that button... so pleas help. i know this is simpel but i'm to stupid to find the anwser

Posted on 2001-12-16 07:11:58 by NEMO
responding to WM_CTLCOLORBTN is useless :\
guess you'll have to paint the button yourself.
Posted on 2001-12-16 11:55:39 by Tola
i was afraid that this post will come, couse i don't know how to do that, i've never "played" with painting.... =(

maybe does anyone know how to do that, some example will be great.

Posted on 2001-12-16 14:07:37 by NEMO
There's an example with all kinds of custom button types at Iczelion's site.
download here:

Posted on 2001-12-16 14:31:47 by Thomas

responding to WM_CTLCOLORBTN is useless :\

I haven't tried responding to that message for a button, but i note it doesn't work for a button with BS_PUSHBUTTON style set. You could try setting the button's style to BS_OWNERDRAW, and use the above message, it may then respond to the returned brush.

Or, you could specify BS_OWNERDRAW, and use FillRect() in the WM_DRAWITEM message.
Posted on 2001-12-16 15:07:18 by sluggy