flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar
The ChooseColor API allows user to define his own 16 custom colors, and this place is used to store them at runtime (so that colors you define are preserved between calls to ChooseColor in one session).
|
|||
![]() |
|
ouadji
thank you for your reply Tomasz. chooseColor API ... 16 custom colors ok, understood ! and i understand now this below. Code: ;mov [cc.lpCustColors],user_colors ;invoke ChooseColor,cc ... ..... mov esi,editor_colors mov edi,user_colors mov ecx,8 rep movsd but why this ... Why save the colors in the middle of this buffer Code: mov esi,editor_colors mov edi,user_colors+20h ;<--- +20h ? mov ecx,8 rep movsd |
|||
![]() |
|
LocoDelAssembly
Thread moved to IDE Development.
|
|||
![]() |
|
bitshifter
From what i gather, (default colors during startup)..
user_colors as follows first four: COLOR_WINDOWTEXT COLOR_WINDOW COLOR_HIGHLIGHTTEXT COLOR_HIGHLIGHT second four: -> asm_syntax_colors Custom colors = 16 spots So there are two copies of user_colors to fill cc dialog with. Please correct me if i am wrong...
_________________ Coding a 3D game engine with fasm is like trying to eat an elephant, you just have to keep focused and take it one 'byte' at a time. |
||||||||||
![]() |
|
edemko
Tomasz, hi, it looks Ouadji is working for line highlight.
For the future ease i'd ask you putting your tips if any. So it'll come under some flow of your design. |
|||
![]() |
|
ouadji
very good idea! but in this case, the buffer "user_colors" is too large. user_colors rd 40h ... why ? rd 10h (or rb 40h) would be enough! "it looks Ouadji is working for line highlight" ... it's done. With wink 5.5, active line is highlighted |
|||
![]() |
|
bitshifter
sizeof COLORREF = 4 bytes
|
|||
![]() |
|
ouadji
4 bytes * (8*2) = 40h bytes = rd 10h
|
|||
![]() |
|
bitshifter
Oh yes, i missed that part (thought it was rb)
I only see the need for 64 bytes in the code. Either we are missing something or it is typo. Maybe Tomasz will clarify if he is listening... |
|||
![]() |
|
ouadji
a typo, i think so. |
|||
![]() |
|
Tomasz Grysztar
Definitely a typo.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.