Search code examples
macosmacos-carbon

How do I find the display size using Carbon


How do I adjust the height and width returned by CGDisplayBounds by the menu bar height and the dock height (or width if it attached to the side)?

I need to do this using only Carbon calls.


Solution

  • Leaving aside that you really ought to be moving away from Carbon already…

    Use the HIWindowGetAvailablePositioningBounds function.

    If you need it to work in 64-bit, then you're just going to have to use Cocoa.