cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Custom Dialog not getting display

Hello All,

I am very new to InstallShield. My kind request you to help my question below.

1. I am creating one custom dialog, User Interface -> Dialogs -> New Dialog.
2. I keep one Listbox and push button in my dialog.
3. I have created method like below :-

#include "Sdint.h"
#include "Str.h"
#include "CustomDlg.h"
#include "Winapi.h"
#include "Misc.h"
#include "DialogsPriv.h"
#include "Sdrc.h"

//private constants
#define DLG_FINISHERRORSUMMARY "FinishWithErrorSummary" //My Custom Dialog Name
#define DLG_FINISHERRORSUMMARY_ID 1431 //Dialog ID
#define FINISHBUTTON_ID 1304
#define LISTBOXERROR_ID 1302

//private globals

prototype FinishErrorSummary();

function FinishErrorSummary()
NUMBER nOptions, nControl, nReturn, nResult;
BOOL bDone, bChecked;
HWND hwndDlg, hItem;
LIST listString;
begin

listString = ListCreate(STRINGLIST);
ListAddString(listString, "Monday", AFTER);
ListAddString(listString, "Wednesday", AFTER);
ListAddString(listString, "Friday", AFTER);

nResult = EzDefineDialog("DLG_FINISHERRORSUMMARY", ISUSER, "", 1431);

if (nResult < 0) then
// Report an error; then terminate.
MessageBox ("Error in defining dialog", SEVERE);
abort;
endif;

// Loop in dialog until the user selects a standard button
bDone = FALSE;

while (!bDone)
nControl = WaitOnDialog("DLG_FINISHERRORSUMMARY");
switch (nControl)
case DLG_INIT:
// Initialize the back, next, and cancel button enable/disable
// states for this dialog and replace %P, %VS, %VI with
// IFX_PRODUCT_DISPLAY_NAME, IFX_PRODUCT_DISPLAY_VERSION, and
// IFX_INSTALLED_DISPLAY_VERSION, respectively, on control IDs 700-724 and 202.
hwndDlg = CmdGetHwndDlg("DLG_FINISHERRORSUMMARY");
SdGeneralInit("DLG_FINISHERRORSUMMARY", hwndDlg, 0, "");

CtrlSetList("DLG_FINISHERRORSUMMARY", 1302, listString);
bDone = TRUE;

case DLG_ERR:
nControl = ISERR_GEN_FAILURE;
bDone = TRUE;
SdError(nControl, DLG_FINISHERRORSUMMARY);

case DLG_CLOSE:
SdCloseDlg(hwndDlg, nControl, bDone);

default:
// check standard control handling
if (SdIsStdButton(nControl) && SdDoStdButton(nControl)) then
bDone = TRUE;
endif;

endswitch;
endwhile;
EndDialog(DLG_FINISHERRORSUMMARY);
ReleaseDialog(DLG_FINISHERRORSUMMARY);

end;

4. Calling this method from OnFirstUIAfter() like below
nResult = FinishErrorSummary();
if (nResult = 0) then
SetDialogTitle (DLG_ASK_OPTIONS, szTitle);
endif;


5. Responses for the above custom functions mentioned below:
i) nResult = EzDefineDialog("DLG_FINISHERRORSUMMARY", ISUSER, "", 1431);
nResult I am getting the value as '0'. Hope this is right response.

ii) nControl = WaitOnDialog("DLG_FINISHERRORSUMMARY");
nControl I am getting the value as '-100'. Hope this too right response.

Issue:
But the custom dialog not getting display.

Please let me know if anything I missed out here. It would be more helpful.....

Help me!!! Help me!!! Help me!!!
Labels (1)
Tags (1)
0 Kudos
1 Reply
Flexera Jenifer
Flexera

Re: Custom Dialog not getting display

Hi,

 

Can you try calling custom dialog which you want to call from OnFirstUIBefore method:

pseudo code would be:

function OnFirstUIBefore()

....

begin

Dlg_SdWelcome:

szTitle = "";
szMsg = "";
nResult = SdWelcome( szTitle, szMsg );
if (nResult = BACK) goto Dlg_SdWelcome;

Dlg_SdFeatureTree:

.....

Dlg_CustomDlg_<Name of the dialog>:
nResult = CustomDialog( );

.....

end

 

Hope this helps,

Thanks,

Jenifer

0 Kudos