Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 12th, 2005, 4:13 PM   #1
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
Win32 API -- SM_CXSCREEN with 2 monitors

for some reason, the return value of GetSystemMetrics with CM_XSCREEN is only 1280 when I'm running two monitors at 1280x1024 each. Shouldn't it return 2560? If not, what can I do to get the total display size? I know I can just multiply the value by two, but what if I don't know whether the system I'm running on will have dual monitors?
uman is offline   Reply With Quote
Old Jun 12th, 2005, 4:28 PM   #2
Animatronic
Programmer
 
Join Date: Jun 2005
Posts: 99
Rep Power: 4 Animatronic is on a distinguished road
SM_CXSCREEN gives you the width of the primary monitor.

take a look at the GetSystemMetrics() documentation here .

i think you want SM_XVIRTUALSCREEN and SM_YVIRTUALSCREEN for the total screen area.
Animatronic is offline   Reply With Quote
Old Jun 12th, 2005, 11:20 PM   #3
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
Well, you're wrong: it's SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN, but you pointed me in the right direction, and for that I thank you.
uman is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:03 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC