flat assembler
Message board for the users of flat assembler.

Index > Windows > AsmEdit - Paint error line

Author
Thread Post new topic Reply to topic
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 04 Jul 2003, 10:13
Hi Privalov!

How are you? Here comes a little question...
Code:
341        ...
342        jmp     .paint_next_block
343    .get_color:
344        push    ecx edx
345        test    byte [edi],80h
346        jnz     .highlight_color
347        mov     eax,?
348        cmp     [.error_line],eax
349        je      .errorline_color
350        invoke  SetBkColor,ebx,[.background_color]
351        mov     al,[edi]
352        or      al,al
353        jnz     .syntax_color
354    .default_color:
355        invoke  SetTextColor,ebx,[.text_color]
356        jmp     .color_ok
357    .errorline_color:
358        invoke  SetBkColor,ebx,[.error_background]
359        invoke  SetTextColor,ebx,[.error_text]
360        jmp     .color_ok
361    .syntax_color:
362        ...
    

How can I find out the line number of the line which is going to be painted in the paint loop (need it on line 347 to check whether the current line is the error line or not - [.error_line] contains the line number of the error line)??

Thanks!
Tommy
Post 04 Jul 2003, 10:13
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 09 Jul 2003, 21:05
In the paint_screen loop the lines are drawn starting from the line of number stored in [window_line_number] variable - you can take that value, store in some other variable and increase it on each loop repetition to have the number of line that is being drawn currently.
Post 09 Jul 2003, 21:05
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 13 Jul 2003, 18:59
Thanks Privalov! Wink
Post 13 Jul 2003, 18:59
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.