Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendMessage doesn't seem to handle embedded tabs in a string

Status
Not open for further replies.

SBendBuckeye

Programmer
May 22, 2002
2,166
US
Hello all,

I have a form which does a lot of listbox filling based on arrays. To try and speed it up, I am using the SendMessage API to fill the various listboxes instead of using the AddItem method (eg lstbox.AddItem).

Everything is working fine except for one listbox which sometimes gets filled with a string that contains an embedded Tab or NewLine character. When that happens SendMessage fails. Is there anything I can do to change this or am I missing something obvious here? Thanks!

Have a great day!

j2consulting@yahoo.com
 
>When that happens SendMessage fails.

What do you mean? What happens exactly? Any error message?

__________________________________________
Try forum1391 for lively discussions
 
It returns zero and the listitem is not added. There is no error message that I am aware of. If I run the exact code with a string that does not contain an embedded tab it runs properly. Thanks!

Have a great day!

j2consulting@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top