From e8023c47686c865f79d2a40da21940875b045958 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 6 Feb 2004 09:45:49 +0000 Subject: Changed window object destruction to occor on WM_NCDESTROY rather than WM_DESTROY as WM_NCDESTROY is the last message a window sees. --- win32/ScintillaWin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index fc02cd457..1bb297652 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2029,7 +2029,7 @@ sptr_t PASCAL ScintillaWin::CTWndProc( return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } } else { - if (iMessage == WM_DESTROY) { + if (iMessage == WM_NCDESTROY) { ::SetWindowLong(hWnd, 0, 0); return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } else if (iMessage == WM_PAINT) { @@ -2097,7 +2097,7 @@ sptr_t PASCAL ScintillaWin::SWndProc( return ::DefWindowProc(hWnd, iMessage, wParam, lParam); } } else { - if (iMessage == WM_DESTROY) { + if (iMessage == WM_NCDESTROY) { sci->Finalise(); delete sci; ::SetWindowLong(hWnd, 0, 0); -- cgit v1.2.3