win32学习02.提示框程序
先看WinMain函数:
int WinMain(
__in HINSTANCE hInstance,//当前程序的实例句柄,找到本进程的内存
__in_opt HINSTANCE hPrevInstance, //前一个实例句柄,已经废弃,一般为NULL
__in LPSTR lpCmdLine, //命令行参数字符串
__in int nShowCmd //窗口的显示方式:最大化,最小化,原样。
)
{
MessageBox(NULL,"hello world!","HappyTeemo",MB_ABORTRETRYIGNORE|MB_ICONINFORMATION);
}
MessageBox的定义:
int MessageBox(
HWND hWnd, // handle to owner window,父窗口句柄
LPCTSTR lpText, // text in message box,消息框文字
LPCTSTR lpCaption, // message box title,标题栏文字
UINT uType // message box style,按钮,标题显示类型
);
还没有评论,来说两句吧...