<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/contentRect(forFrameRect:styleMask:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(cm)contentRectForFrameRect:styleMask:"
  },
  "title" : "contentRect(forFrameRect:styleMask:)"
}
-->

# contentRect(forFrameRect:styleMask:)

Returns the content rectangle used by a window with a given frame rectangle and window style.

```
class func contentRect(forFrameRect fRect: NSRect, styleMask style: NSWindow.StyleMask) -> NSRect
```

## Parameters

`fRect`

The frame rectangle for the window expressed in screen coordinates.

`style`

The window style for the window. See [`NSWindow.StyleMask`](/documentation/AppKit/NSWindow/StyleMask-swift.struct) for a list of style mask values.

## Return Value

The content rectangle, expressed in screen coordinates, used by the window with `fRect` and `style`.

## Discussion

When a `NSWindow` instance is available, you should use [`contentRect(forFrameRect:)`](/documentation/AppKit/NSWindow/contentRect(forFrameRect:)) instead of this method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)