obtain the screen resolution

Posted on 2005-05-03
Last Modified: 2013-11-20
I want to be able to obtain the screen resolution of the monitor.
if its a single montor  having (1600 X 1200) then i can it display it fine.

But if i have a dual monitor/Dual display i want to be able to display 3200 by 2400.

how can i retireve this information using any function??.

I tried getsystemmetrics function using the
but it only gave me (1600 X1200) and not the actual 3200 by 2400 for the dual monitor display

Question by:hari4130
    LVL 55

    Expert Comment

    by:Jaime Olivares
    LVL 55

    Accepted Solution

    int width = ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
    int height = ::GetSystemMetrics(SM_CXVIRTUALSCREEN);
    LVL 55

    Expert Comment

    by:Jaime Olivares
    Sorry, cut and paste problems:
    int height = ::GetSystemMetrics(SM_CYVIRTUALSCREEN);


    Author Comment

    thanks for the quick answer

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
    Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now