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.

Multiline edit box problems with long strings?

2 replies to this topic


  • Full Members
  • 35 posts

Posted 30 July 2014 - 17:53

I'm having an issue with an edit box in an InstallScript dialog - IS 2012 Spring - I've got an edit box with Multiline set to "True".  


When I call CtrlGetMLEText and get a stringlist back, I find that the reading is missing some characters from my string.


The string pasted into the dialog is about 1200 characters, with unpredictable line breaks (in many cases none, as the value is usually pasted from an email).


What I'm noticing is that when I pull the value out of the edit box and echo out the lines so I can see what's being pulled, I notice it's missing characters (as few as 2 missing to as many as 15 characters will be missing)


This is the code I've got pulling the edit box in:


if (CtrlGetMLEText(szDlg, EDIT_KEY, stringList) = 0) then
nResult = ListGetFirstString (stringList, svResult);
EditBoxValue = "";
// Loop while list items continue to be retrieved.
while (nResult = 0)
Log("Line: " + svResult);
EditBoxValue = EditBoxValue + svResult;
// Get the next string in the list.
nResult = ListGetNextString (stringList, svResult);
EditBoxValue ends up producing a string that's useless to me due to the missing characters.
Is this a case where I'll have to use an alternate way to present the user an edit box?  Or am I missing some obvious way to pick up the missing characters?


  • Full Members
  • 2 posts

Posted 10 September 2014 - 14:27

In your installscript dialog's DLG_INIT, try changing the maximum length of the edit field using EM_LIMITTEXT and SendMessage WinAPI function. 




  • Full Members
  • 35 posts

Posted 29 September 2014 - 19:46

Hi Venkatesh,


Thanks for the reply, I've been bashing some other issues and hadn't come back here for a while.  The default limit I find for that property is 30000 characters, which is fine for my case.  Even setting the value to 2000 seems to have no impact on the behavior.  It seems like the issue I'm having is with the GUI portion of the dialog.... 


When a user pastes in the 1300 character string, there seems to be line breaks inserted or characters deleted at random points throughout the string that gets pulled by the CtrlGetMLEText function which is trying to read out the value that was pasted in.  As an example, the last test I ran, character 768 was missing (1 character) then characters 925-940 were missing, along with a few other chunks of between 3 and 20 characters each, and not at regular intervals (I could at least see a pattern if it were every 768 characters or something).... It's very random where the characters go missing and doesn't seem to match a particular character combination in the string either.


Thanks for the pointer, though - that is a useful property to know about, and I'll probably end up using it in some of my other dialogs.