I have below a menubar in a dialog, I want to detect if the the menubar is not visible, ideally if the resizing cuts of the smallest part of the upper menu bar.
In the below code I output the the dialog size (height) after resizing but it doesn't work as it should.
EDIT:
The ?? in the line: ?? :410 are 2 downfacing arrows
Function resize_hide
The arrows are meant as part of rollup/rolldown.
I found the rollup function within the archive ("WindowRollUp") and it uses
TITLEBARINFO ti.cbSize=sizeof(TITLEBARINFO)
GetTitleBarInfo hwnd &ti
siz 0 ti.rcTitleBar.bottom-ti.rcTitleBar.top hwnd 1
But even with this code I can not detect if the the menubar is visible OR cut off partially.
In the below code I output the the dialog size (height) after resizing but it doesn't work as it should.
EDIT:
The ?? in the line: ?? :410 are 2 downfacing arrows
Function resize_hide
str md=
F
;BEGIN MENU
;?? :410
;item 1 :411
;item 2 :412
;item 3 :413
;END MENU
str dd=
;BEGIN DIALOG
;0 "" 0x90CC0AC8 0x0 0 0 246 42 "Dialog" "4"
;3 Edit 0x54030080 0x200 65 15 96 12 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040A00 "*" "" "" ""
str controls = "3"
str e3
if(!ShowDialog(dd &sub.DlgProc &controls 0 0 0 0 0 0 0 0 md)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,,int dw dh he
,case WM_DESTROY
,case WM_SIZE
,,;; --- Does not always capture height correctly
,,GetWinXY hDlg 0 0 dw dh
,,outt F"WM_SIZE dh : {dh}"
,,;; --- check if inputfield is visible (does not work)
,,;he=id(3 hDlg)
,,;if(!IsWindowVisible(he))....
,case WM_SIZING
,,;; --- Does not always capture height correctly
,,;GetWinXY hDlg 0 0 dw dh
,,;outt F"WM_SIZING dh : {dh}"
,,;; --- check if inputfield is visible (does not work)
,,;he=id(3 hDlg)
,,;if(!IsWindowVisible(he))....
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
The arrows are meant as part of rollup/rolldown.
I found the rollup function within the archive ("WindowRollUp") and it uses
TITLEBARINFO ti.cbSize=sizeof(TITLEBARINFO)
GetTitleBarInfo hwnd &ti
siz 0 ti.rcTitleBar.bottom-ti.rcTitleBar.top hwnd 1
But even with this code I can not detect if the the menubar is visible OR cut off partially.