Hi Chris,
as there are some demos with menus provided with Oxygenbasic there should be no problem. My interest here was to create menus within dialogs (like in the powerbasic code) using a resource file which I created with Resed.exe.
I did not implement the back colors of the menu which seem to need the MENUITEMINFO structure and SetMenuItemInfo function. But I was interested in the MessageBoxIndirect function. Also in accelerators (like F1, Ctrl-O, Ctrl-S) which cannot be used with DialogBox, so I used the CreateDialog macro instead.
Attached are the project files and a 64bit executable as a zip file. There is also a batch file which builds the exe file. (OxygenBasic is expected in c:\). Simp_menu.o2bas will create a 32bit exe, for a 64bit exe these lines must be changed to:
'Create Exe File: uncomment executable
'32 for Win32, 64 for Win64
' executable("Simp_menu.exe",32)
executable("Simp_menu.exe",64)
I developed the project creating a dll like I did with LV_StatusBar. To create a standalone executable I used this trick:
...
/*
sys hResources = loadlibrary "Simp_menu.dll"
if not hResources then
mbox "Error: Simp_menu.dll not found"
ExitProcess(1)
end if
*/
hResources = hInstance
...
In this way I can create and modify the resources in a dll, can develop and debug the main code and later put everything together in a single file. But of course this is only one way to achieve this goal, many roads lead to Rome.
Roland
.