移除主窗口无用菜单栏并修正窗口尺寸计算 为 rogue treis 做准备
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user