How detect current screen resolution?

前端 未结 7 1034
悲哀的现实
悲哀的现实 2020-11-27 04:00

How do I from Winapi (in C or C++) detect the current screen resolution?

Some background:

I want to start a new OpenGL fullscreen window, but want it open wi

相关标签:
7条回答
  • 2020-11-27 04:40

    Deleted about a week ago, then edited 3-4-13.

    Here's a good one for situations where the user has decided to run their desktop in a lower resolution (bad idea) or corner cases where a person decided to get a monitor that their graphics controller couldn't take full advantage of:

    // get actual size of desktop
    RECT actualDesktop;
    GetWindowRect(GetDesktopWindow(), &actualDesktop);
    
    0 讨论(0)
提交回复
热议问题