Code: Select all
;ToolBar Height
SendMessage_(ToolBarID(0), #TB_GETRECT, 0,r.RECT)
tbHeight = r\bottom-r\top
Code: Select all
;StatusBar Height
SendMessage_(StatusBarID(0), #SB_GETRECT, 0,r.RECT)
sbHeight = r\bottom-r\top
Code: Select all
;ToolBar Height
SendMessage_(ToolBarID(0), #TB_GETRECT, 0,r.RECT)
tbHeight = r\bottom-r\top
Code: Select all
;StatusBar Height
SendMessage_(StatusBarID(0), #SB_GETRECT, 0,r.RECT)
sbHeight = r\bottom-r\top
But I'm not, because the results don't match.RASHAD wrote:OK ,be happy
Code: Select all
; Run this on 5.51
hWnd=OpenWindow(0,200,200,400,195,"test",#PB_Window_SystemMenu)
CreateToolBar(0,hWnd)
CreateStatusBar(0,hWnd)
Debug MenuHeight() ; 20
Debug GetSystemMetrics_(#SM_CYMENU) ; 20
Debug ""
Debug ToolBarHeight(0) ; 28
SendMessage_(ToolBarID(0),#TB_GETRECT,0,r.RECT)
Debug r\bottom-r\top ; 0
Debug ""
Debug StatusBarHeight(0) ; 23
SendMessage_(StatusBarID(0),#SB_GETRECT,0,r.RECT)
Debug r\bottom-r\top ; 21
Code: Select all
hWnd=OpenWindow(0,200,200,400,195,"test",#PB_Window_SystemMenu)
TB = CreateToolBar(0,hWnd)
ToolBarStandardButton(0, #PB_ToolBarIcon_New)
SB = CreateStatusBar(0,hWnd)
Debug MenuHeight() ; 20
Debug GetSystemMetrics_(#SM_CYMENU) ; 20
Debug ""
Debug ToolBarHeight(0) ; 28
SendMessage_(TB,#TB_GETRECT,0,r.RECT)
pad = SendMessage_(TB,#TB_GETPADDING,0,0)
Debug r\bottom-r\top + pad >> 16
Debug ""
Debug StatusBarHeight(0) ; 23
SendMessage_(SB,#SB_GETRECT,0,r.RECT)
Dim pad(2)
SendMessage_(SB,#SB_GETBORDERS,0,@pad())
Debug r\bottom-r\top + pad(1)