flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > user_colors rd 40h ? |
Author |
|
Tomasz Grysztar 12 Jul 2010, 13:39
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).
|
|||
12 Jul 2010, 13:39 |
|
ouadji 12 Jul 2010, 15:29
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 |
|||
12 Jul 2010, 15:29 |
|
LocoDelAssembly 12 Jul 2010, 16:56
Thread moved to IDE Development.
|
|||
12 Jul 2010, 16:56 |
|
bitshifter 12 Jul 2010, 18:30
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. |
||||||||||
12 Jul 2010, 18:30 |
|
edemko 12 Jul 2010, 18:42
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. |
|||
12 Jul 2010, 18:42 |
|
ouadji 12 Jul 2010, 18:52
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 |
|||
12 Jul 2010, 18:52 |
|
bitshifter 12 Jul 2010, 22:46
sizeof COLORREF = 4 bytes
|
|||
12 Jul 2010, 22:46 |
|
ouadji 12 Jul 2010, 23:03
4 bytes * (8*2) = 40h bytes = rd 10h
|
|||
12 Jul 2010, 23:03 |
|
bitshifter 12 Jul 2010, 23:55
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... |
|||
12 Jul 2010, 23:55 |
|
ouadji 13 Jul 2010, 06:14
a typo, i think so. |
|||
13 Jul 2010, 06:14 |
|
Tomasz Grysztar 13 Jul 2010, 10:30
Definitely a typo.
|
|||
13 Jul 2010, 10:30 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.