flat assembler
Message board for the users of flat assembler.
Index
> Windows > Colors |
Author |
|
Goplat 06 Aug 2008, 01:03
There is no such thing as a "handle for a color" in Windows.
The GetSysColor function takes a COLOR_ constant and returns the RGB color value. Since 00FFFF00h is not one of the COLOR_ constants, your call will just return 0. |
|||
06 Aug 2008, 01:03 |
|
iic2 06 Aug 2008, 01:23
Thanks Goplat for the info.
Handle may be the wrong word but under MASM all 9 colors I declare (xxxxxxxxh) show 9 dwords under .data? and I can use any of those dword to color what ever is needed. I did that for years. No ColorStatic API needed. So how do I build my own constants that works for fasm. I tried below but it don't work. It got to be in the style of writing that can works for FASM. yellow = 0000ffffh red = 000000ffh etc Or is there another way to build color using other means. |
|||
06 Aug 2008, 01:23 |
|
iic2 06 Aug 2008, 01:42
Correction. I went blind... I just checked my old code and the thing is to use CreateSolidBrush and save that value.
push COLOR_BACKGROUND call GetSysColor mov [hBACKGROUND], eax push 0080FF00h ; or any color call CreateSolidBrush mov [rGREEN] etc etc Thanks for the Wake-Up-Call Goplat |
|||
06 Aug 2008, 01:42 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.