PDA

View Full Version : Adding editbox to SQLServerSelectLogin Dialog



Iritbachar
06-30-2005, 05:00 AM
Hi,

I'm using InstallScript MSI project of InstallSield 11.
I have added an edit box to the SQLServerSelectLogin Dialog, and i would like to set a defualt text to it, and then get the text from the user.
I tried using the CtrlSetText() and CtrlGetText() functions, but it didn't work.
I don't know how to connect the editbox with a property that i can use...
If someone can please help me, it'll be great! :rolleyes:
thanks a head. :o

Iritbachar
07-04-2005, 03:26 AM
Hi everyone,

I'm glad to announce that I have found a way to add a control to a built-in SQLServerSelectLogin Dialog, in MSI Installscript project!
If you'll search your computer for the name of this dialog you will find under the InstallShield directory \ Support a file with this function in it.
Copy this file in order not to make any changes in the original copy, and insert it into your project.

Add to this file a definition of the control with it's control Id (that comes by default), for example:
#define EDIT_BOX 17822

Define variable that contains the value you want to enter as default text:
STRING sEditBox;

Then, under the switch (nCmdValue), and case DLG_INIT, add the setting:
CtrlSetText (szDialogName,EDIT_BOX,sEditBox);

Under the NEXT case, add the following in order to get the user's text.
CtrlGetText (szDialogName,EDIT_BOX,sEditBox);

Good Luck!!!;)