Solved

WM_SETTEXT problem

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

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

Suggested Solutions

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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 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