Mercurial > hg > xemacs-beta
comparison src/device-msw.c @ 278:90d73dddcdc4 r21-0b37
Import from CVS: tag r21-0b37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:31:29 +0200 |
parents | c5d627a313b1 |
children | 7df0dd720c89 |
comparison
equal
deleted
inserted
replaced
277:cfdf3ff11843 | 278:90d73dddcdc4 |
---|---|
43 DWORD mswindows_dde_mlid; | 43 DWORD mswindows_dde_mlid; |
44 HSZ mswindows_dde_service; | 44 HSZ mswindows_dde_service; |
45 HSZ mswindows_dde_topic_system; | 45 HSZ mswindows_dde_topic_system; |
46 HSZ mswindows_dde_item_open; | 46 HSZ mswindows_dde_item_open; |
47 | 47 |
48 #ifdef __CYGWIN32__ | |
49 typedef struct tagINITCOMMONCONTROLSEX | |
50 { | |
51 DWORD dwSize; | |
52 DWORD dwICC; | |
53 } INITCOMMONCONTROLSEX; | |
54 WINAPI BOOL InitCommonControlsEx (INITCOMMONCONTROLSEX*); | |
55 #else | |
56 #include <commctrl.h> | |
57 #endif | |
48 | 58 |
49 /* Control conversion of upper case file names to lower case. | 59 /* Control conversion of upper case file names to lower case. |
50 nil means no, t means yes. */ | 60 nil means no, t means yes. */ |
51 Lisp_Object Vmswindows_downcase_file_names; | 61 Lisp_Object Vmswindows_downcase_file_names; |
52 | 62 |
61 mswindows_init_device (struct device *d, Lisp_Object props) | 71 mswindows_init_device (struct device *d, Lisp_Object props) |
62 { | 72 { |
63 WNDCLASSEX wc; | 73 WNDCLASSEX wc; |
64 HWND desktop; | 74 HWND desktop; |
65 HDC hdc; | 75 HDC hdc; |
76 #ifdef HAVE_TOOLBARS | |
77 INITCOMMONCONTROLSEX iccex; | |
78 xzero(iccex); | |
79 #endif | |
66 | 80 |
67 DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1; | 81 DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1; |
68 init_baud_rate (d); | 82 init_baud_rate (d); |
69 init_one_device (d); | 83 init_one_device (d); |
70 | 84 |
102 wc.lpszMenuName = NULL; | 116 wc.lpszMenuName = NULL; |
103 wc.lpszClassName = XEMACS_CLASS; | 117 wc.lpszClassName = XEMACS_CLASS; |
104 wc.hIconSm = LoadImage (GetModuleHandle (NULL), XEMACS_CLASS, | 118 wc.hIconSm = LoadImage (GetModuleHandle (NULL), XEMACS_CLASS, |
105 IMAGE_ICON, 16, 16, 0); | 119 IMAGE_ICON, 16, 16, 0); |
106 RegisterClassEx (&wc); | 120 RegisterClassEx (&wc); |
121 #ifdef HAVE_TOOLBARS | |
122 iccex.dwSize = sizeof (iccex); | |
123 iccex.dwICC = ICC_BAR_CLASSES; | |
124 #ifdef __CYGWIN32__ | |
125 InitCommonControls (); | |
126 #else | |
127 InitCommonControlsEx (&iccex); | |
128 #endif | |
129 #endif | |
107 } | 130 } |
108 | 131 |
109 static void | 132 static void |
110 mswindows_finish_init_device (struct device *d, Lisp_Object props) | 133 mswindows_finish_init_device (struct device *d, Lisp_Object props) |
111 { | 134 { |
112 /* Initialise DDE management library and our related globals */ | 135 /* Initialise DDE management library and our related globals */ |
113 mswindows_dde_mlid = 0; | 136 mswindows_dde_mlid = 0; |
114 DdeInitialize (&mswindows_dde_mlid, mswindows_dde_callback, | 137 DdeInitialize (&mswindows_dde_mlid, (PFNCALLBACK)mswindows_dde_callback, |
115 APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES| | 138 APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES| |
116 CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, 0); | 139 CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, 0); |
117 | 140 |
118 mswindows_dde_service = DdeCreateStringHandle (mswindows_dde_mlid, XEMACS_CLASS, 0); | 141 mswindows_dde_service = DdeCreateStringHandle (mswindows_dde_mlid, XEMACS_CLASS, 0); |
119 mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid, SZDDESYS_TOPIC, 0); | 142 mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid, SZDDESYS_TOPIC, 0); |