finding the screen resolution

[b][red]This message was edited by ClancyDamon at 2003-5-18 20:14:27[/red][/b][hr]
The title says it. How can I determine the current resolution of the screen in pixels? (800x600 and so on)
Please note that I really have no idea (currently) about how to use API, so if you could explain all that the little setup details, that would be great.

Comments

  • : [b][red]This message was edited by ClancyDamon at 2003-5-18 20:14:27[/red][/b][hr]
    : The title says it. How can I determine the current resolution of the screen in pixels? (800x600 and so on)
    : Please note that I really have no idea (currently) about how to use API, so if you could explain all that the little setup details, that would be great.
    :
    :
    [blue]int GetSystemMetrics(). You will have to look it up on www.msdn.microsoft.com because it returns a whole lot of stuff[/blue]
    [code]
    This is only a sample of all the stuff this function will return.

    DWORD dwWidth = GetSystemMetrics(SM_CXBORDER);
    DWORD dwHeight = GetSystemMetrics(SM_CYBORDER);

    [/code]
  • : : [b][red]This message was edited by ClancyDamon at 2003-5-18 20:14:27[/red][/b][hr]
    : : The title says it. How can I determine the current resolution of the screen in pixels? (800x600 and so on)
    : : Please note that I really have no idea (currently) about how to use API, so if you could explain all that the little setup details, that would be great.
    : :
    : :
    : [blue]int GetSystemMetrics(). You will have to look it up on www.msdn.microsoft.com because it returns a whole lot of stuff[/blue]
    : [code]
    : This is only a sample of all the stuff this function will return.
    :
    : DWORD dwWidth = GetSystemMetrics(SM_CXBORDER);
    : DWORD dwHeight = GetSystemMetrics(SM_CYBORDER);
    :
    : [/code]
    :

    Using GetSystemMetrics() very easy to use simply follow the instructions provided. Also you can find out plenty more with this function such as your client area size, mouse cursor size, etc. If your new to Win32 API's you should read a few books on Win32 API to get started it will definitely benefit you in the long run because a lot of the API's don't really make sense even if you read the msdn.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion