Jimmyt1988
Jimmyt1988

Reputation: 21126

Window width and height and the resize command winapi

I was wondering why if I set my window to 1440 x 900 explicitly:

HWND hWnd = CreateWindow("bla", "bla", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 1440/*CW_USEDEFAULT*/, 900/*CW_USEDEFAULT*/, NULL, NULL, hInstance, NULL);

When my screen is rendered it must be calling WM_RESIZE and it is passing:

    case WM_SIZE:
        screenServer.OnScreenResize( LOWORD(lParam), HIWORD(lParam) );
    break;

which comes out as 1424 x 861?

Why is that?

Upvotes: 1

Views: 340

Answers (1)

Jimmyt1988
Jimmyt1988

Reputation: 21126

I can now see that it is the borders of my window that are being accounted for:

enter image description here

Upvotes: 1

Related Questions