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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another question on List Box

Status
Not open for further replies.

Realazad

Programmer
Apr 5, 2002
15
US
Hi All,

A little background about the problem - My MFC Dialog based app uses a ListBox as a reservoir of data. I write my incoming transactions to this ListBox and if the user so wishes, I retrieve data from the selected entries (for variety of purposes - saving to file, copy to Clipboard etc). But till now it is all character data, all handled through CStrings.

Now my problem; I have to handle Binary Data, which would have been OK except for NULLs. As soon as a CString sees a NULL, it truncates the data at that point. Also the fact that to retrieve data from ListBox I use GetText function does not help.

Can anyone suggest an alternative/solution to my problem of handling NULLs.

TIA
Azad
 
If it's just a datastore, then a ListBox would not seem to be the correct solution. Why don't you create a class to hold the information and a collection class to hold those classes, or some similar approach?

Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top