News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

back Color Buttons

Started by Tinieblaster, April 10, 2005, 08:42:44 PM

Previous topic - Next topic

Tinieblaster

hello, help please, as I can change the back color of bottom? please easily :'(

sluggy

Quote from: Tinieblaster on April 10, 2005, 08:42:44 PM
hello, help please, as I can change the back color of bottom? please easily :'(
Not of a bottom - they are kinda unchangeable  :toothy

To change the back colour of a button, check out the doco for it here. Note that you can only do this on owner drawn buttons, not standard system ones.

Tinieblaster

that I have seen several times it... but I want to know as I apply to that with masm32... an example I need please.
Thank ::)

sluggy

Here is a very simple example from an app i wrote. This was actually for an edit control, but buttons are the same:


.ELSEIF uMsg == WM_CTLCOLORBTN
                             ...
                             ...a whole bunch of code went here...
                             ...

                             ;now colour the button:
invoke CreateSolidBrush, [esi]       ;ESI points to an already calculated COLORREF
mov dlgProcBrush, eax              ;i keep the brush so i can free it up later
ret                                                 ;return with the brush still in EAX




Tinieblaster

thank you very much, it will prove to see if with himself put it in march :U

Tinieblaster

Hello, because... I do not obtain it please. you can put I cosay for clumsy?  complete that works?  Thanks for your amiability. :'(

sluggy

Quote from: Tinieblaster on April 11, 2005, 04:37:56 PM
Hello, because... I do not obtain it please. you can put I cosay for clumsy?  complete that works?  Thanks for your amiability. :'(

No, that is not the way we run things here.... YOU post YOUR code, and we will assist with fixing it.

It is a very simple process, catch that particular windows message in your wndproc, create a brush, and return with it in the EAX register. Also, saying that "it doesn't work" is not a good enough description, you need to say WHAT happened, and any error messages you get (i.e. check GetLastError API function).

I realise that english is not your first language, if you tell us where you are from maybe someone here can help more by translating the answers you get.

Tinieblaster

Hello it excuses I did not want to bother, I cannot put my I code, since I do not have it,  I needed aid to be able to do I feel it if it bothers to somebody if that is not the subject of the forum, and is not English my language translates google I feel foot single I to be able to do that if nobody knows/does not want to help me, is no problem excuses and thanks for everything.