BUG: Multiple Definitions for EM_CHARFROMPOS & EM_POSFROMCHAR

Last reviewed: September 29, 1995
Article ID: Q137249
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT version 3.51
        - Microsoft Windows 95 version 4.0
        - Microsoft Win32s version 1.3
    

SYMPTOMS

If you are using the EM_CHARFROMPOS and EM_POSFROMCHAR messages with a RichEdit control as outlined in the Win32 SDK documentation, and they are not working, it is likely that your application is using incorrect values for EM_CHARFROMPOS and EM_POSFROMCHAR.

CAUSE

The definitions for EM_CHARFROMPOS and EM_POSFROMCHAR in Richedit.h are different from the definitions in Winuser.h.

RESOLUTION

The programmer needs to use the definitions from Winuser.h as these work correctly. Include Winuser.h before Richedit.h. If these messages still don't work, the message values should be hard-coded to those from Winuser.h.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 1.30 4.00
KBCategory: kbui kbbuglist
KBSubcategory: UsrCtl


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.