menu #rpt, " Category Cost Date Description Period Remarks" , "", [x] Open "Diary Report by " + seq$ for text_fs as #rpt hMain=hWnd(#rpt) hMainMenu=GetMenu(hMain) hMainEdit=GetSubMenu(hMainMenu,1) result=RemoveMenu(hMainMenu,hMainEdit) Call DrawMenuBar hWnd(#rpt) hMainEdit=GetSubMenu(hMainMenu,1) result=RemoveMenu(hMainMenu,hMainEdit) Call DrawMenuBar hWnd(#rpt) return Sub DrawMenuBar hWnd CallDLL #user32, "DrawMenuBar",_ hWnd As ulong, r As boolean End Sub Function GetSubMenu(hMenuBar,nPos) CallDLL #user32, "GetSubMenu",_ hMenuBar As ulong, nPos As long,_ GetSubMenu As ulong End Function Function GetMenu(hWnd) CallDLL #user32, "GetMenu",hWnd As ulong,_ GetMenu As ulong End Function Function RemoveMenu(hMenu,hSubMenu) CallDLL #user32, "RemoveMenu", hMenu As ulong,_ hSubMenu As ulong, _MF_BYCOMMAND As ulong,_ RemoveMenu As boolean End Function
NoMainWin WindowWidth=800 : WindowHeight=600 menu #rpt, "Category Cost Date_ Description Period Remarks" Open "Menu Report Headings " for text as #rpt #rpt "!TrapClose [quit]" hMain=hWnd(#rpt) hMainMenu=GetMenu(hMain) hMainEdit=GetSubMenu(hMainMenu,1) result=RemoveMenu(hMainMenu,hMainEdit) Call DrawMenuBar hWnd(#rpt) hMainEdit=GetSubMenu(hMainMenu,1) result=RemoveMenu(hMainMenu,hMainEdit) Call DrawMenuBar hWnd(#rpt) Wait [quit] close #rpt end Sub DrawMenuBar hWnd CallDLL #user32, "DrawMenuBar",_ hWnd As ulong, r As boolean End Sub Function GetSubMenu(hMenuBar,nPos) CallDLL #user32, "GetSubMenu",_ hMenuBar As ulong, nPos As long,_ GetSubMenu As ulong End Function Function GetMenu(hWnd) CallDLL #user32, "GetMenu",hWnd As ulong,_ GetMenu As ulong End Function Function RemoveMenu(hMenu,hSubMenu) CallDLL #user32, "RemoveMenu", hMenu As ulong,_ hSubMenu As ulong, _MF_BYCOMMAND As ulong,_ RemoveMenu As boolean End Function
|