Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
window restore
#2
Save window dimensions and later restore:

Code:
Copy      Help
int cx cy h=win("Notepad")
GetWinXY(h 0 0 &cx &cy)

;...

siz cx cy h

or

Code:
Copy      Help
int h=win("Notepad")
RECT r0; GetWindowRect(h &r0)

;...

MoveWindow(h r0.left r0.top r0.right-r0.left r0.bottom-r0.top 1)

if restore must be in other macro, declare variables as global (int+ cx cy, etc),
or save to Registry (rset cx "xxx" ... rget cx "xxx").
Alternatively, use function ArrangeWindows which can save to registry and later
restore dimensions of single or multiple windows:

Code:
Copy      Help
ArrangeWindows 6 "Notepad"

;...

ArrangeWindows 7 "Notepad"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)