MenuHeight()
MenuHeight()
shouldn't it be MenuHeight(#Menu) ?
Trond why are you right always
But it would only make sense if PB could set the menuhight
http://msdn.microsoft.com/library/en-us ... nuinfo.asp
http://msdn.microsoft.com/library/en-us ... o.asp[url]

But it would only make sense if PB could set the menuhight

http://msdn.microsoft.com/library/en-us ... nuinfo.asp
http://msdn.microsoft.com/library/en-us ... o.asp[url]
Last edited by ABBKlaus on Fri Jun 02, 2006 11:03 am, edited 1 time in total.
This demonstrates how to retrieve the complete menuheight :
Code: Select all
#OBJID_MENU = $FFFFFFFD
Structure MENUBARINFO
cbSize.l
rcBar.RECT
hMenu.l
hwndMenu.l
fBarFocused.w
fFocused.w
EndStructure
If OpenWindow(0, 200, 200, 200, 100, "Menu Height",#PB_Window_SystemMenu|#PB_Window_SizeGadget)
If CreateMenu(0, WindowID(0)) ; here the menu creating starts....
MenuTitle("Menu 1")
MenuTitle("Menu 2")
MenuTitle("Menu 3")
MenuTitle("Menu 4")
MenuTitle("Menu 5")
MenuTitle("Menu 6")
MenuTitle("Menu 7")
MenuTitle("Menu 8")
MenuTitle("Menu 9")
EndIf
EndIf
Repeat
Event=WaitWindowEvent()
Select Event
Case #PB_Event_Repaint
;Debug MenuHeight()
;http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/menus/menureference/menufunctions/getmenubarinfo.asp
test.MENUBARINFO
test\cbSize=SizeOf(MENUBARINFO)
If GetMenuBarInfo_(WindowID(0),#OBJID_MENU,0,test)
Debug test\rcBar\bottom-test\rcBar\top
EndIf
EndSelect
Until Event=#PB_Event_CloseWindow