Solved

WM_SETTEXT problem

Posted on 1997-06-07
3
391 Views
Last Modified: 2013-12-03
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.
0
Comment
Question by:mikel022697
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
md041797 earned 100 total points
ID: 1397914
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
 

Author Comment

by:mikel022697
ID: 1397915
< The reason for the limitation is the 64K segemnted addressing.

If the segmentation is 64k, why can the edit control display only 32k?
0
 
LVL 4

Expert Comment

by:md041797
ID: 1397916
Only Bill's compadres know for sure, but they probably use int for each character in the text.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now