WM_SETTEXT problem

In a win3.1 program I try to display the contents of a text file in a multiline edit control. I allocate memory using GlobalAlloc and GlobalLock without any problems. After this I read the text file in the buffer and try to display the text in the edit control using WM_SETTEXT. This works fine if the size of the text buffer is not larger than 30k. If it is larger WM_SETTEXT returns 0 and nothing is displayed in the edit control.
mikel022697Asked:
Who is Participating?
 
md041797Connect With a Mentor Commented:
This is the limit of the buffer.  In order to make a larger text control, you must do your own implementation.  The reason for the limitation is the 64K segemnted addressing.
0
 
mikel022697Author Commented:
< The reason for the limitation is the 64K segemnted addressing.

If the segmentation is 64k, why can the edit control display only 32k?
0
 
md041797Commented:
Only Bill's compadres know for sure, but they probably use int for each character in the text.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.