I have created 70% or more of a windows gui. This is the code to create a windows menu. Keep in mind its a bit messy
you can even put them on the BlitzMaxGL window with GetActiveWindow() instead of "winhwnd" and abit of modification. I hope it helps you
If you need any other code just email me
Global group_ Global pop_ Global pop2_ Global id_ Local newmenu:TMenu = New TMenu Type TMenu Field hwnd:Int Method Create( group_ ) Self.hwnd = PMCreateMenu() PMSetMenu(group_, Self.hwnd) FlushMem() Return group End Method Method Title( id_,item:String ) hmenu = PMGetMenu(winhwnd) pop_=PMCreatePopupMenu() count=PMgetmenuitemcount(hmenu) mi:MENUITEMINFO = New MENUITEMINFO itemgad:String = item:String mi.cbsize=SizeOf(mi) mi.fmask=MIIM_TYPE|MIIM_SUBMENU mi.ftype=MFT_STRING mi.hsubmenu=pop_ mi.wid=id_ mi.dwtypedata=Int(itemgad.ToCString()) PMInsertMenuItem(Self.hwnd,count+1,1,mi) PMdrawmenubar(winhwnd) FlushMem() End Method Method Break() hmenu = PMGetSubMenu(pop_,0) count=PMgetmenuitemcount(hmenu) mi:MENUITEMINFO = New MENUITEMINFO mi.cbsize=SizeOf(mi) mi.fmask=MIIM_ID | MIIM_TYPE mi.ftype= MFT_SEPARATOR PMInsertMenuItem(pop_,count,1,mi) PMdrawmenubar(winhwnd) FlushMem() End Method Method Item( item:String ) hmenu = PMGetSubMenu(pop_,0) count=PMgetmenuitemcount(hmenu) mi:MENUITEMINFO = New MENUITEMINFO itemgad:String = item:String mi.cbsize=SizeOf(mi) mi.fmask=MIIM_ID | MIIM_TYPE mi.wid=IDM_NEW2 mi.ftype= MFT_STRING mi.dwtypedata=Int(itemgad.ToCString()) PMInsertMenuItem(pop_,count,1,mi) PMdrawmenubar(winhwnd) FlushMem() End Method Method SubMenu( item:String ) hmenu = PMGetSubMenu(pop_,0) pop2=PMCreatePopupMenu() count=PMgetmenuitemcount(hmenu) mi:MENUITEMINFO = New MENUITEMINFO itemgad:String = item:String mi.cbsize=SizeOf(mi) mi.fmask=MIIM_ID | MIIM_TYPE | MIIM_SUBMENU mi.wid=IDM_NEW1 mi.ftype= MFT_STRING mi.hsubmenu=pop2_ mi.dwtypedata=Int(itemgad.ToCString()) PMInsertMenuItem(pop_,count,1,mi) PMdrawmenubar(winhwnd) FlushMem() End Method Method SubItem( item:String ) hmenu = PMGetSubMenu(pop2_,0) count=PMgetmenuitemcount(hmenu) mi:MENUITEMINFO = New MENUITEMINFO itemgad:String = item:String mi.cbsize=SizeOf(mi) mi.fmask=MIIM_ID | MIIM_TYPE mi.wid=IDM_NEW1 mi.ftype= MFT_STRING mi.dwtypedata=Int(itemgad.ToCString()) PMInsertMenuItem(pop2_,count,1,mi) PMdrawmenubar(winhwnd) FlushMem() End Method End Type
you can even put them on the BlitzMaxGL window with GetActiveWindow() instead of "winhwnd" and abit of modification. I hope it helps you
If you need any other code just email me