Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom dialog


3 replies to this topic

vincejairam

vincejairam
  • Members
  • 8 posts

Posted 03 March 2004 - 17:36

Hi my situation is this:

In my dialogs I would like to call a custom dialog when the user clicks the next button on the InstallWelcome dialog. When the custom dialogs shows up it has a back, next, and cancel button like all of the other dialogs. Now when this custom dialog collects the needed info or whatever it is suppose to display how do I go back to the msi dialogs like if i click the back button on my custom dialog how does it go back to InstallWelcome.

Is this possible for basic Msi projects.

Vince.

hteichert

hteichert
  • Members
  • 158 posts

Posted 04 March 2004 - 11:05

The transition from one dialog to another works with the ControlEvent "NewDialog". Let's assume the following current dialog situation:

Dialog "A" with "Next" Button to dialog "B"
Dialog "B" with "Back" Button to dialog "A"
There will be a ControlEvent "NewDialog A" on the "Next" button of dialog "A" and a ControlEvent "NewDialog B" on the "Back" button of dialog "B".

If we want to insert a new dialog "New" between "A" and "B" we have to do the follwing:
1) Create the new dialog "New" with "Back", "Next" buttons and the other required UI parts
2) Create a ControlEvent "NewDialog A" on the "Back" button of dialog "New"
3) Create a ControlEvent "NewDialog B" on the "Next" button of dialog "New"
4) Change the ControlEvent "NewDialog A" on the "Back" button of dialog "B" to "NewDialog New"
5) Change the ControlEvent "NewDialog B" on the "Next" button of dialog "A" to "NewDialog New"

In general, it's important that the value in the column "Condition" of the ControlEvent table evaluates to true, if there are several ControlEvents for a control (like a pushbutton) to be executed.
It's a good idea to look into Microsoft's Windows installer helpfile in the chapter "User Interface Reference" for detailed information.
h.teichert-ott

vincejairam

vincejairam
  • Members
  • 8 posts

Posted 04 March 2004 - 16:02

hteichert thanks for the reply but I don't think I made myself clear. The custom dialog that I am calling is in a dll written in c++. So in order to call the custom dialog I have to use DoAction which when I click the next button calls the custom dialog but it does not make the InstallWelcome dialog disappear and I don't know how to go back when I press the back button on the c++ custom dialog.

Any suggestions??

Vince

hteichert

hteichert
  • Members
  • 158 posts

Posted 05 March 2004 - 12:07

Ok, that's something different.

Sorry, I don't know how to make the InstallWelcome dialog disappear, but you could try to position your customdialog directly in front of it.

Then, for your second problem, there's a simple solution: Use a property to return what you want to do. For the following explanation I assume the following dialog order:
InstallWelcome - YourCustomDialog - CustomProperties

1) In your C++ code of your Custom Dialog, before returning, set a property (let's call it for example "BackNext") to "N" or "B" in case of Next or Back by using the windows installer function MsiSetProperty.

2) Change the ControlEvents for the Next button on the InstallWelcome dialog:
First: DoAction MyCustomDialog with condition "1" (always)
Second: NewDialog CustomProperties with condition BackNext="N" (dialog CustomProperties will only be opened if you pressed "Next" in your Customdialog, otherwise ("Back") it will return to InstallWelcome)

3) Change the ControlEvents for the Back button on the CustomProperties dialog:
First: DoAction MyCustomDialog with condition "1" (always)
Second: NewDialog InstallWelcome with condition BackNext="B" (dialog InstallWelcome will only be opened if you pressed "Back" in your Customdialog, otherwise ("Next") it will return to CustomProperties)

Hope this helps ...
h.teichert-ott