I took source code newlisp (v 10.0.1) and modified it.
Code compiled in old IDE MinGW Developer Studio.
Code and program (without console window) are here
and sample program for build exe module from NewLisp code is here
Thanks.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
(import "kernel32.dll" "FreeConsole")
(FreeConsole)
(load "sgui.lsp")
(define (menu_demo)
(set 'iWindows (sgui:CreateWin 100 200 195 260 (address "Menu demo Window") ( | sgui:WF_SystemMenu sgui:WF_TitleBar sgui:WF_MinimizeWidget sgui:WF_MaximizeWidget sgui:WF_SizeWidget)))
;(println iWindows (number? iWindows))
(if (not (null? iWindows))
(begin
(set 'mainMenu (sgui:CreateMainMenu iWindows))
;(println mainMenu (number? mainMenu))
(if (not (null? mainMenu))
(begin
(sgui:CreateMenuTitle "File")
(sgui:CreateMenuItem 1 "Open")
(sgui:CreateMenuItem 2 "Save")
(sgui:CreateMenuItem 3 "Close")
(sgui:CreateMenuSeparator)
(sgui:CreateMenuItem 6 "&Exit")
(sgui:CreateMenuTitle "Edit")
(sgui:CreateMenuItem 118 "Undo")
(sgui:CreateMenuItem 9 "Redo")
(sgui:CreateMenuItem 10 "Find")
(sgui:CreateMenuSeparator)
(sgui:CreateMenuItem 12 "Find Files")
)
)
(while (!= EventID sgui:WE_CloseWindow)
(set 'EventID (sgui:StartWinEvent))
)
(sgui:CloseWin iWindows)
)
)
)
(menu_demo)
(exit)