diff options
Diffstat (limited to 'libs/mTextControl')
-rw-r--r-- | libs/mTextControl/src/textcontrol.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/mTextControl/src/textcontrol.cpp b/libs/mTextControl/src/textcontrol.cpp index f1b92d2f10..5a871d42e5 100644 --- a/libs/mTextControl/src/textcontrol.cpp +++ b/libs/mTextControl/src/textcontrol.cpp @@ -109,6 +109,20 @@ static LRESULT CALLBACK MTextControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, InvalidateRect(hwnd, nullptr, TRUE); return TRUE; + case MTM_UPDATEEX: + if (data->text) { + delete[] data->text; + data->text = nullptr; + } + + if (data->mtext) + MTextDestroy(data->mtext); + + data->mtext = MTextCreateEx(data->htu, (char*)lParam, wParam); + MTextSetParent(data->mtext, hwnd); + InvalidateRect(hwnd, nullptr, TRUE); + return TRUE; + case WM_PAINT: return MTextControl_OnPaint(hwnd); |