如何将 MessageDlg()对话框上的按钮[yes,no,cancle...]改为中文 ?

解决方案 »

  1.   

    同意jixinfa(DELHPI程序员),用  application.MessageBox()
      

  2.   

    Application.MessageBox()
    怎么显示中文按钮?
      

  3.   

    Application.MessageBox('请您选择查询方式!','标题',MB_OK+MB_ICONWARNING)
      

  4.   

    StrMessage:='数据成功添加!'+chr(13)+'您是否要添加下一条?';
        if (Application.MessageBox(Pchar(StrMessage),DialogTitle,MB_YESNO+MB_ICONQUESTION))=ID_Yes then
      

  5.   

    1. 找到...\Borland\Delphi6\Source\Vcl\Consts.pas
    2. 保存同名副本到另一个位置
    3. 随便打开一个新的工程,将同名副本Consts.pas加入该工程
    4. 修改同名副本Consts.pas的内容,如:
      SOKButton = 'OK';          //改为SOKButton = '确定';
      SCancelButton = 'Cancel';  //改为SCancelButton = '取消';
      SMsgDlgWarning = 'Warning';//改为SMsgDlgWarning = '警告';
      SMsgDlgError = 'Error';    //改为SMsgDlgError = '错误';
    5. 编译该工程,将生成的Consts.dcu拷贝到...\Borland\Delphi6\Lib覆盖同名文件
    6. 重新启动Delphi,来个MessageDlg看看效果
      

  6.   

    Application.Message('你确定吗?',MB_YesNO+MB_IconQuestion+MB_DefButtons);
      

  7.   

    Application.Message('你确定吗?',MB_YesNO+MB_IconQuestion+MB_DefButton2);
      

  8.   

    DaSaint(齐天大圣)你写的东西有误,替你更正如下:1. 找到...\Borland\Delphi6\Source\Vcl\Consts.pas
    2. 保存同名副本到另一个位置
    3. 随便打开一个新的工程,将同名副本Consts.pas加入该工程
    4. 修改同名副本Consts.pas的内容,如:
    /*/*/*/*/*/*/*/*/*/*/*/*/
      SOKButton = 'OK';          //改为SOKButton = '确定';
      SCancelButton = 'Cancel';  //改为SCancelButton = '取消';
    这里注意:上面两句应该改成
      SMsgDlgOK = 'OK';          //改为SMsgDlgOK = '确定';
      SMsgDlgCancel = 'Cancel';  //改为SMsgDlgCancel = '取消';
    /*/*/*/*/*/*/*/*/*/*/*/*/
      SMsgDlgWarning = 'Warning';//改为SMsgDlgWarning = '警告';
      SMsgDlgError = 'Error';    //改为SMsgDlgError = '错误';
    5. 编译该工程,将生成的Consts.dcu拷贝到...\Borland\Delphi6\Lib覆盖同名文件
    6. 重新启动Delphi,来个MessageDlg看看效果