From 4164d60646b408abf62bc8170165aedcc574d088 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 5 Apr 2017 20:14:14 +0300 Subject: more methods for CCtrlRichEdit: GetRichTextRtf, GetRichTextUtf, GetRichText, SetRichText, SetRichTextRtf --- include/m_gui.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/m_gui.h b/include/m_gui.h index da0d1e49b5..e94d43f3d3 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -800,7 +800,17 @@ class MIR_CORE_EXPORT CCtrlRichEdit : public CCtrlEdit public: CCtrlRichEdit(CDlgBase *dlg, int ctrlId); - int GetRichTextLength() const; + // returns text length in bytes if a parameter is omitted or in symbols, if not + int GetRichTextLength(int iCodePage = CP_ACP) const; + + // returns a buffer that should be freed using mir_free() or ptrA/ptrW + char* GetRichTextRtf(bool bText = false, bool bSelection = false) const; // returns text with formatting + char* GetRichTextUtf() const; // returns only text in utf8 + wchar_t* GetRichText() const; // returns only text in ucs2 + + // these methods return text length in Unicode chars + int SetRichText(const wchar_t *text); + int SetRichTextRtf(const char *text); }; ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3