format PE GUI 4.0
entry Start

include '%finc%/win32/win32a.inc'
include '%finc%/libs/msgutils.inc'
include '%finc%/libs/templates.inc'
include '%finc%/libs/TForm.inc'
include '%finc%/libs/parents.inc'


section '.code' code readable executable
..ShowSizes = 1
..ShowSkipped = 0

include '%finc%/libs/msgutils.asm'
include '%finc%/libs/templates.asm'
include '%finc%/libs/TForm.asm'
include '%finc%/libs/parents.asm'

include 'mainwindow.frm'

uglobal
  hMainForm dd ?
  hInstance dd ?
endg

Start:
        invoke  GetModuleHandleA, 0
        mov     [hInstance], eax
        InitializeAll

        stdcall CreateForm, frmMainWindow, NULL
        mov     [hMainForm],ebx

        include '%finc%/libs/mainloop.asm'
        push    eax
        FinalizeAll
        invoke  ExitProcess


section '.idata' data import readable writeable
ImportTable:
include '%finc%/win32/allimports.asm'
DispSize 'ImportTable', $ - ImportTable

section '.data' data readable writeable
IncludeAllGlobals
