-- example2.exw
-- (Wolf's "abberation")
-- This opens a blank window
-- and adds an EXIT item to a menubar

include win32lib.ew

constant SimpleWin =  
    create( Window, "Tiny 2", 0, Default, Default, 200, 100, 0 ),

    ExitMenu = create( Menu, "E&xit", SimpleWin, 0, 0, 0, 0, 0 ), 

    ExitNow = create(MenuItem,"Now!", ExitMenu, 0, 0, 0, 0, 0)

--------

procedure onMenu_Exit( integer self, integer event, sequence params )
    closeWindow( SimpleWin )
end procedure

--------

setHandler( ExitNow, w32HClick, routine_id("onMenu_Exit") )

WinMain( SimpleWin, Normal )

-- end of example2.exw
