Help Center

CRichEditCtx.GetTextFromFilemethod

Gets text from the specified file.

Windowsmethoddocumented

Syntax

FUNCTION GetTextFromFile (BYREF wszFileName AS WSTRING) AS STRING

Parameters

NameDescription
wszFileNameThe path and name of the file to read.

Return value

An string with the contents of the file or an empty string if the method fails. Possible errors are E_INVALIDARG (invalid argument) and ERROR_FILE_NOT_FOUND (if the file does not exist). Call the GetErrorInfo method to get error information.

Description

Gets text from the specified file

Remarks

This method is used by the AppendDocFile and InsertDocFile methods.

Reference

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