EM_SETHANDLE and EM_GETHANDLE Messages Not SupportedLast reviewed: September 29, 1995Article ID: Q130759 |
The information in this article applies to:
SUMMARYThe EM_GETHANDLE and EM_SETHANDLE messages are not supported for edit contols that are created as controls of a 32-bit application under Windows 95. This is due to the way USER is designed under Windows 95. 16-bit applications work the same way they did under Windows version 3.1. That is, they can use the EM_GET/SETHANDLE messages. Also Win32-based applications running under Windows NT will be able to use these messages.
MORE INFORMATIONThe EM_GETHANDLE and EM_SETHANDLE messages are used to retrieve and set the handle of the memory currently allocated for a multiline edit control's text. USER under Windows 95 is a mixture of 16- and 32-bit code, so edit controls created inside a 32-bit application cannot use these messages to retrieve or set the handles. Trying to do so causes the application to cause a general protection (GP) fault and thereby be terminated by the System. One workaround that involves a little code modification is to use the GetWindowTextLengt(), GetWindowText(), and SetWindowText() APIs to retrieve and set the text in a edit control. NOTE: USER is almost completely 16-bit, so 32-bit applications thunk down to the 16-bit USER. Also note that the EM_GETHANDLE and EM_SETHANDLE messages cannot be used with Win32s-based applications either.
|
Additional reference words: 4.00 user controls GPF
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |