I am creating a DLL custom action which is showing a message box taking the values from the property table as below:
MessageBox(NULL, "This is a message box", szBuffer1, MB_OK);
I have attached this custom action to Next button. This will pop up a message box when Next
is clicked on that dialog. When the user clicks on Ok
button on the message box, the control should return to the same dialog and the next dialog shouldn't be displayed. How should I achieve this?
I will suggest you to use "SpawnDialog" of the WIX that will return control to the same dialog: Here is the example: 1. Create a message dialog:
<Dialog Id="MessageDlg" Width="260" Height="120" Title="[ProductName]">
<Control Id="OK" Type="PushButton" X="102" Y="90" Width="56" Height="17" Default="yes" Cancel="yes" Text="OK">
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
<Control Id="Text" Type="Text" X="48" Y="22" Width="194" Height="60" Text="[YOURMESSAGE]" />
<Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="Information icon" FixedSize="yes" IconSize="32" Text="WixUI_Ico_Info" />
</Dialog>
2. Set the property "YOURMESSAGE" in the custom action. 3. Call this dialog on click of next button.
<Publish Event="SpawnDialog" Value="MessageDlg">1</Publish>