summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-29 17:32:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-29 17:32:56 +0000
commit106ade93d5a6f1051db3e1a3b8a70dda51118137 (patch)
treedf0b85f1c169784b26e618fb743b74685fe45523 /plugins/Scriver/src/utils.cpp
parent024b8c5ae150b43f68c7af37c429c9472c4c2b7e (diff)
fix for the command history in Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@13896 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/utils.cpp')
-rw-r--r--plugins/Scriver/src/utils.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index f0f01ef9dc..6d7ae724fe 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -117,7 +117,18 @@ int SetRichText(HWND hwnd, const TCHAR *text)
st.flags = ST_DEFAULT;
st.codepage = 1200;
SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)text);
- return GetRichTextLength(hwnd, st.codepage, FALSE);
+
+ return GetRichTextLength(hwnd, 1200, FALSE);
+}
+
+int SetRichTextRTF(HWND hwnd, const char *text)
+{
+ SETTEXTEX st;
+ st.flags = ST_DEFAULT;
+ st.codepage = CP_UTF8;
+ SendMessage(hwnd, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)text);
+
+ return GetRichTextLength(hwnd, 1200, FALSE);
}
static DWORD CALLBACK RichTextStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)