# HG changeset patch # User Richard M. Stallman # Date 893997462 0 # Node ID bc4455bca454a42015d8571f5df5d4921c0d57ef # Parent 93c99b3a57f1c79b15827dcb14c5b141cd13e454 Include shellapi.h. (w32_createwindow): Enable drag-n-drop on new windows. (w32_wnd_proc): Handle WM_DROPFILES messages. Disable drag-n-drop on closing windows. diff -r 93c99b3a57f1 -r bc4455bca454 src/w32fns.c --- a/src/w32fns.c Fri May 01 04:24:43 1998 +0000 +++ b/src/w32fns.c Fri May 01 04:37:42 1998 +0000 @@ -40,6 +40,7 @@ #include "termhooks.h" #include +#include extern void abort (); extern void free_frame_menubar (); @@ -2891,6 +2892,9 @@ SetWindowLong (hwnd, WND_SCROLLBAR_INDEX, f->output_data.w32->vertical_scroll_bar_extra); SetWindowLong (hwnd, WND_BACKGROUND_INDEX, f->output_data.w32->background_pixel); + /* Enable drag-n-drop. */ + DragAcceptFiles (hwnd, TRUE); + /* Do this to discard the default setting specified by our parent. */ ShowWindow (hwnd, SW_HIDE); } @@ -3583,6 +3587,11 @@ my_post_msg (&wmsg, hwnd, msg, wParam, lParam); return 0; + case WM_DROPFILES: + wmsg.dwModifiers = w32_get_modifiers (); + my_post_msg (&wmsg, hwnd, msg, wParam, lParam); + return 0; + case WM_TIMER: /* Flush out saved messages if necessary. */ if (wParam == mouse_button_timer) @@ -3862,6 +3871,7 @@ } case WM_EMACS_DESTROYWINDOW: + DragAcceptFiles ((HWND) wParam, FALSE); return DestroyWindow ((HWND) wParam); case WM_EMACS_TRACKPOPUPMENU: