Posts: 81
Threads: 37
Joined: Jun 2008
A number of comercial utilities allow you to "roll up" a window, removing all but the titlebar, which I think can also be done on macs (e.g.,
http://www.xneat.com,
http://www.shelltoys.com,
http://www.actualtools.com). How could this be done using QM? Simply resizing a window seems too crude and oftentimes does not remove all objects. I played around with SetWinStyle but couldn't find a way to remove everything but WS_CAPTION.
Posts: 12,072
Threads: 140
Joined: Dec 2002
Resize the window. No other ways exist.
set drivelabel and win rollup
Macro
def CCHILDREN_TITLEBAR 5
type TITLEBARINFO cbSize RECT'rcTitleBar rgstate[CCHILDREN_TITLEBAR+1]
dll user32 #GetTitleBarInfo hwnd TITLEBARINFO*pti
int h=win("Quick Macros")
RECT r; GetWindowRect h &r ;;save
TITLEBARINFO ti.cbSize=sizeof(TITLEBARINFO)
GetTitleBarInfo h &ti
siz 0 ti.rcTitleBar.bottom-ti.rcTitleBar.top h 1
5
siz 0 r.bottom-r.top h 1 ;;restore
Posts: 12,072
Threads: 140
Joined: Dec 2002
Function
WindowRollUp
;/
function hwnd !up ;;up: 1 roll up, 0 restore
;Resizes window so tht only title bar is visible.
;hwnd - window handle.
;EXAMPLES
;WindowRollUp win("" "notepad") 1
if up
,if(GetProp(hwnd "qm_roll_cy")) ret
,int cy
,GetWinXY hwnd 0 0 0 cy
,SetProp hwnd "qm_roll_cy" cy
,TITLEBARINFO ti.cbSize=sizeof(TITLEBARINFO)
,GetTitleBarInfo hwnd &ti
,siz 0 ti.rcTitleBar.bottom-ti.rcTitleBar.top hwnd 1
else
,cy=GetProp(hwnd "qm_roll_cy")
,if(!cy) ret
,RemoveProp hwnd "qm_roll_cy"
,siz 0 cy hwnd 1
Toolbar
Toolbar
Trigger
!a"Untitled - Notepad" "Notepad" "" "" "" 0x2
Roll Up :WindowRollUp GetToolbarOwner(TriggerWindow) 1
Roll Down :WindowRollUp GetToolbarOwner(TriggerWindow) 0