PRB: RichEdit Control Doesn't Save REO_* Flags

Last reviewed: September 29, 1995
Article ID: Q135987
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

A program can embed an OLE object in a RichEdit control by using one of the REO_* flags (for example, REO_BELOWBASELINE) to change the standard attributes for the embedded object. However, when the file is saved by using the EM_STREAMOUT message and read back into the control by using the EM_STREAMIN message, the REO_* flags are not applied to the object.

CAUSE

The RichEdit control does not save the REO_* flags when it writes the object to a file.

WORKAROUND

To work around this behavior, have your program handle saving the OLE objects contained in the RichEdit control to disk manually. Then the program can have the RichEdit control save the rest of the contents without the OLE objects by sending the EM_STREAMOUT message to the RichEdit control with the SF_RTFNOOBJS flag. By specifying the SF_RTFNOOBJS flag, the RichEdit control will leave a space character where the object was, so it is important that your program save the position of the OLE objects as well as the actual objects.

STATUS

This behavior is by design.


Additional reference words: 4.00 1.30 RTF Edit Windows 95
KBCategory: kbui
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.