Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Test Code",300,300,200,200, %WS_OverlappedWindow To hDlg
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
Local i,j as Long
i = captionHeight(Cb.Hndl)
j = (GetSystemMetrics(%Sm_cycaption))
? str$(i) + str$(j)
End Select
End Function
Function captionHeight(hWnd As Dword) As Long
Local cw,ch,ddw,ddh As Long
Dialog Get Size hWnd To ddw,ddh
Dialog Get Client hWnd To cw,ch
Function = ddh-ch
End Function
'gbs_00741
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm