CRichEditCtx.AppendDocFilemethod
Appends the contents of the specified RTF file.
Syntax
FUNCTION AppendDocFile (BYREF wszFileName AS WSTRING, BYVAL CodePage AS DWORD = CP_ACP) AS DWORD
Parameters
| Name | Description | |
|---|---|---|
wszFileName | Path and name of the RTF file to append. | |
CodePage | The code page to use for the conversion. Besides the default (CP_ACP), you can use CP_ANSI (ansi), CP_UTF8 (utf8) or 1200 (unicode). |
Description
Appends the contents of the specified file. Besides .rtf files, this method also insert the content of ansi, unicode or utf8 files if you specify the appropriate code page.
Examples
IM wszFileName AS WSTRING * MAX_PATH = AfxGetExePath & $"\Test.rtf" RichEdit->AppendDocFile(wszFileName)
IM wszFileName AS WSTRING * MAX_PATH = AfxGetExePath & $"\Test.txt" RichEdit->AppendDocFile(wszFileName, 500, CP_ANSI) -- or -- RichEdit->AppendDocFile(wszFileName, -1, CP_ANSI)
IM wszFileName AS WSTRING * MAX_PATH = AfxGetExePath & $"\Test.txt" RichEdit->AppendDocFile(wszFileName, 500, CP_UTF8) -- or -- RichEdit->AppendDocFile(wszFileName, -1, CP_UTF8)
IM wszFileName AS WSTRING * MAX_PATH = AfxGetExePath & $"\Test.txt" RichEdit->AppendDocFile(wszFileName, 500, 1200) -- or -- RichEdit->AppendDocFile(wszFileName, -1, 1200)
Append a RTF file. Append a file with ansi contents. Append a file with utf8 contents. Append a file with unicode contents.
Reference
- Defined in AfxNova/CRichEditCtx.inc:3549
- Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
- Topic: CRichEditCtx Class