Add explicit WM_CLOSE processing in the edit control

Dmitry Timoshkov dmitry at sloboda.ru
Sat Mar 3 01:24:44 CST 2001


Hello.

Since handler of WM_CLOSE in DefWindowProc calls DestroyWindow,
which eventually sends WM_DESTROY, EDITSTATE gets destroyed before
call to EDIT_UnlockBuffer in the end of processing of WM_CLOSE,
therefore EDIT_UnlockBuffer gets confused.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Add explicit WM_CLOSE processing in the edit control.

--- cvs/wine/controls/edit.c	Thu Feb 15 19:19:34 2001
+++ wine/controls/edit.c	Sat Mar  3 14:55:02 2001
@@ -388,6 +388,10 @@
 	LRESULT result = 0;
 
 	switch (msg) {
+	case WM_CLOSE:
+		return unicode ? DefWindowProcW(wnd->hwndSelf, msg, wParam, lParam) :
+				 DefWindowProcA(wnd->hwndSelf, msg, wParam, lParam);
+
 	case WM_DESTROY:
 		DPRINTF_EDIT_MSG32("WM_DESTROY");
 		EDIT_WM_Destroy(wnd, es);






More information about the wine-patches mailing list