Author Topic: Get Desktop Resolution  (Read 2861 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10723
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Get Desktop Resolution
« on: 2008-Apr-14 »
Code: GLBasic [Select]
        GetDesktopResolution(sx, sy)
       
        PRINT "Desktop: "+sx+", "+sy, 0,0
        SHOWSCREEN
        MOUSEWAIT


FUNCTION end_main:
ENDFUNCTION

INLINE
}
#ifdef WIN32
        #define SM_CXSCREEN 0
        #define SM_CYSCREEN 1
        extern "C" __stdcall int GetSystemMetrics(int);
#endif
namespace __GLBASIC__{
ENDINLINE


FUNCTION GetDesktopResolution: BYREF sx, BYREF sy
INLINE
        #ifdef WIN32
                sx = ::GetSystemMetrics(SM_CXSCREEN);
                sy = ::GetSystemMetrics(SM_CYSCREEN);
        #endif
ENDINLINE
ENDFUNCTION