Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WS_BORDER
#1
Use SetWindowLong, then force window to repaint. Removing border also removes caption.

Code:
Copy      Help
int h=win("Notepad")
SetWindowLong(h GWL_STYLE GetWindowLong(h GWL_STYLE)~(WS_BORDER|WS_DLGFRAME|WS_THICKFRAME))
siz 200 200 h
#2
nice.
and how to switch back to the original state ?
pi
#3
the forum mailer said 'error sending mail' ... but it seems to work ...
pi
#4
new approach ...

and how to switch back to the original state ?
pi
#5
Code:
Copy      Help
int h=win("Notepad")
act h
RECT r; GetWindowRect(h &r)
int pst=SetWindowLong(h GWL_STYLE GetWindowLong(h GWL_STYLE)~(WS_BORDER|WS_DLGFRAME|WS_THICKFRAME))
MoveWindow(h r.left r.top r.right-r.left r.bottom-r.top-1 1)
3
SetWindowLong(h GWL_STYLE pst)
MoveWindow(h r.left r.top r.right-r.left r.bottom-r.top 1)
#6
thanks Big Grin
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)