From ec7ad35b1285d445aa9ae1a22fb1b583a62761eb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Jan 2024 18:37:37 +0300 Subject: =?UTF-8?q?fixes=20#4132=20(NewStory:=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8=20=D0=BD=D0=B0?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=BE=D0=B5=D0=BA=20=D0=BF=D0=BB=D0=B0=D0=B3?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=20=D0=BD=D0=B5=20=D0=BF=D1=80=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D1=81=D0=BE=D0=B2=D1=8B=D0=B2=D0=B0=D0=B5=D1=82=D1=81?= =?UTF-8?q?=D1=8F=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/mTextControl/src/textcontrol.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libs/mTextControl/src/textcontrol.cpp') diff --git a/libs/mTextControl/src/textcontrol.cpp b/libs/mTextControl/src/textcontrol.cpp index abc05f65e2..4dcb7652c0 100644 --- a/libs/mTextControl/src/textcontrol.cpp +++ b/libs/mTextControl/src/textcontrol.cpp @@ -20,14 +20,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "stdafx.h" #include "FormattedTextDraw.h" -struct TextControlData -{ - HANDLE htu; - wchar_t *text; - TextObject *mtext; - COLORREF clBack = -1; -}; - /// Paint //////////////////////////////////// static LRESULT MTextControl_OnPaint(HWND hwnd) @@ -37,6 +29,7 @@ static LRESULT MTextControl_OnPaint(HWND hwnd) // Find the text to draw TextControlData *data = (TextControlData *)GetWindowLongPtr(hwnd, GWLP_USERDATA); + data->m_bInsideDraw = true; SetTextColor(hdc, RGB(0, 0, 0)); SetBkMode(hdc, TRANSPARENT); @@ -81,6 +74,7 @@ static LRESULT MTextControl_OnPaint(HWND hwnd) // Release the device context EndPaint(hwnd, &ps); + data->m_bInsideDraw = false; return 0; } -- cgit v1.2.3