Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if window has no maximizebox and is desktop visible
#1
QUESTION 1
Is this correct code to check if a window has no maximizebox (top right)?
(Got the style from here: https://msdn.microsoft.com/en-us/librar ... 00(v=vs.85).aspx)


Quote:WS_MAXIMIZEBOX
0x00010000L
The window has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.

Macro Macro11
Code:
Copy      Help
int st=GetWinStyle(w1)
int i=st&WS_MAXIMIZEBOX
if(i=0)
,out "No Maximizebox"

QUESTION 2
Is it possible to check if the desktop on the MAIN monitor is visible?
Some applications and games go full screen and cover the full monitor.
I want to check if the main monitor is fully covered by an application.

I have this which is easily generated through Windows, controls
Macro Macro11
Code:
Copy      Help
int w2=win("Program Manager" "Progman")
if !IsWindowVisible(w2)
,out "Desktop is not visible..."
This might not be best approach, maybe better to get X Y width height:

Macro Macro12
Code:
Copy      Help
int x y w h
GetWorkArea x y w h 1 0
And then check if that area is covered 100%, but how do proceed with that?
#2
1. I would use the same code.

2.
Macro Macro2874
Code:
Copy      Help
int w=win(ScreenWidth-3 ScreenHeight-3)
;outw w
if !WinTest(w "Shell_TrayWnd")
,out "full-screen"
#3
Thank you!


Forum Jump:


Users browsing this thread: 3 Guest(s)