《关于DevC++中MessageBox这个好函数》;
MessageBox用法:
pubic WINUSERAPI int WINAPI MessageBox(HWND hwnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
代码:
#include<windows.h>
main()
{
l: int ret=MessageBox(NULL,TEXT("你喜欢我吗"),TEXT("标题"),MB_YESNO|MB_ICONQUESTION);
if(ret==IDYES)
{
MessageBox(NULL,TEXT("嘿嘿嘿"),TEXT(" "),MB_OK);
return 0;
}
else
{
int n=MessageBox(NULL,TEXT("你不再考虑一下吗"),TEXT(" "),MB_OK);
goto l;
}
return 0;
}