Huw Davies : oledlg: Send the OLEUI_MSG_ENDDIALOG messsage when closing the dialog.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 20 04:45:57 CDT 2006


Module: wine
Branch: master
Commit: b7ad8fbbd9483bceb88705862480f8d24ecb0286
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b7ad8fbbd9483bceb88705862480f8d24ecb0286

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Oct 18 22:01:37 2006 +0100

oledlg: Send the OLEUI_MSG_ENDDIALOG messsage when closing the dialog.

---

 dlls/oledlg/pastespl.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/oledlg/pastespl.c b/dlls/oledlg/pastespl.c
index f62e4f4..c34a97c 100644
--- a/dlls/oledlg/pastespl.c
+++ b/dlls/oledlg/pastespl.c
@@ -288,6 +288,11 @@ static void init_lists(HWND hdlg, ps_str
         EnableWindow(GetDlgItem(hdlg, IDOK), 0);
 }
 
+static void send_end_dialog_msg(HWND hdlg, ps_struct_t *ps_struct, UINT id)
+{
+    SendMessageW(hdlg, oleui_msg_enddialog, id, 0);
+}
+
 static void update_structure(HWND hdlg, ps_struct_t *ps_struct)
 {
     ps_struct->ps->dwFlags = ps_struct->flags;
@@ -338,6 +343,13 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND
         {
         case IDOK:
         case IDCANCEL:
+            send_end_dialog_msg(hdlg, ps_struct, LOWORD(wp));
+            return FALSE;
+        }
+        return FALSE;
+    default:
+        if(msg == oleui_msg_enddialog)
+        {
             if(wp == IDOK)
                 update_structure(hdlg, ps_struct);
             EndDialog(hdlg, wp);
@@ -345,8 +357,6 @@ static INT_PTR CALLBACK ps_dlg_proc(HWND
             return TRUE;
         }
         return FALSE;
-    default:
-        return FALSE;
     }
 
 }




More information about the wine-cvs mailing list