Solved

WM_SETTEXT problem

Posted on 1997-06-07
3
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 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