Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog hidden to edge
#2
In Archive there is something close to what you want.
https://www.quickmacros.com/forum/showth...p?tid=2852
this should be a good starting point.

Function dialog_autoshrink
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD
ax3SHD="http://www.quickmacros.com"
if(!ShowDialog("dialog_autoshrink" &dialog_autoshrink &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A48 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ActiveX 0x54030000 0x0 0 14 224 100 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2020100 "" ""

ret
;messages

DT_AutoShrink hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

Function DT_AutoShrink
Code:
Copy      Help
;/
function# hDlg message wParam lParam

;Adds simple auto-shrink (actually roll-up) feature for a dialog.
;The dialog must be a smart dialog, ie with dialog procedure.
;Insert the following statement in the dialog procedure, before 'sel message' line:

;DT_AutoShrink hDlg message wParam lParam


type DASDATA !shr RECT'r
DASDATA* d=+GetProp(hDlg "qm_das")

sel message
,case WM_INITDIALOG
,SetProp hDlg "qm_das" d._new
,goto shrink
,case WM_DESTROY
,d._delete; RemoveProp hDlg "qm_das"
,case [WM_SETCURSOR,WM_PARENTNOTIFY]
,if(d.shr) goto shrink
,case WM_TIMER
,sel wParam
,,case 1578
,,if(win(mouse)!=hDlg and !GetCapture) goto shrink
ret

;shrink
d.shr^1
if(d.shr)
,KillTimer hDlg 1578
,GetWindowRect hDlg &d.r
,TITLEBARINFO ti.cbSize=sizeof(TITLEBARINFO)
,GetTitleBarInfo hDlg &ti
,int hei
,if(ti.rgstate[0]&STATE_SYSTEM_INVISIBLE) hei=20
,else hei=ti.rcTitleBar.bottom-ti.rcTitleBar.top+4
,siz 0 hei hDlg 1
else
,siz 0 d.r.bottom-d.r.top hDlg 1
,SetTimer hDlg 1578 100 0


Messages In This Thread
Dialog hidden to edge - by macman - 02-03-2021, 01:15 AM
RE: Dialog hidden to edge - by redbull2k - 02-03-2021, 02:14 AM
RE: Dialog hidden to edge - by macman - 02-03-2021, 03:17 AM
RE: Dialog hidden to edge - by Kevin - 02-04-2021, 01:02 AM
RE: Dialog hidden to edge - by Kevin - 02-04-2021, 01:51 AM
RE: Dialog hidden to edge - by macman - 02-04-2021, 02:49 AM
RE: Dialog hidden to edge - by macman - 02-04-2021, 09:59 AM
RE: Dialog hidden to edge - by Davider - 03-01-2023, 03:34 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)