home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mswindo / programm / misc / 1029 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.5 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rphroy!ilium!angus!cyrcle!lothar
  2. From: lothar@cyrcle.uucp (Bob Trembley)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: In search of better edit control
  5. Summary: Workaround for using GlobalMemory with EditBoxes
  6. Keywords: Editbox Memory
  7. Message-ID: <aXqioB2w165w@cyrcle.uucp>
  8. Date: 26 Jul 92 12:23:09 GMT
  9. References: <115230001@hpcupt3.cup.hp.com>
  10. Reply-To: lothar@angus.mi.org
  11. Organization: Cyrcle Systems
  12. Lines: 27
  13.  
  14. ramuta@hpcupt3.cup.hp.com (John Ramuta) writes:
  15.  
  16. > I'm looking for an edit control that doesn't suffer from the size limitations
  17. > of the standard Windows edit control.
  18.  
  19. The following is a response I got from Michael Geary when I asked the exact
  20. same question:
  21.  
  22. ------------------
  23.  
  24. What you need to do is do a GlobalAlloc with GMEM_ZEROINIT | GMEM_MOVEABLE |
  25. GMEM_SHARE (the last is critical).  I usually allocate 256 bytes; it will
  26. grow as needed.  Then pass the handle as the hInstance to CreateWindow.
  27.  
  28. ... you can't use EM_SETHANDLE or EM_GETHANDLE.  (And actually, you *can* use
  29. these, as long as you are aware that the local handle is not a local handle
  30. in your DGROUP, but a local handle within the global segment you allocated.
  31. You would have to play tricks with DS to use this handle.  But you can use
  32. all the other usual calls - SetWindowText, all the other EM_ messages, etc.
  33.  
  34. ------------------
  35.  
  36. I wonder if NT will be plagued by the editbox limitation... I also can't
  37. confirm that this will work under NT.
  38.  
  39. --
  40. lothar@angus.mi.org (Bob Trembley)
  41.