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
- :
- Re: How to get return values like SdAskDestPath
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
Jun 09, 2008
04:48 PM
How to get return values like SdAskDestPath
I am trying to create a custom dialog where I need to retrieve the value of the drive letter base on the selection of the user.
I need the function to accept parameters and return the drive letter. Should I put a STRING value in the prototype?
prototype CustomDialog();
function NUMBER CustomDialog( )
*********************************************
For example, the SdAskDestPath will return the szDir and nResult.
nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 );
I need the szDir to be the drive letter.
*********************My code below******
prototype CustomDialog();
#include "ifx.h"
function NUMBER CustomDialog( )
NUMBER nReturn;
NUMBER nControl;
BOOL bDone;
HWND hwndDlg;
// variables for combo box list and current selection
LIST listDrives;
STRING svDrive, svNewPath,svReturnString,svSelection;
begin
nReturn = EzDefineDialog("CustomDialog", ISUSER, "CustomDialog", 0);
if (nReturn < 0) then
// Report an error; then terminate.
MessageBox ("Error in defining dialog box", SEVERE);
abort;
endif;
bDone = FALSE;
// create the list containing the combo box items
listDrives = ListCreate(STRINGLIST);
// fill the list with all available drive letters
GetValidDrivesList(listDrives, -1, -1);
while (!bDone)
nControl = WaitOnDialog("CustomDialog");
switch (nControl)
case DLG_CLOSE:
// The user clicked the window's Close button.
Do (EXIT);
case DLG_ERR:
MessageBox("Unable to show Dialog",SEVERE);
case RES_PBUT_BACK:
// user clicked Back
ListDestroy(listDrives);
nReturn = BACK;
bDone = TRUE;
case RES_PBUT_NEXT:
CtrlGetCurSel ("CustomDialog", RES_DIALOG_LISTBOX, svSelection);
MessageBox("Selection " + svSelection, SEVERE);
nReturn = NEXT;
bDone = TRUE;
case RES_PBUT_CANCEL:
// user clicked Cancel; ask user to verify cancellation
Do(EXIT);
case DLG_INIT:
hwndDlg = CmdGetHwndDlg ("CustomDialog");
CtrlDir ("CustomDialog", RES_DIALOG_LISTBOX, "*.*", DLG_DIR_DRIVE);
// ...cases for other controls...
endswitch;
endwhile;
I need the function to accept parameters and return the drive letter. Should I put a STRING value in the prototype?
prototype CustomDialog();
function NUMBER CustomDialog( )
*********************************************
For example, the SdAskDestPath will return the szDir and nResult.
nResult = SdAskDestPath( szTitle, szMsg, szDir, 0 );
I need the szDir to be the drive letter.
*********************My code below******
prototype CustomDialog();
#include "ifx.h"
function NUMBER CustomDialog( )
NUMBER nReturn;
NUMBER nControl;
BOOL bDone;
HWND hwndDlg;
// variables for combo box list and current selection
LIST listDrives;
STRING svDrive, svNewPath,svReturnString,svSelection;
begin
nReturn = EzDefineDialog("CustomDialog", ISUSER, "CustomDialog", 0);
if (nReturn < 0) then
// Report an error; then terminate.
MessageBox ("Error in defining dialog box", SEVERE);
abort;
endif;
bDone = FALSE;
// create the list containing the combo box items
listDrives = ListCreate(STRINGLIST);
// fill the list with all available drive letters
GetValidDrivesList(listDrives, -1, -1);
while (!bDone)
nControl = WaitOnDialog("CustomDialog");
switch (nControl)
case DLG_CLOSE:
// The user clicked the window's Close button.
Do (EXIT);
case DLG_ERR:
MessageBox("Unable to show Dialog",SEVERE);
case RES_PBUT_BACK:
// user clicked Back
ListDestroy(listDrives);
nReturn = BACK;
bDone = TRUE;
case RES_PBUT_NEXT:
CtrlGetCurSel ("CustomDialog", RES_DIALOG_LISTBOX, svSelection);
MessageBox("Selection " + svSelection, SEVERE);
nReturn = NEXT;
bDone = TRUE;
case RES_PBUT_CANCEL:
// user clicked Cancel; ask user to verify cancellation
Do(EXIT);
case DLG_INIT:
hwndDlg = CmdGetHwndDlg ("CustomDialog");
CtrlDir ("CustomDialog", RES_DIALOG_LISTBOX, "*.*", DLG_DIR_DRIVE);
// ...cases for other controls...
endswitch;
endwhile;
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 09, 2008
05:46 PM
(Duplicate post; follow-up [thread=181480]here[/thread].)