Message board for the users of flat assembler.
> IDE Development > Using AsmEdit
I think these information can be helpfull for everyone
1. How to Use AsmEdit
You have three options:
i. Standard AsmEdit control, from DLL (easiest Wink): search this forum for latest AsmEdit control in DLL (may require updating control's core to latest files, but don't worry about it), then in your program: load this DLL, call RegisterAsmEditClass function, and from now you can use AsmEdit in a similar way you use standard Edit (create window of 'ASMEDIT' class).
ii. Standard AsmEdit control, compiled with your project (recommended): get latest FASMW, all files from \source\ide directory (but from \source\ide\fasmw copy only asmedit.inc and asmedit.ash). Then include asmedit.ash and asmedit.inc in your source. Add this code in the beginning (initialization part):
This will register asmedit. Don't forget to define _asmedit_class string.
Now you can use this conrol just like in first paragraph.
iii. AsmEdit control from Fresh: more difficult, as this control is more complex (has margin, supports bookmarks, themes...). You have to proceed like in ii., but there are more things to do when initializing AsmEdit: you have to provide bookmark and other icons (AEM_SETICONS message), set theme (AEM_SETTHEME)... and it requires Fresh macro library (uglobal macro).
Of sourse I didn't described every detail, if you will have any problems then feel free to ask.
Proably in each case you would want to set some different font after creating AsmEdit control. I'd recommend starting with ii., you have FASMW source as an example.
|07 Dec 2005, 10:34||
I verified we need these other
_asmedit_class db 'ASMEDIT',0
asmedit_font dd 0
whell_scroll_lines dd 3
case_table rb 100h
|07 Dec 2005, 10:36||
Problem: when using AEM_GETLINE
I don't know why...with
invoke SendMessage, [hAsmEditwin], AEM_GETLINE, dword 6, Buff
if the source line .6 is 'test', in Buff I find 'est'.
I verified: line 499 in 'BLOCKS.INC'
edx is set '1'....
solution? what's wrong?
|07 Dec 2005, 11:03||
How to obtain the total line number of the source code loaded in AsmEdit?
|08 Dec 2005, 12:23||
You can't do it directly (currently there's no such message). You have to:
1. Store current position (AEM_GETPOS).
2. go to last line (AEM_SETPOS with caretLine and caretSelectionLine set to -1).
3. Read current position (AEM_GETPOS again). Then read aepos.caretLine - it will contain last line number.
4. Restore previous position by calling AEM_SETPOS again with position obtained in 1).
|08 Dec 2005, 14:16||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.