MessageBox函数

来源:互联网 发布:tango软件好不好 编辑:程序博客网 时间:2024/06/05 23:05
MessageBox函数用于显示短信息。虽然,MessageBox显示的小窗口没什么功能,实际上它别认为是一个对话框。MessageBox的
  1. 第一参数通常是窗口句柄
  2. 第二参数是在消息框主体中显示的字符串
  3. 第三参数是出现在消息框标题列上的字符串
  4. 第四个参数可以是WINUSER.H中定义的一组以前缀MB_开始的常数组合。
The MessageBox function creates,displays,and operates a message box,The message box contains an application-defined message and title,plus any combination of predefined icon and push.
syntax
int MessageBox(HWND hWnd,LPCTSTR lpText,LPCTSTR lpCaption,UINT uType)
Example
PRE.clsCode { font-size:110%; } PRE.clsSyntax { font-size:100%; } TD DIV.clsBeta { display:none;} A:link { color:#0000ff; text-decoration:underline;}A:visited { color:#0000ff; text-decoration:underline;}A:hover { color:#3366ff; text-decoration:underline;}MSHelp/:link { color:#0000ff; text-decoration:underline; cursor:hand; hoverColor:#3366ff; filterString: ;}
PRE.clsCode { font-size:110%; } PRE.clsSyntax { font-size:100%; } TD DIV.clsBeta { display:none;} A:link { color:#0000ff; text-decoration:underline;}A:visited { color:#0000ff; text-decoration:underline;}A:hover { color:#3366ff; text-decoration:underline;}MSHelp/:link { color:#0000ff; text-decoration:underline; cursor:hand; hoverColor:#3366ff; filterString: ;}if (fError)
{
    if (MessageBox(hwndDlg, SZNOTFOUND, SZDELETEITEM,
        MB_OKCANCEL)==IDOK)
    {

         // Prompt for a new item name and repeat the command.

    }
    else
    {

         // Cancel the command.

    }
}

PRE.clsCode { font-size:110%; } PRE.clsSyntax { font-size:100%; } TD DIV.clsBeta { display:none;} A:link { color:#0000ff; text-decoration:underline;} A:visited { color:#0000ff; text-decoration:underline;} A:hover { color:#3366ff; text-decoration:underline;} MSHelp/:link { color:#0000ff; text-decoration:underline; cursor:hand; hoverColor:#3366ff; filterString: ;}
 
PRE.clsCode { font-size:110%; } PRE.clsSyntax { font-size:100%; } TD DIV.clsBeta { display:none;} A:link { color:#0000ff; text-decoration:underline;} A:visited { color:#0000ff; text-decoration:underline;} A:hover { color:#3366ff; text-decoration:underline;} MSHelp/:link { color:#0000ff; text-decoration:underline; cursor:hand; hoverColor:#3366ff; filterString: ;}
 

PRE.clsCode { font-size:110%; } PRE.clsSyntax { font-size:100%; } TD DIV.clsBeta { display:none;} A:link { color:#0000ff; text-decoration:underline;} A:visited { color:#0000ff; text-decoration:underline;} A:hover { color:#3366ff; text-decoration:underline;} MSHelp/:link { color:#0000ff; text-decoration:underline; cursor:hand; hoverColor:#3366ff; filterString: ;}
 
PRE.clsCode { font-size:110%; } PRE.clsSyntax { font-size:100%; } TD DIV.clsBeta { display:none;} A:link { color:#0000ff; text-decoration:underline;} A:visited { color:#0000ff; text-decoration:underline;} A:hover { color:#3366ff; text-decoration:underline;} MSHelp/:link { color:#0000ff; text-decoration:underline; cursor:hand; hoverColor:#3366ff; filterString: ;}
 



Powered by ScribeFire.