flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DimonSoft 19 Feb 2020, 15:40
jochenvnltn wrote: Im trying to use SetSysColors to set the color of the window in FASM, but SetSysColors function returns 0 MSDN wrote: BOOL WINAPI SetSysColors( The most obvious guess is that there’s parameter validation that checks the pointers for being out of valid address range (first 64K are not accessible for applications). GetLastError would give a clue but you didn’t give us this information, so just guessing for now. Are you sure changing global settings (even if for the session duration) to solve a local problem is a good idea? Also Code: macro RGB red, green, blue { mov eax, ((red and $FF) shl 16) or ((green and $FF) shl 8) or (blue and $FF) } might be a better idea if you’re going to use constants. In fact $bbggrr is not even worth making a macro, IMHO. |
|||
![]() |
|
jochenvnltn 19 Feb 2020, 21:05
Hi DimonSoft !
![]() The function returns "Invalid access to memory location" thank you for the nice macro ! Ill be using that from now on ![]() ![]() ![]() |
|||
![]() |
|
DimonSoft 20 Feb 2020, 08:12
jochenvnltn wrote: Hi DimonSoft ! Have you ever used HTML/CSS notation for colors? #FFCCDD? |
|||
![]() |
|
Hrstka 21 Feb 2020, 09:15
The second and third arguments are pointers, so you cannot pass these values to SetSysColors directly.
|
|||
![]() |
|
jochenvnltn 21 Feb 2020, 15:14
Hrstka wrote: The second and third arguments are pointers, so you cannot pass these values to SetSysColors directly. Yes you were right ! I have it running now, but the colors never change .. Ill get back to this later |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.