步骤:1.在VC中新建一个Win 32 Application ,取名SimpleDlg选一个简单的Win 32程序,OK!
2.再新建资源,点文件->新建->资源脚本,取名Resouce.rc ,OK,再对Resouce.rc图标右键->插入,选对话框,取个名字,OK!
// SimpleDlg.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "resource.h"
void Main_OnClose(HWND hwnd);BOOL WINAPI Main_Proc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
return FALSE;
}
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
//MessageBox(NULL,TEXT("HELLO !"),TEXT("问候"),MB_OK|MB_ICONINFORMATION);
DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG1),NULL,Main_Proc);
return 0;
}