Help Center

CRichEditCtx.LoadRtfFromResourcemethod

Loads a rich text resource file into a rich edit control.

Windowsmethoddocumented

Syntax

FUNCTION LoadRtfFromResource (BYREF wszResourceName AS WSTRING) AS BOOLEAN

Parameters

NameDescription
wszResourceNameThe name of the resource to load.

Return value

If the operation succeeds, the return value is TRUE. If the operation fails, the return value is FALSE.

Description

Loads a RTF resource file into a Rich Edit control.

Remarks

First you have to create an instance of the CRichEditOleCallback class and pass a pointer to it to the rich edit control using the SetOleCallback method. Then load the .rtf file using the LoadRtfFromResource method. Resource file 1 24 ".\Resources\Manifest.xml" RTFFILE RCDATA ".\Resources\<title of the rtf file>.rtf"

Examples

DIM pRichEditOleCallback AS CRichEditOleCallback = CRichEditOleCallback pRichEdit.SetOleCallback(@pRichEditOleCallback)

pRichEdit.LoadRtfFromResource(<resource name>, e.g. RTFILE)

Reference

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