Ask Your Question

Revision history [back]

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

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.