I have created a custom dialog with some radio buttons. In my script I have attempted to select one of the buttons by default using the CtrlSetState function. It doesn't work. In the help, it tells you to check the characteristics of the control. I'm not sure what that means? Any ideas.
Thanks,
Vasilios
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.

Select radio button
Started by
BillK
, Jun 21 2002 15:39
2 replies to this topic
Posted 28 June 2005 - 23:27
I am having similar problems with radio buttons. I just can't get CrtlSetState() to see my radio button control. It just isn't making logical sense to me since I am so far seperated from what is happening underneath with this program. Here is a snippit of what I am using in my setup.rul InstallScript:
-----------------------------------------------
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
varTest = CtrlSetState ( "12006", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dialog_12006", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dlg_12006", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "SdWelcome", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dlg_SdWelcome", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dialog_SdWelcome", 1301, BUTTON_CHECKED );
nResult = SdWelcome( szTitle, szMsg );
if (nResult = BACK) goto Dlg_Start;
-------------------------------------------------
1) When I use the debugger ever single one of those is returning "-1" as its result.
2) I got the 12006 dialog number from the DIRECT EDITOR under its DIALOG table from the ISResourceId field. I tried writing it different ways as you can see.
3) I got the 1301 from the "Control Identifier" setting on my Radio Button Control Group.
4) I created a custom dialog box using the DIALOGS option in my InstallShield 7.0 project. I edited the SdWelcome dialog.
HELP! What am I/we doing wrong???
-----------------------------------------------
Dlg_SdWelcome:
szTitle = "";
szMsg = "";
varTest = CtrlSetState ( "12006", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dialog_12006", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dlg_12006", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "SdWelcome", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dlg_SdWelcome", 1301, BUTTON_CHECKED );
varTest = CtrlSetState ( "Dialog_SdWelcome", 1301, BUTTON_CHECKED );
nResult = SdWelcome( szTitle, szMsg );
if (nResult = BACK) goto Dlg_Start;
-------------------------------------------------
1) When I use the debugger ever single one of those is returning "-1" as its result.
2) I got the 12006 dialog number from the DIRECT EDITOR under its DIALOG table from the ISResourceId field. I tried writing it different ways as you can see.
3) I got the 1301 from the "Control Identifier" setting on my Radio Button Control Group.
4) I created a custom dialog box using the DIALOGS option in my InstallShield 7.0 project. I edited the SdWelcome dialog.
HELP! What am I/we doing wrong???
Posted 08 July 2005 - 16:23
With the help of an InstallShield tech I understood my problem to be that I was trying to control the radio button object before it was instantiated (on the screen). I guess I will have to write a custom dialog since I have no programming access to the controls as they are created.