Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable macro in full screen
#2
Get window handle and call this function. If returns 1, let the macro exit.

Function IsFullScreenWindow
Code:
Copy      Help
;/
function! w

;Returns 1 if window w is full-screen, 0 if not.

;w - window handle.


RECT r, rc, rm;
if(!GetWindowRect(w &r)) ret
int cx(r.right - r.left) cy(r.bottom - r.top)
if(cx < 400 || cy < 300) ret
GetClientRect w &rc
if(rc.right != cx || rc.bottom != cy)
,if(cx - rc.right > 2 || cy - rc.bottom > 2) ret

MONITORINFO m.cbSize=sizeof(m)
if(!GetMonitorInfo(MonitorFromWindow(w 0) &m)) ret
rm = m.rcMonitor
if(r.left > rm.left || r.top > rm.top || r.right < rm.right || r.bottom < rm.bottom - 1) ret

int ws=GetShellWindow
if(w=ws || GetWindowThreadProcessId(w 0)=GetWindowThreadProcessId(ws 0)) ret
if(w == GetDesktopWindow) ret

ret 1


Messages In This Thread
Disable macro in full screen - by don_AC64 - 12-16-2018, 06:09 PM
RE: Disable macro in full screen - by Gintaras - 12-17-2018, 08:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)