flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > fasm with IUP toolkit

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 8904
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
i did the export thing
now can load file and export changes.

Code:
proc miexport_cb
  cinvoke IupSetAttribute,[dlgfile],"DIALOGTYPE","SAVE"
           cinvoke IupPopup,[dlgfile],IUP_CENTER,IUP_CENTER
                    cinvoke IupGetAttribute,[dlgfile],"VALUE"
                         .if     eax <> NULL
                                   stdcall FileOpen,eax,GENERIC_WRITE,CREATE_ALWAYS
                                            mov     [fhexport],eax
                                                      stdcall iupmatrix_csv_export,[mat1]
                                                         stdcall FileWrite,[fhexport],[matheapincoming],FILE_END
                                     invoke  CloseHandle,[fhexport]
                              .endif
                                      cinvoke IupMessage,"Status","Exported"
  mov     eax,IUP_DEFAULT
     ret
endp
    


Code:
iupmatrixcsvexport1   db '%i:%i',0
iupmatrixcsvexport2       db 9,0
iupmatrixcsvexport3   db CR,LF,0
; required :
;             [matheapincoming]       : store processed string before copy to fhandle, size = file size + 10
;         buff                            : general buffer to store lns:col string
proc iupmatrix_csv_export math
locals
        lns                     dd 0
        col                     dd 0
endl
        cinvoke IupGetInt,[math],"NUMLIN"
                 inc     eax
         mov     [lns],eax
   cinvoke IupGetInt,[math],"NUMCOL"
                 inc     eax
         mov     [col],eax
   
    invoke  HeapSize,[heapprocess],NULL,[matheapincoming]
       invoke  RtlZeroMemory,[matheapincoming],eax
 
                    mov     edx,1           ; lns
                       mov     eax,1           ; col
                       .while edx <> [lns]
                           .while eax <> [col]
                                   push eax edx
                                                cinvoke wsprintf,buff,iupmatrixcsvexport1,edx,eax
                                           cinvoke IupGetAttribute,[mat1],buff
                                         invoke  lstrcat,[matheapincoming],eax
                                       pop edx eax
                                         inc eax
                                                     push eax edx
                                                                .if eax < [col]
                                                                  invoke  lstrcat,[matheapincoming],iupmatrixcsvexport2
                                                               .endif
                                                      pop edx eax
                         .endw
                               inc edx
                                     push eax edx
                                                .if edx < [lns]
                                                  invoke  lstrcat,[matheapincoming],iupmatrixcsvexport3
                                               .endif
                                      pop edx eax
                         mov eax,1
                   .endw
       
    ret
endp
    
Post 25 May 2012, 20:39
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8904
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
you could use the helper tools inside IUP to create a dialog then output it into c, or lua code file.

Code:
format PE GUI 4.0

include 'win32ax.inc'

.code
start:
 cinvoke IupOpen,NULL,NULL
   cinvoke IupControlsOpen
     cinvoke IupLayoutDialog,NULL
        cinvoke IupShow,eax
 cinvoke IupMainLoop
 cinvoke IupClose
    invoke  ExitProcess,0
       
.data
   dlg                     dd 0

section '.idata' import data readable writeable
library        kernel32,       'kernel32.dll',\
         user32,         'user32.dll',\
           msvcrt,         'msvcrt.dll',\
           iup,            'iup.dll',\
              iupcontrols,'iupcontrols.dll'

         include 'API\KERNEL32.INC'
               include 'API\USER32.INC'
         include 'API\MSVCRT.INC'
         include 'API\IUP.INC'
            include 'API\IUPCONTROLS.INC'
    


Description: contained exe that help you to create dialog then export it into C, LUA, or LED code.

nice tool inside iup toolkit.

Download
Filename: dialog.zip
Filesize: 552 Bytes
Downloaded: 350 Time(s)

Post 29 May 2012, 05:27
View user's profile Send private message Reply with quote
hopcode



Joined: 04 Mar 2008
Posts: 563
Location: Germany
hopcode
this toolkit deserves some very positive notes. using 64bit libs (~5Mb)
i have managed ~10 mins. a test from your "iup.inc" + "iupweb.inc"
using its IE-Webbrowser embedded in its dialog object.
a screenshot :

Image

_________________
⠓⠕⠏⠉⠕⠙⠑
Post 15 Sep 2012, 11:21
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:  
Goto page Previous  1, 2

< 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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.