Created
September 22, 2013 20:02
-
-
Save unknownbrackets/6663252 to your computer and use it in GitHub Desktop.
snippet: multi monitor fun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int screenWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN); | |
const int screenHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN); | |
const int screenX = GetSystemMetrics(SM_XVIRTUALSCREEN); | |
const int screenY = GetSystemMetrics(SM_YVIRTUALSCREEN); | |
bool visibleHorizontally = ((g_Config.iWindowX + g_Config.iWindowWidth) >= screenX) && | |
((g_Config.iWindowX + g_Config.iWindowWidth) < (screenWidth + g_Config.iWindowWidth)); | |
bool visibleVertically = ((g_Config.iWindowY + g_Config.iWindowHeight) >= screenY) && | |
((g_Config.iWindowY + g_Config.iWindowHeight) < (screenHeight + g_Config.iWindowHeight)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment