View Full Version : SdAskOptions question

12-27-2001, 04:44 AM

I would like to show a dialog box with radio buttons filled by components. Here is my code source:

ComponentAddItem(MEDIA, "Easystore MASTER", 0, TRUE);
ComponentAddItem(MEDIA, "Easystore SPO-203", 0, FALSE);
ComponentAddItem(MEDIA, "Easystore PS6E2", 0, FALSE);
ComponentAddItem(MEDIA, "Easystore PS6E3", 0, FALSE);
ComponentAddItem(MEDIA, "Easystore ISOWA", 0, FALSE);
ComponentAddItem(MEDIA, "Easystore TCY", 0, FALSE);
ComponentAddItem(MEDIA, "Easystore 924", 0, FALSE);
ComponentAddItem(MEDIA, "Easystore FFG-66", 0, FALSE);
SdAskOptions( "", "", "", "", "", EXCLUSIVE );

When I run the install exe I see only four components on my dialog. I don't understand why. How can I increase this ?

Thanks a lot for your help.

Best Regards


Mark at IS
01-02-2002, 09:03 AM
As stated in the online help for ComponentAddItem, "This function cannot be used with file media libraries" (that is, with MEDIA as the first argument). To add components to the file media library, you must use the IDE's Components pane.

Andy M-S
01-02-2002, 10:11 AM
I did a quick check and verified that the problem you're seeing is with SdAskOptions, and not with ComponentAddItem (if it was, my installer wouldn't be working--and my installer works).

I think the key is contained in the following snippet from the SdAskOptions documentation:

Specifies an alternate numeric dialog ID. Use only numeric IDs expressed in string form (for example, ID 13001 as "13001"). You can copy the SdAskOptions dialog resource, make limited changes to it, give it a unique numeric ID, and call that dialog by passing its ID as a string in szId. Refer to the Comments section, below. To create the standard four-option SdAskOptions dialog box, pass a null string ("") in this parameter.

What this means is, if you want something other than the default 4-place dialog, you're going to have to modify the existing dialog. No fun.

You might want to do something with AskOptions instead--you'd have to do more coding work, but it looks like that one will actually expand/contract to handle the number of options it is given.

Good luck!

Mark at IS
01-02-2002, 10:16 AM
> I think the key is contained in the following snippet from the SdAskOptions documentation

And in this, from the first paragraph of that topic: "Up to four options can be displayed by default."

Andy M-S
01-02-2002, 10:24 AM
...but since AskOptions is flexible in its response, I suspect that the user may have expected SdAskOptions to behave in a similar fashion--there doesn't seem to be any obvious reason to have limited the selection to 4 options (though, admittedly, the dialog can get crowded with too many).