This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- determine custom dialog name
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2009
07:32 AM
determine custom dialog name
i made a dialog using the dialogs view in the installation designer. This is shown like i want it too.
This dialog has it's next button disabled. When the user pushes a button the next button can be enabled again. Now i come across some codes which can do this but I have trouble with getting the handle for the dialog. for this i use CmdGetHwndDlg. As a parameter it needs the name of the dialog. I have put the name in there but i get -1 as a handle. So i presume i have the wrong name for the dialog.
Anybody know how i can find out what name i should use? or can't i use CmdGetHwndDlg with custom dialogs made the way i did?
This dialog has it's next button disabled. When the user pushes a button the next button can be enabled again. Now i come across some codes which can do this but I have trouble with getting the handle for the dialog. for this i use CmdGetHwndDlg. As a parameter it needs the name of the dialog. I have put the name in there but i get -1 as a handle. So i presume i have the wrong name for the dialog.
Anybody know how i can find out what name i should use? or can't i use CmdGetHwndDlg with custom dialogs made the way i did?
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 18, 2009
06:25 PM
Assuming this is an InstallScript or InstallScript MSI project: The dialog name to use in CmdGetHwndDlg is the same one used in the EzDefineDialog, WaitOnDialog, EndDialog, and ReleaseDialog functions. If matching that up doesn't work, perhaps post an outline of the dialog-processing code?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 19, 2009
02:12 AM
robert thanks for repsonding. I don't use any of those functions. Maybe they are generated automatically when you make a dialog in the installshield user interface? if so how can is see the generated code behind such a dialog?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 19, 2009
02:14 AM
btw. i used the same name as you can see in the dialog view under the all dialogs view. forget to tell i use a basic msi project
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 19, 2009
09:36 AM
Oh, those functions apply only to InstallScript-based dialog boxes. For Basic MSI, you can enable and disable controls using the Conditions tab in the Behavior node for your dialog box.
The LicenseAgreement dialog box is a good model for seeing what to do...
The LicenseAgreement dialog box is a good model for seeing what to do...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 20, 2009
02:36 AM
Thanks Robert that looks a lot easier and less error prone then my solution:
function EnableControl(ButtonControlId,ControlOn)
LONG hwndDlg,hwndItem;
begin
hwndDlg = FindWindow("MsiDialogCloseClass","");
hwndItem = GetDlgItem(hwndDlg, ButtonControlId);
EnableWindow(hwndItem, ControlOn);
end;
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)