comparison src/gui_w32.c @ 1213:8906c10ecbb0

updated for version 7.1b
author vimboss
date Thu, 10 May 2007 18:19:11 +0000
parents fb8f2e3e798c
children 198a695ca8e7
comparison
equal deleted inserted replaced
1212:e085b0f7b036 1213:8906c10ecbb0
1 /* vi:set ts=8 sts=4 sw=4: 1 s, if any./* vi:set ts=8 sts=4 sw=4:
2 * 2 *
3 * VIM - Vi IMproved by Bram Moolenaar 3 * VIM - Vi IMproved by Bram Moolenaar
4 * GUI support by Robert Webb 4 * GUI support by Robert Webb
5 * 5 *
6 * Do ":help uganda" in Vim to read copying and usage conditions. 6 * Do ":help uganda" in Vim to read copying and usage conditions.
230 HINSTANCE hinst; 230 HINSTANCE hinst;
231 UINT uFlags; 231 UINT uFlags;
232 LPARAM lParam; 232 LPARAM lParam;
233 } NMTTDISPINFO_NEW; 233 } NMTTDISPINFO_NEW;
234 234
235 #ifndef LPNMTTDISPINFO 235 #include <poppack.h>
236
237 typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
238 #ifndef TTM_SETMAXTIPWIDTH
239 # define TTM_SETMAXTIPWIDTH (WM_USER+24)
240 #endif
241
242 #ifndef TTF_DI_SETITEM
243 # define TTF_DI_SETITEM 0x8000
244 #endif
245
246 #ifndef TTN_GETDISPINFO
247 # define TTN_GETDISPINFO (TTN_FIRST - 0)
248 #endif
249
250 #endif /* defined(FEAT_BEVAL) */
251
252 #if defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)
253 /* Older MSVC compilers don't have LPNMTTDISPINFO[AW] thus we need to define
254 * it here if LPNMTTDISPINFO isn't defined.
255 * MingW doesn't define LPNMTTDISPINFO but typedefs it. Thus we need to check
256 * _MSC_VER. */
257 # if !defined(LPNMTTDISPINFO) && defined(_MSC_VER)
236 typedef struct tagNMTTDISPINFOA { 258 typedef struct tagNMTTDISPINFOA {
237 NMHDR hdr; 259 NMHDR hdr;
238 LPSTR lpszText; 260 LPSTR lpszText;
239 char szText[80]; 261 char szText[80];
240 HINSTANCE hinst; 262 HINSTANCE hinst;
241 UINT uFlags; 263 UINT uFlags;
242 LPARAM lParam; 264 LPARAM lParam;
243 } NMTTDISPINFOA, *LPNMTTDISPINFOA; 265 } NMTTDISPINFOA, *LPNMTTDISPINFOA;
244 # define LPNMTTDISPINFO LPNMTTDISPINFOA 266 # define LPNMTTDISPINFO LPNMTTDISPINFOA
245 267
268 # ifdef FEAT_MBYTE
246 typedef struct tagNMTTDISPINFOW { 269 typedef struct tagNMTTDISPINFOW {
247 NMHDR hdr; 270 NMHDR hdr;
248 LPWSTR lpszText; 271 LPWSTR lpszText;
249 WCHAR szText[80]; 272 WCHAR szText[80];
250 HINSTANCE hinst; 273 HINSTANCE hinst;
251 UINT uFlags; 274 UINT uFlags;
252 LPARAM lParam; 275 LPARAM lParam;
253 } NMTTDISPINFOW, *LPNMTTDISPINFOW; 276 } NMTTDISPINFOW, *LPNMTTDISPINFOW;
254 #endif 277 # endif
255 278 # endif
256 #include <poppack.h> 279 #endif
257
258 typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
259 #ifndef TTM_SETMAXTIPWIDTH
260 # define TTM_SETMAXTIPWIDTH (WM_USER+24)
261 #endif
262
263 #ifndef TTF_DI_SETITEM
264 # define TTF_DI_SETITEM 0x8000
265 #endif
266
267 #ifndef TTN_GETDISPINFO
268 # define TTN_GETDISPINFO (TTN_FIRST - 0)
269 #endif
270
271 #endif /* defined(FEAT_BEVAL) */
272 280
273 #ifndef TTN_GETDISPINFOW 281 #ifndef TTN_GETDISPINFOW
274 # define TTN_GETDISPINFOW (TTN_FIRST - 10) 282 # define TTN_GETDISPINFOW (TTN_FIRST - 10)
275 #endif 283 #endif
276 284
3324 * the default!! Grrr. Workaround: Make the default button the only 3332 * the default!! Grrr. Workaround: Make the default button the only
3325 * one with WS_TABSTOP style. Means user can't tab between buttons, but 3333 * one with WS_TABSTOP style. Means user can't tab between buttons, but
3326 * he/she can use arrow keys. 3334 * he/she can use arrow keys.
3327 * 3335 *
3328 * new NOTE: BS_DEFPUSHBUTTON is required to be able to select the 3336 * new NOTE: BS_DEFPUSHBUTTON is required to be able to select the
3329 * right buttun when hitting <Enter>. E.g., for the ":confirm quit" 3337 * right button when hitting <Enter>. E.g., for the ":confirm quit"
3330 * dialog. Also needed for when the textfield is the default control. 3338 * dialog. Also needed for when the textfield is the default control.
3331 * It appears to work now (perhaps not on Win95?). 3339 * It appears to work now (perhaps not on Win95?).
3332 */ 3340 */
3333 if (vertical) 3341 if (vertical)
3334 { 3342 {
4046 InitCommonControls(); 4054 InitCommonControls();
4047 s_toolbarhwnd = CreateToolbarEx( 4055 s_toolbarhwnd = CreateToolbarEx(
4048 s_hwnd, 4056 s_hwnd,
4049 WS_CHILD | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT, 4057 WS_CHILD | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT,
4050 4000, //any old big number 4058 4000, //any old big number
4051 31, //number of images in inital bitmap 4059 31, //number of images in initial bitmap
4052 s_hinst, 4060 s_hinst,
4053 IDR_TOOLBAR1, // id of initial bitmap 4061 IDR_TOOLBAR1, // id of initial bitmap
4054 NULL, 4062 NULL,
4055 0, // initial number of buttons 4063 0, // initial number of buttons
4056 TOOLBAR_BUTTON_WIDTH, //api guide is wrong! 4064 TOOLBAR_BUTTON_WIDTH, //api guide is wrong!