0
它是正確的,因爲在windows中並沒有說它是壞的或不推薦。使用DialogBox作爲主窗口是否正確/正確?
例如像這樣:
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
UNREFERENCED_PARAMETER(nCmdShow);
INT_PTR result = DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAINWINDOWBOX), nullptr, MainWindow);
return static_cast<int>(result);
}