Does any one know how to change color of the button?
i tried to add this:
:stupid:
thanx
i tried to add this:
.elseif eax==WM_CTLCOLORBTN
invoke GetWindowLong,lParam,GWL_ID
.if eax==1005
.if hBrush
invoke DeleteObject,hBrush
.endif
invoke SetBkMode,wParam,TRANSPARENT
INVOKE SetTextColor,wParam,0FFFFh
invoke CreateSolidBrush,0FF0000h
mov hBrush,eax
ret
.endif
mov eax,FALSE
ret
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
:stupid:
thanx
responding to WM_CTLCOLORBTN is useless :\
guess you'll have to paint the button yourself.
guess you'll have to paint the button yourself.
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.
cya
maybe does anyone know how to do that, some example will be great.
cya
There's an example with all kinds of custom button types at Iczelion's site.
download here:
http://spiff.tripnet.se/~iczelion/files/Buttons.zip
Thomas
download here:
http://spiff.tripnet.se/~iczelion/files/Buttons.zip
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.