How can I get the mac os X screen resolution in pixels C++? [closed]

asked 2018-07-19 12:39:33 -0500

I would like to get the current screen resolution in pixels in order for me to format my window accordingly in C++ but I am able to find up to date information about this.

Using Open CV, with C++ over Xcode.

In objective C it would be something like int main_screen_height = [[NSScreen mainScreen] visibleFrame].size.height;

but what would be the equivalent in C++ and OpenCV please?

Thank you for your help.

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by berak
close date 2018-07-19 12:43:21.380174


your IDE NEVER matters.

also, opencv does not ever know your screen size, that's an os related thing.

berak gravatar imageberak ( 2018-07-19 12:42:08 -0500 )edit

Why not just make an Objective C project and use the C++ code as you see fit?

sjhalayka gravatar imagesjhalayka ( 2018-07-19 13:43:31 -0500 )edit