MessageBox即可以改变提示中的‘确定’‘取消’为‘AA’,'BB'。
如何改变。
看到有VB当中有该帖子

解决方案 »

  1.   

    直接修改源码就可以,在delphi下的source目录下,然后copy到你的工作文件夹即可
      

  2.   


    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure FormCreate(Sender: TObject);
        procedure FormDestroy(Sender: TObject);
        procedure Button1Click(Sender: TObject);
      end;
    var
      Form1: TForm1;implementation{$R *.DFM}var
      hook: HHOOK; {定义一个钩子句柄}//钩子回调函数
    function HookProc(Code: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
    begin
      if   (code=HCBT_ACTIVATE) then
      begin
        SetDlgItemText(wParam,IDYES,'&Yes');
        SetDlgItemText(wParam,IDNO   ,'&No');
        SetDlgItemText(wParam,IDOK,'&OK');
        SetDlgItemText(wParam,IDCANCEL,'&Cancel');
      end;
      Result := CallNextHookEx(hook,code,wparam,lparam);
    end;//设置钩子
    procedure TForm1.FormCreate(Sender: TObject);
    begin
      hook := SetWindowsHookEx(WH_CBT, @HookProc, 0, GetCurrentThreadID);
    end;//释放钩子
    procedure TForm1.FormDestroy(Sender: TObject);
    begin
      UnhookWindowsHookEx(hook);
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
        MessageBox(Handle,'aaa','bbb',MB_YESNOCANCEL);
    end;end.
      

  3.   

    MessageBox是系统函数,在中文系统上是"确定","取消",在英文系统上就是“Yes”,“Cancel”,所以1楼的修改源码估计不行。
      

  4.   

    4楼bdmh正解,在messagebox弹出之前,拦截消息,然后修改messagebox上面的按钮文字,
    只要将4楼代码中的
         SetDlgItemText(wParam,IDYES,'&Yes');
        SetDlgItemText(wParam,IDNO   ,'&No');
    修改成
        SetDlgItemText(wParam,IDYES,'&AA');
        SetDlgItemText(wParam,IDNO   ,'&BB');
    就是你要多效果