移除主窗口无用菜单栏并修正窗口尺寸计算 为 rogue treis 做准备

This commit is contained in:
2026-04-24 16:55:39 +08:00
parent 208b82b9f9
commit 47173591db
4 changed files with 812 additions and 3 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance)
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_TETRIS));
wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wcex.lpszMenuName = MAKEINTRESOURCE(IDC_TETRIS);
wcex.lpszMenuName = nullptr;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SMALL));
@@ -111,7 +111,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance)
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
RECT rect = { 0, 0, WINDOW_CLIENT_WIDTH, WINDOW_CLIENT_HEIGHT };
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, TRUE);
AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE);
hInst = hInstance;
+1 -1
View File
@@ -30,7 +30,7 @@ void TDrawScreen(HDC hdc, HWND hWnd)
int layoutWidth = MulDiv(WINDOW_CLIENT_WIDTH, scale, 1000);
int layoutHeight = MulDiv(WINDOW_CLIENT_HEIGHT, scale, 1000);
int offsetX = (clientWidth - layoutWidth) / 2;
int offsetY = (clientHeight - layoutHeight) / 2;
int offsetY = 0;
auto SX = [offsetX, scale](int value) -> int
{