实现 About 关于对话框消息处理逻辑 实现函数5

This commit is contained in:
2026-04-23 19:38:17 +08:00
parent 3b1ec70c9e
commit 43d26bc7f7
3 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
- [x] `MyRegisterClass` - `src/source/Tetris.cpp` - [x] `MyRegisterClass` - `src/source/Tetris.cpp`
- [x] `InitInstance` - `src/source/Tetris.cpp` - [x] `InitInstance` - `src/source/Tetris.cpp`
- [x] `WndProc` - `src/source/Tetris.cpp` - [x] `WndProc` - `src/source/Tetris.cpp`
- [ ] `About` - `src/source/Tetris.cpp` - [x] `About` - `src/source/Tetris.cpp`
## 第二阶段:游戏区域与状态初始化 ## 第二阶段:游戏区域与状态初始化
Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

+14 -2
View File
@@ -146,7 +146,19 @@ INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
// TODO(作业5): 补全“关于”对话框的消息处理。 // TODO(作业5): 补全“关于”对话框的消息处理。
UNREFERENCED_PARAMETER(hDlg); UNREFERENCED_PARAMETER(hDlg);
UNREFERENCED_PARAMETER(message); switch (message)
UNREFERENCED_PARAMETER(wParam); {
case WM_INITDIALOG:
return (INT_PTR)TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
}
return (INT_PTR)FALSE; return (INT_PTR)FALSE;
} }