实现 About 关于对话框消息处理逻辑 实现函数5
This commit is contained in:
@@ -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
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user