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