这个对话框为什么不显示啊?
//Chat.cpp
#include "windows.h"
#include "resource.h"
BOOL CALLBACK DialogProc(
HWND hwndDlg, // handle to dialog box
UINT uMsg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
int WINAPI WinMain(
HINSTANCE hInstance, // handle to current instance
HINSTANCE hPrevInstance, // handle to previous instance
LPSTR lpCmdLine, // pointer to command line
int nCmdShow // show state of window
)
{
DialogBox(NULL, MAKEINTRESOURCE(IDD_DIALOG), NULL, DialogProc);
return 0 ;
}
BOOL CALLBACK DialogProc(
HWND hwndDlg, // handle to dialog box
UINT uMsg, // message
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
)
{
switch (uMsg)
{
case WM_INITDIALOG:
MessageBox(NULL, "Hello", "HaHa", MB_OK);
}
return 0;
}
对话框资源都没问题 但是点运行什么也没有啊