Help Center

CRichEditCtx.InsertObjectmethod

Inserts an image or a Ole object in the rich edit control.

Windowsmethoddocumented

Syntax

FUNCTION InsertObject (BYREF wszFileName AS WSTRING) AS BOOLEAN

Parameters

NameDescription
wszFileNameThe path and file name of the image file.

Return value

Returns a boolean true (-1) for success of false (0) for failure. To get extended information call the GetErrorInfo method.

Description

Inserts an image or a Ole object in the rich edit control. See MSDN: https://learn.microsoft.com/en-us/windows/win32/controls/using-rich-edit-com Remarks: To insert images, use the InsertImage method, because the InsertObject method won't display the image, but an icon, when the image type is not a bitmap.

Reference

  • Defined in AfxNova/CRichEditCtx.inc:3618
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class