Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to "roll up" a window
#1
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.
#2
Resize the window. No other ways exist.

set drivelabel and win rollup

Macro
Code:
Copy      Help
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
#3
Function WindowRollUp
Code:
Copy      Help
;/
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     Help - how to add the trigger to the macro
Code:
Copy      Help
Roll Up :WindowRollUp GetToolbarOwner(TriggerWindow) 1
Roll Down :WindowRollUp GetToolbarOwner(TriggerWindow) 0


Forum Jump:


Users browsing this thread: 1 Guest(s)