flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > open last file! |
Author |
|
Kenny80 09 May 2005, 06:26
I added function i wanted in fasmw that of course didn't exist or i wouldn't create it DOH
fasmw now saves last file u opened so when start fasmw again it will open last used file at startup, this is of course change to IDE version since other ones don't have any point in such function! asm file i attach is for newest version of fasmw IDE 1.61.1 and i never added label in menu for this function so u could turn it off and on, beacuse i had no idea howto, never worked with menus before, and source isn't commented anywhere, but anyway if anyone wants this function just download asm source and replace old one under IDE dir, and almost forgot mention that it only saves 1 file and that is last, so even if u got 3 documents open i it will only savelast opened one and only open that one at startup...ah u know what i mean! *i hope* anyone is free add menu item for this or improve it more, plz post in this thread if so! suggest use winmerge to find where i added all this, my code is between "new begin" and "new end" this is what i added: section name in ini file is [File] and Path, so it knows where last file open was. invoke GetObject,ebx,sizeof.BITMAP,bm invoke ImageList_Create,[bm.bmWidth],[bm.bmHeight],ILC_COLOR4,1,0 or eax,eax jz failed mov [himl],eax invoke ImageList_Add,[himl],ebx,NULL invoke DeleteObject,ebx invoke SendMessage,[hwnd_tabctrl],TCM_SETIMAGELIST,0,[himl] ;New begin cmp [open_path] ,0 ; is path in "ini" file empty? jz new_one ; if so create new document as old fasm does mov [lparam],open_path ; filepath to lparam for later use invoke GetFileTitle,open_path,name_buffer,100h ; get file name mov [wparam],name_buffer ; save it to wparam for sendmessage jmp load_file ; Ok all done jump to old fasm code and load it new_one: ; if wasn't any path in ini file then run default fasm code below ;New end invoke SendMessage,[hwnd],FM_NEW,_untitled,0 cmp eax,-1 je failed mov esi,[program_arguments]
|
|||||||||||
09 May 2005, 06:26 |
|
coconut 09 May 2005, 16:11
nice work. i think it would be convenient to have a recent files menu, showing the last 4-5 files worked on
|
|||
09 May 2005, 16:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.