Log in

View Full Version : Add icon ready page


buttignol
01-09-2016, 09:18
Friends adding the menu icon in the start ready page

I do not know how to add the function UpdateReadyMemo

Could someone for an example of how to add

Example below as I use

IconCB := TNewCheckBox.Create(WizardForm);
with IconCB do begin
Parent := WizardForm.SelectTasksPage;
SetBounds(0,215,300,20);
Caption := ExpandConstant('{cm:CreateDesktopIcon}');
Checked:=True;
end;

15174

Thank you

JRD!
01-09-2016, 12:29
If you want just "Create a desktop icon" in the Ready Memo with your personal IconCB:

[Tasks]
//Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:Icons}";
Name: "groupicon" ; Description: "{cm:CreateGroupIcon}"; GroupDescription: "{cm:Icons}";

[CustomMessages]
Icons=Icons:
CreateDesktopIcon=Create a desktop icon
CreateGroupIcon=Create a startmenu icon

[#Code]
var
IconCB: TNewCheckBox;

function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
S1, S2: String;
begin
S1 := '';
S2 := '';
S1 := S1 + MemoDirInfo + NewLine + NewLine;
if IconCB.Checked then
S2 := #32#32#32#32#32#32#32#32#32+CustomMessage('CreateD esktopIcon');
S1 := S1 + MemoTasksInfo + NewLine + S2 + NewLine;
Result := S1;
end;


If you want show your personal IconCB in the memo add this code:


[#Code]
Procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpReady then IconCB.Show else IconCB.Hide;
end;


For IconCB creation:


Procedure InitializeWizard();
begin
IconCB := TNewCheckBox.Create(WizardForm);
with IconCB do
begin
Parent := WizardForm.ReadyMemo;
SetBounds(25,150,150,15);
Caption:=CustomMessage('CreateDesktopIcon');
Checked:=True;
end;
end;


I have not quite understood your request ...

buttignol
01-09-2016, 15:45
Thank JRD! but it is to appear "Create an icon on the Desktop" on UpdateReadyMemo

Example: Image

15179

Create an icon on the Desktop. together with Start Menu folder destination and additional tasks

JRD!
01-09-2016, 16:42
Just add:


[CustomMessages]
Icons=Icons:

[#Code]
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
S1, S2: String;
begin
S1 := '';
S2 := '';
S1 := S1 + MemoDirInfo + NewLine + NewLine;
if IconCB.Checked then
S2 := #32#32#32#32#32#32+CustomMessage('Icons')+ NewLine + #32#32#32#32#32#32#32#32#32+CustomMessage('CreateD esktopIcon');
S1 := S1 + MemoTasksInfo + NewLine + S2 + NewLine;
Result := S1;
end;

JRD!
01-09-2016, 16:45
http://img4.hostingpics.net/pics/690609723.jpg

buttignol
01-09-2016, 16:57
Resolved That's what I wanted

Thank JRD! for their work to help

JRD!
01-09-2016, 17:03
You're welcome.