include '%lib%/freshlib.inc'

@BinaryType GUI

uses gdi32, comctl32

LIB_MODE equ old

include '%lib%/freshlib.asm'
include "%lib%/graphics/rectangles.asm"

include '%finc%/libs/msgutils.inc'
include '%finc%/libs/templates.inc'
include '%finc%/libs/gui.inc'
include '%finc%/libs/TForm.inc'

include '%finc%/libs/msgutils.asm'
include '%finc%/libs/templates.asm'
include '%finc%/libs/TForm.asm'
include '%finc%/libs/gui.asm'
include '%finc%/libs/SplitGrid2.asm'


include 'MainForm.frm'

uglobal
  hMainForm dd ?
  hInstance dd ?

  hIml            dd ?  ; handle of image list for the toolbar/menu
  hImlGray        dd ?  ; handle of image list for disabled buttons/menu

endg

ImageChecked    = 0   ; index of the Image used for checked menu items, when there is no icon.


start:
        invoke  GetModuleHandleA, 0
        mov     [hInstance], eax

        InitializeAll

        call    RegisterFormClass
        stdcall CreateForm, frmMainForm, NULL
        mov     [hMainForm],ebx

include '%finc%/libs/mainloop.asm'

        push    eax
        FinalizeAll
        invoke  ExitProcess

