Jump to content


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.
Photo

CtrlGetText


3 replies to this topic

arandasoft

arandasoft
  • Members
  • 3 posts

Posted 26 April 2005 - 17:53

Hi

Im using my InstallShield Project to generate an installer that let me create a database, in my installer I have a Standar Dialog named SQLServerSelectLoginDlg, what I need is take the information that the user put in that Dialog (DataBase Server, User and password) for it I use the CtrlGetText function, first i search the name of my Dialog and the Id of the control where the user put the information in the Dialogs View, I think that the information in that window is rigth but now when I want to see it I can´t because this function don´t let me show anything, I use it in that way:

CtrlGetText ('SQLServerSelectLoginDlg',305,svText);
and it doesn´t work, the i use it in that way:

CtrlGetText ('DialogId_10109',305,svText);
and it doesn´t work either.

What is the problem?? Can I do it in another way??

Silverlay

Silverlay
  • Members
  • 68 posts

Posted 26 April 2005 - 18:34

rolleyes.gif Something like this ....

CODE


#define EDIT_USERNAME 1205 // ID in your dialog of some control here it's edit  
                                            // box
#define SD_DLG_USER   "UserCheck"; // Name of dialog in ur IDE -> "Dialogs"

szDlg     = SD_DLG_USER; // It's just for aesthetics

CtrlGetText( szDlg, EDIT_USERNAME, svUserName ); // svUserName it variable
                                                             //that contains your text



Is this ok ? or more detailed needed? huh.gif


Bonum initium est dimidium facti

arandasoft

arandasoft
  • Members
  • 3 posts

Posted 26 April 2005 - 18:56

I tried with your code and anyway it doesn´t work...

look this, it didn´t show me nothing...

#define EDIT_USERNAME 305
#define SD_DLG_USER "SQLServerSelectLoginDlg";


function OnMoveData()
STRING szDlg,svUserName;
begin

szDlg = SD_DLG_USER; // It's just for aesthetics

CtrlGetText( szDlg, EDIT_USERNAME, svUserName ); // svUserName it variable
MessageBox( svUserName, INFORMATION ); //that contains your text

end;

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 April 2005 - 07:24

You need to call this while the dialog is on the screen, i.e. inside the dialog handler function.