Solved

WM_SETTEXT problem

Posted on 1997-06-07
3
405 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

690 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