<p>I'm writing a direct3d application and after noticing strange bugs such as anti-aliasing occurring even when it was turned off and the mouse pointer not lining up to things with the same coordinates as itself I discovered that when creating a window the width and height parameters include the border.  The program was rendering a 800x600 graphics output to a window of the same size, but because of the borders it was squished into 792x566 rectangle.  I've increased the size of the window to compensate, but this does not work if the system uses a border style other the standard XP style.  (Classic style, for example)</p>

<p>Is there a way to tell what the border width and heights will be before I create the window?</p>

It sounds like you are looking for the GetSystemMetrics function.  For example, the border width in pixels is returned by
```
```
GetSystemMetrics(SM_CXBORDER)
```
```
ADDED:
For the total size you will need to add together the various "pieces" of the non-client area: border, frame sizes, title bars, etc.