diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-19 20:50:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-19 20:50:49 +0000 |
commit | d8348065cbeb4c23f5594e4cabed7094a8e2e430 (patch) | |
tree | 55cb282c8450eb02ba918c05233d4370bae0af4b /plugins/Scriver/src/utils.cpp | |
parent | b9c6f2f3a368274a21cee17d4e3ffe2f9980ec7d (diff) |
- mir_unsubclassWindow introduced for the explicit window unsubclassing;
- fix for subclassing in SRMM event handlers
git-svn-id: http://svn.miranda-ng.org/main/trunk@4117 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/utils.cpp')
-rw-r--r-- | plugins/Scriver/src/utils.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index d72947f720..46bbc41530 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -220,18 +220,14 @@ static DWORD CALLBACK RichTextStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, char* GetRichTextRTF(HWND hwnd)
{
- EDITSTREAM stream;
- char* pszText = NULL;
- DWORD dwFlags;
-
if (hwnd == 0)
return NULL;
- ZeroMemory(&stream, sizeof(stream));
+ char* pszText = NULL;
+ EDITSTREAM stream = { 0 };
stream.pfnCallback = RichTextStreamCallback;
- stream.dwCookie = (DWORD_PTR) &pszText; // pass pointer to pointer
- dwFlags = SF_RTFNOOBJS | SFF_PLAINRTF | SF_USECODEPAGE | (CP_UTF8 << 16);
- SendMessage(hwnd, EM_STREAMOUT, dwFlags, (LPARAM) & stream);
+ stream.dwCookie = (DWORD_PTR)&pszText; // pass pointer to pointer
+ SendMessage(hwnd, EM_STREAMOUT, SF_RTFNOOBJS | SFF_PLAINRTF | SF_USECODEPAGE | (CP_UTF8 << 16), (LPARAM)&stream);
return pszText; // pszText contains the text
}
|