News:

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

SS_Notify on Vista & XP

Started by newAsm, July 13, 2009, 04:11:19 AM

Previous topic - Next topic

newAsm

Hi Sinsi,

I cannot assemble your code. I am using Masm32 (Hutch's version). You created the colour brushes in WM_CREATE as well (same as what I did). When I changed windows.inc to masm32rt.inc no colour change was seen.

I know, I know that I might have done something wrong. In CTLCOLORBTN, I returned one of the handle for the colour brush (same as what you did), and no colour change was seen.

I need to relook at my codes again.

Thanks for your help and it is frustrating to come to this point and it does not respond to what it is suppose to do. I have to find out where I did wrong.

...newAsm

sinsi

I changed my include line and it wouldn't build either  :red
Try this one - it includes the exe. I'm running it in win7 64-bit and it works ok.

[attachment deleted by admin]
Light travels faster than sound, that's why some people seem bright until you hear them.

newAsm

Thanks Sinsi,

Your example helped me sort out the static control and the colour is now working. Does the same rule works for button? Can I use WM_CTLCOLORBTN to change the button colour? From Win32Hlp, it sounds the same. So far, I have also not being able to get the button colour change working. I am happy that the static control is working but it would be perfect if I can change the button colours as well. Thanks a lot for your time and example.

..newAsm

sinsi

I see no reason why buttons wouldn't work the same way. If you process CTLCOLORx you return a brush and windows uses it.
The thing to watch is where you trigger it and what triggers it.
Light travels faster than sound, that's why some people seem bright until you hear them.

ToutEnMasm

WM_CTLCOLORBTN will be useful here to change the color of the  OWNER DRAWN bottom

newAsm

Thanks ToutEnMasm & Sinsi,

The static control now works. I am struggling with CTLCOLORBTN. It could my programming. I will recheck it. You can play with it now. Double click on uChipCimu.exe

Click on the [Start Game] and then click the first line on the RHS checkbox, and then click [Accept Changes]. The bit(s) that are wrong will be indicated by red. I am trying still to get the button to change colours for [Next Instruction] and [Accept Changes].

Thanks for your help. I will strive on and debug slowly any stupid errors.

[attachment deleted by admin]

Ghandi

I've searched for this myself on a few occasions, always ending with the same conclusion. ToutEnMasm has it correct, you can only use WM_CTLCOLORBTN if you are taking over ALL aspects of drawing the buttons. Otherwise you wont be able to change your button color (that i've found). You can read about the message on MSDN:

http://msdn.microsoft.com/en-us/library/bb761849(VS.85).aspx

HR,
Ghandi

newAsm

Thanks ToutEnMasm & Ghandi for your help. I will make do with what I have until I revise my program with user owned button.

Thanks a lot for your help...newAsm