Mercurial > emacs
comparison src/w32fns.c @ 21884:bc4455bca454
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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 01 May 1998 04:37:42 +0000 |
parents | c0871d40073e |
children | ff66bfc5d801 |
comparison
equal
deleted
inserted
replaced
21883:93c99b3a57f1 | 21884:bc4455bca454 |
---|---|
38 #include "paths.h" | 38 #include "paths.h" |
39 #include "w32heap.h" | 39 #include "w32heap.h" |
40 #include "termhooks.h" | 40 #include "termhooks.h" |
41 | 41 |
42 #include <commdlg.h> | 42 #include <commdlg.h> |
43 #include <shellapi.h> | |
43 | 44 |
44 extern void abort (); | 45 extern void abort (); |
45 extern void free_frame_menubar (); | 46 extern void free_frame_menubar (); |
46 extern struct scroll_bar *x_window_to_scroll_bar (); | 47 extern struct scroll_bar *x_window_to_scroll_bar (); |
47 extern int quit_char; | 48 extern int quit_char; |
2889 SetWindowLong (hwnd, WND_LINEHEIGHT_INDEX, f->output_data.w32->line_height); | 2890 SetWindowLong (hwnd, WND_LINEHEIGHT_INDEX, f->output_data.w32->line_height); |
2890 SetWindowLong (hwnd, WND_BORDER_INDEX, f->output_data.w32->internal_border_width); | 2891 SetWindowLong (hwnd, WND_BORDER_INDEX, f->output_data.w32->internal_border_width); |
2891 SetWindowLong (hwnd, WND_SCROLLBAR_INDEX, f->output_data.w32->vertical_scroll_bar_extra); | 2892 SetWindowLong (hwnd, WND_SCROLLBAR_INDEX, f->output_data.w32->vertical_scroll_bar_extra); |
2892 SetWindowLong (hwnd, WND_BACKGROUND_INDEX, f->output_data.w32->background_pixel); | 2893 SetWindowLong (hwnd, WND_BACKGROUND_INDEX, f->output_data.w32->background_pixel); |
2893 | 2894 |
2895 /* Enable drag-n-drop. */ | |
2896 DragAcceptFiles (hwnd, TRUE); | |
2897 | |
2894 /* Do this to discard the default setting specified by our parent. */ | 2898 /* Do this to discard the default setting specified by our parent. */ |
2895 ShowWindow (hwnd, SW_HIDE); | 2899 ShowWindow (hwnd, SW_HIDE); |
2896 } | 2900 } |
2897 } | 2901 } |
2898 | 2902 |
3577 saved_mouse_move_msg.dwModifiers = w32_get_modifiers (); | 3581 saved_mouse_move_msg.dwModifiers = w32_get_modifiers (); |
3578 | 3582 |
3579 return 0; | 3583 return 0; |
3580 | 3584 |
3581 case WM_MOUSEWHEEL: | 3585 case WM_MOUSEWHEEL: |
3586 wmsg.dwModifiers = w32_get_modifiers (); | |
3587 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); | |
3588 return 0; | |
3589 | |
3590 case WM_DROPFILES: | |
3582 wmsg.dwModifiers = w32_get_modifiers (); | 3591 wmsg.dwModifiers = w32_get_modifiers (); |
3583 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); | 3592 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); |
3584 return 0; | 3593 return 0; |
3585 | 3594 |
3586 case WM_TIMER: | 3595 case WM_TIMER: |
3860 return SetWindowPos (hwnd, pos->hwndInsertAfter, | 3869 return SetWindowPos (hwnd, pos->hwndInsertAfter, |
3861 pos->x, pos->y, pos->cx, pos->cy, pos->flags); | 3870 pos->x, pos->y, pos->cx, pos->cy, pos->flags); |
3862 } | 3871 } |
3863 | 3872 |
3864 case WM_EMACS_DESTROYWINDOW: | 3873 case WM_EMACS_DESTROYWINDOW: |
3874 DragAcceptFiles ((HWND) wParam, FALSE); | |
3865 return DestroyWindow ((HWND) wParam); | 3875 return DestroyWindow ((HWND) wParam); |
3866 | 3876 |
3867 case WM_EMACS_TRACKPOPUPMENU: | 3877 case WM_EMACS_TRACKPOPUPMENU: |
3868 { | 3878 { |
3869 UINT flags; | 3879 UINT flags; |