About Setup
Inno Setup のダイアログ ボックス テキストのテキストを編集または置換する必要があります。
ここに写真があります:
インターネットを見ると、次のコードが得られました。
[Files]
Source: CallbackCtrl.dll; Flags: dontcopy
[Code]
type
TWFProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint;
function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam: Longint; lParam: Longint): Longint; external 'CallWindowProcA@user32.dll stdcall';
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
function WrapWFProc(Callback: TWFProc; ParamCount: Integer): Longword; external 'wrapcallbackaddr@files:CallbackCtrl.dll stdcall';
var
OldProc:Longint;
procedure AboutSetupClick;
begin
//Edit your text here
MsgBox('CUSTOM TEXT HERE', mbInformation, MB_OK);
end;
function WFWndProc(h:HWND;Msg,wParam,lParam:Longint):Longint;
begin
if (Msg=$112) and (wParam=9999) then begin
Result:=0;
AboutSetupClick;
end else begin
if Msg=$2 then SetWindowLong(WizardForm.Handle,-4,OldProc);
Result:=CallWindowProc(OldProc,h,Msg,wParam,lParam);
end;
end;
procedure InitializeWizard;
begin
OldProc:=SetWindowLong(WizardForm.Handle,-4,WrapWFProc(@WFWndProc,4));
end;
うまくいくようです..
しかし、インストーラーを閉じると、クラッシュ メッセージが表示されます。
このコードを修正するには、ヘルプが必要です。または、[セットアップについて] ダイアログ ボックスのテキストを変更するためのより良い例を挙げてください。
私が使用したDLL。 ここ