0
這是如何創建窗口。但是當我使用GetClientRect時,rcClient比32x32大得多。如何在Windows上創建小窗口(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);