summaryrefslogtreecommitdiff
path: root/libs/mTextControl/src/textcontrol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/mTextControl/src/textcontrol.cpp')
-rw-r--r--libs/mTextControl/src/textcontrol.cpp10
1 files changed, 2 insertions, 8 deletions
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;
}