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

Size of Data Strings for an Edit Box Control 1

Status
Not open for further replies.

sweep123

Technical User
May 1, 2003
185
GB
What is the maximum size of string you can place in a Edit Box on a dialog. Note I am using CString for holding the text.

I am using a multiline Edit Box to display the progress of a test activity. The display used to be a DOS Window.

I use the following code to update the output:-

m_Output.SetFocus(); // Set the focus to main window of the GUI
m_strNewText.Format ("%s", m_pMsg->OutputText); // Copy from memory into m_strNewText variable
m_strOutput+= m_strNewText + crlf; // Total display string;
SetDlgItemText(IDC_OUTPUT1, m_strOutput); // Display the new text appended onto old text
UpdateData(); // Refresh the control

I was thinking of checking the size and restarting when getting near the limit, but what is the limit?
 
Ive never come across a limit, but surely it would depend on the format of your edit box, i.e. if its 20 characters wide, you'd not really want to put 100's of characters in it (in width).

Just think about the context of the use and make decisions based on that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top