Hi,
The resolution of my monitor is 1920 x 1080. However, the ScrResolution() function returns
{ 1536, 864 }. Why ?
nSCR1 := GetSysMetrics(0)
nSCR2 := GetSysMetrics(1)
Natter wrote:Hi,
The resolution of my monitor is 1920 x 1080. However, the ScrResolution() function returns
{ 1536, 864 }. Why ?
#define HORZRES 0x0008 // ( 8) Horizontal width in pixels
#define VERTRES 0x000A // ( 10) Vertical width in pixels
#define LOGPIXELSX 0x0058 // ( 88) Logical pixels/inch in X
#define LOGPIXELSY 0x005A // ( 90) Logical pixels/inch in Y
#define DESKTOPVERTRES 0x0075 // (117) Vertical height of entire desktop in pixels
#define DESKTOPHORZRES 0x0076 // (118) Horizontal width of entire desktop in pixels
Function GetDeskSize(nHDC,lVirtual)
LOCAL nWidth,nHeight
nWidth := HMG_CallDLL('GDI32.dll', DLL_OSAPI, 'GetDeviceCaps', nHDC, iif(lVirtual, HORZRES, DESKTOPHORZRES))
nHeight := HMG_CallDLL('GDI32.dll', DLL_OSAPI, 'GetDeviceCaps', nHDC, iif(lVirtual, VERTRES, DESKTOPVERTRES))
RETURN{nWidth,nHeight}
karinha wrote:how do I do this in FiveWin? I don't use HMG.
HB_FUNC( GETDEVICECAPS ) // () HDC, int iIndex
#define DESKTOPVERTRES 0x0075 // (117) Vertical height of entire desktop in pixels
#define DESKTOPHORZRES 0x0076 // (118) Horizontal width of entire desktop in pixels
Vertical := GetDeviceCaps(DC, 0x0075)
Horizontal := GetDeviceCaps(DC, 0x0076)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 50 guests