summaryrefslogtreecommitdiff
path: root/libs/mTextControl/src/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/mTextControl/src/services.cpp')
-rw-r--r--libs/mTextControl/src/services.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/mTextControl/src/services.cpp b/libs/mTextControl/src/services.cpp
index 317646dcbb..2716bce13b 100644
--- a/libs/mTextControl/src/services.cpp
+++ b/libs/mTextControl/src/services.cpp
@@ -50,7 +50,8 @@ void MText_InitFormatting1(TextObject *text)
bbCodeParse(text->ftd);
// smilies
- HWND hwnd = CreateProxyWindow(text->ftd->getTextService());
+ HWND hwnd = CreateProxyWindow();
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)text->ftd->getTextService());
SMADD_RICHEDIT sm = {};
sm.hwndRichEditControl = hwnd;
@@ -59,7 +60,7 @@ void MText_InitFormatting1(TextObject *text)
sm.flags = SAFLRE_INSERTEMF;
CallService(MS_SMILEYADD_REPLACESMILEYS, 0, (LPARAM)&sm);
- DestroyWindow(hwnd);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
}
/////////////////////////////////////////////////////////////////////////////////////////