这是创建窗口的方式。但是当我 GetClientRect 时,rcClient 比 32x32 大得多。
int nDefaultWidth = 32;
int nDefaultHeight = 32;
UINT32 winStyle = 0;
RECT rc;
SetRect( &rc, 0, 0, nDefaultWidth, nDefaultHeight );
AdjustWindowRect( &rc, winStyle, ( hMenu != NULL ) ? true : false );
// Create the render window
HWND hWnd = CreateWindow( L"Direct3DWindowClass", NULL, winStyle,
x, y, ( rc.right - rc.left ), ( rc.bottom - rc.top ), 0,
hMenu, hInstance, 0 );
RECT rcClient;
GetClientRect( hWnd, &rcClient );