Board index » cppbuilder » How to find out dimensions of current display (not screen)?
M_R
![]() CBuilder Developer |
M_R
![]() CBuilder Developer |
How to find out dimensions of current display (not screen)?2005-05-06 04:37:50 PM cppbuilder25 How to find out dimensions of current display? With my ATI graphic card I am able to set the resolution larger than the display's capabilities, so when the mouse reaches the border the shown region scrolls, i.e. the monitor only shows a part of the complete screen. So Screen->Width/Height contains the complete with/height of the screen. How can I find out the Width/Height of the display? Btw: How can I find out the dimensions of the second monitor (screen and display) and how can I open a Window inside the second monitor? Thanks a lot, Michael |
PaoloItaly
![]() CBuilder Developer |
2005-05-06 07:02:22 PM
Re:How to find out dimensions of current display (not screen)?
GetDeviceCaps()
|
M_R
![]() CBuilder Developer |
2005-05-07 02:10:10 PM
Re:How to find out dimensions of current display (not screen)?
My current virtual screen size is 2048x1536, while my current used
(and max.) laptop-display resolution is 1024x768. I'm trying some parameters but did never get the desired 1024/768 values: Trying HDC hdc=GetDC(NULL); // results right: a 1024 x 768 display inside a 2048 x 1536 screen int horz_res=GetDeviceCaps(hdc,HORZRES); // 2048 int vert_res=GetDeviceCaps(hdc,VERTRES); // 1536 int desktop_horz_res=GetDeviceCaps(hdc,DESKTOPHORZRES); // 2048 int desktop_vert_res=GetDeviceCaps(hdc,DESKTOPVERTRES); // 1536 All these result in the virtual resolution of 2048/1536. What parameter do I have to use to get 1024/768 as result? Thanks, Michael {smallsort} |