My question is related with InstallShield. I am trying to provid support adding one more dialog in my project. So I would need any tutorials or step by steps to add custom dialog.
It would be more helpful to share the information.
My advance thanks!!!!
What I have tried:
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"
#define DLG_FINISHERRORSUMMARY "FinishWithErrorSummary" //My Custom Dialog Name
#define DLG_FINISHERRORSUMMARY_ID 1431 //Dialog ID
#define FINISHBUTTON_ID 1304
#define LISTBOXERROR_ID 1302
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
MessageBox ("Error in defining dialog", SEVERE);
abort;
endif;
bDone = FALSE;
while (!bDone)
nControl = WaitOnDialog("DLG_FINISHERRORSUMMARY");
switch (nControl)
case DLG_INIT:
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:
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!!!