]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/missing.h
Add an empty implementation of the OSXGenerateEvent() pure virtual so the generic...
[wxWidgets.git] / include / wx / msw / missing.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/missing.h
3// Purpose: Declarations for parts of the Win32 SDK that are missing in
4// the versions that come with some compilers
5// Created: 2002/04/23
6// RCS-ID: $Id$
7// Copyright: (c) 2002 Mattia Barbon
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_MISSING_H_
12#define _WX_MISSING_H_
13
14/*
15 * The following are required for VC++ 6.
16 */
17
18// Needed by cursor.cpp
19#ifndef IDC_HAND
20 #define IDC_HAND MAKEINTRESOURCE(32649)
21#endif
22
23// Needed by strconv.cpp
24#ifndef WC_NO_BEST_FIT_CHARS
25 #define WC_NO_BEST_FIT_CHARS 0x400
26#endif
27
28#ifndef WM_CONTEXTMENU
29 #define WM_CONTEXTMENU 0x007B
30#endif
31
32#ifndef WM_CHANGEUISTATE
33 #define WM_CHANGEUISTATE 0x0127
34#endif
35
36#ifndef WM_UPDATEUISTATE
37 #define WM_UPDATEUISTATE 0x0128
38#endif
39
40#ifndef WM_QUERYUISTATE
41 #define WM_QUERYUISTATE 0x0129
42#endif
43
44#ifndef WM_PRINTCLIENT
45 #define WM_PRINTCLIENT 0x318
46#endif
47
48#ifndef DT_HIDEPREFIX
49 #define DT_HIDEPREFIX 0x00100000
50#endif
51
52// Needed by toplevel.cpp
53#ifndef UIS_SET
54 #define UIS_SET 1
55 #define UIS_CLEAR 2
56 #define UIS_INITIALIZE 3
57#endif
58
59#ifndef UISF_HIDEFOCUS
60 #define UISF_HIDEFOCUS 1
61#endif
62
63#ifndef UISF_HIDEACCEL
64 #define UISF_HIDEACCEL 2
65#endif
66
67#ifndef OFN_EXPLORER
68 #define OFN_EXPLORER 0x00080000
69#endif
70
71#ifndef OFN_ENABLESIZING
72 #define OFN_ENABLESIZING 0x00800000
73#endif
74
75// Needed by window.cpp
76#if wxUSE_MOUSEWHEEL
77 #ifndef WM_MOUSEWHEEL
78 #define WM_MOUSEWHEEL 0x020A
79 #endif
80 #ifndef WHEEL_DELTA
81 #define WHEEL_DELTA 120
82 #endif
83 #ifndef SPI_GETWHEELSCROLLLINES
84 #define SPI_GETWHEELSCROLLLINES 104
85 #endif
86#endif // wxUSE_MOUSEWHEEL
87
88// Needed by window.cpp
89#ifndef VK_OEM_1
90 #define VK_OEM_1 0xBA
91 #define VK_OEM_2 0xBF
92 #define VK_OEM_3 0xC0
93 #define VK_OEM_4 0xDB
94 #define VK_OEM_5 0xDC
95 #define VK_OEM_6 0xDD
96 #define VK_OEM_7 0xDE
97 #define VK_OEM_102 0xE2
98#endif
99
100#ifndef VK_OEM_COMMA
101 #define VK_OEM_PLUS 0xBB
102 #define VK_OEM_COMMA 0xBC
103 #define VK_OEM_MINUS 0xBD
104 #define VK_OEM_PERIOD 0xBE
105#endif
106
107#ifndef SM_TABLETPC
108 #define SM_TABLETPC 86
109#endif
110
111#ifndef INKEDIT_CLASS
112# define INKEDIT_CLASSW L"INKEDIT"
113# ifdef UNICODE
114# define INKEDIT_CLASS INKEDIT_CLASSW
115# else
116# define INKEDIT_CLASS "INKEDIT"
117# endif
118#endif
119
120#ifndef EM_SETINKINSERTMODE
121# define EM_SETINKINSERTMODE (WM_USER + 0x0204)
122#endif
123
124#ifndef EM_SETUSEMOUSEFORINPUT
125#define EM_SETUSEMOUSEFORINPUT (WM_USER + 0x224)
126#endif
127
128#ifndef TPM_RECURSE
129#define TPM_RECURSE 1
130#endif
131
132
133#ifndef WS_EX_LAYOUTRTL
134#define WS_EX_LAYOUTRTL 0x00400000
135#endif
136
137#ifndef WS_EX_COMPOSITED
138#define WS_EX_COMPOSITED 0x02000000L
139#endif
140
141#ifndef WS_EX_LAYERED
142#define WS_EX_LAYERED 0x00080000
143#endif
144
145#ifndef LWA_ALPHA
146#define LWA_ALPHA 2
147#endif
148
149#ifndef QS_ALLPOSTMESSAGE
150#define QS_ALLPOSTMESSAGE 0
151#endif
152
153/*
154 * The following are required for VC++ 5 when the PSDK is not available.
155 */
156
157#if defined __VISUALC__ && __VISUALC__ <= 1100
158
159#ifndef VER_NT_WORKSTATION
160
161typedef struct _OSVERSIONINFOEXA {
162 DWORD dwOSVersionInfoSize;
163 DWORD dwMajorVersion;
164 DWORD dwMinorVersion;
165 DWORD dwBuildNumber;
166 DWORD dwPlatformId;
167 CHAR szCSDVersion[128];
168 WORD wServicePackMajor;
169 WORD wServicePackMinor;
170 WORD wSuiteMask;
171 BYTE wProductType;
172 BYTE wReserved;
173} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
174typedef struct _OSVERSIONINFOEXW {
175 DWORD dwOSVersionInfoSize;
176 DWORD dwMajorVersion;
177 DWORD dwMinorVersion;
178 DWORD dwBuildNumber;
179 DWORD dwPlatformId;
180 WCHAR szCSDVersion[128];
181 WORD wServicePackMajor;
182 WORD wServicePackMinor;
183 WORD wSuiteMask;
184 BYTE wProductType;
185 BYTE wReserved;
186} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW;
187
188#ifdef UNICODE
189typedef OSVERSIONINFOW OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
190typedef OSVERSIONINFOEXW OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
191#else
192typedef OSVERSIONINFOA OSVERSIONINFO,*POSVERSIONINFO,*LPOSVERSIONINFO;
193typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
194#endif
195
196#endif // defined VER_NT_WORKSTATION
197
198#ifndef CP_SYMBOL
199 #define CP_SYMBOL 42
200#endif
201
202// NMLVCUSTOMDRAW originally didn't have the iSubItem member. It was added
203// with IE4, as was IPN_FIRST which is used as a test :-(.
204//
205#ifndef IPN_FIRST
206
207typedef struct wxtagNMLVCUSTOMDRAW_ {
208 NMCUSTOMDRAW nmcd;
209 COLORREF clrText;
210 COLORREF clrTextBk;
211 int iSubItem;
212} wxNMLVCUSTOMDRAW_, *wxLPNMLVCUSTOMDRAW_;
213
214#define NMLVCUSTOMDRAW wxNMLVCUSTOMDRAW_
215#define LPNMLVCUSTOMDRAW wxLPNMLVCUSTOMDRAW_
216
217#endif // defined IPN_FIRST
218
219#endif // defined __VISUALC__ && __VISUALC__ <= 1100
220
221// ----------------------------------------------------------------------------
222// menu stuff
223// ----------------------------------------------------------------------------
224
225#ifndef MIIM_BITMAP
226 #define MIIM_STRING 0x00000040
227 #define MIIM_BITMAP 0x00000080
228 #define MIIM_FTYPE 0x00000100
229 #define HBMMENU_CALLBACK ((HBITMAP) -1)
230
231 typedef struct tagMENUINFO
232 {
233 DWORD cbSize;
234 DWORD fMask;
235 DWORD dwStyle;
236 UINT cyMax;
237 HBRUSH hbrBack;
238 DWORD dwContextHelpID;
239 DWORD dwMenuData;
240 } MENUINFO, FAR *LPMENUINFO;
241#endif // MIIM_BITMAP &c
242
243// ----------------------------------------------------------------------------
244// definitions related to ListView and Header common controls, needed by
245// msw/listctrl.cpp and msw/headerctrl.cpp
246// ----------------------------------------------------------------------------
247
248#ifndef I_IMAGENONE
249 #define I_IMAGENONE (-2)
250#endif
251
252#ifndef LVS_EX_FULLROWSELECT
253 #define LVS_EX_FULLROWSELECT 0x00000020
254#endif
255
256// LVS_EX_LABELTIP is not supported by Windows CE, don't define it there
257#if !defined(LVS_EX_LABELTIP) && !defined(__WXWINCE__)
258 #define LVS_EX_LABELTIP 0x00004000
259#endif
260
261#ifndef LVS_EX_SUBITEMIMAGES
262 #define LVS_EX_SUBITEMIMAGES 0x00000002
263#endif
264
265#ifndef HDN_GETDISPINFOW
266 #define HDN_GETDISPINFOW (HDN_FIRST-29)
267#endif
268
269#ifndef HDS_HOTTRACK
270 #define HDS_HOTTRACK 4
271#endif
272#ifndef HDS_FLAT
273 #define HDS_FLAT 0x0200
274#endif
275
276#ifndef HDF_SORTUP
277 #define HDF_SORTUP 0x0400
278 #define HDF_SORTDOWN 0x0200
279#endif
280
281 /*
282 * In addition to the above, the following are required for several compilers.
283 */
284
285#if !defined(CCS_VERT)
286#define CCS_VERT 0x00000080L
287#endif
288
289#if !defined(CCS_RIGHT)
290#define CCS_RIGHT (CCS_VERT|CCS_BOTTOM)
291#endif
292
293#if !defined(TB_SETDISABLEDIMAGELIST)
294 #define TB_SETDISABLEDIMAGELIST (WM_USER + 54)
295#endif // !defined(TB_SETDISABLEDIMAGELIST)
296
297#ifndef CFM_BACKCOLOR
298 #define CFM_BACKCOLOR 0x04000000
299#endif
300
301#ifndef HANGUL_CHARSET
302 #define HANGUL_CHARSET 129
303#endif
304
305#ifndef CCM_SETUNICODEFORMAT
306 #define CCM_SETUNICODEFORMAT 8197
307#endif
308
309// ----------------------------------------------------------------------------
310// Tree control
311// ----------------------------------------------------------------------------
312
313#ifndef TV_FIRST
314 #define TV_FIRST 0x1100
315#endif
316
317#ifndef TVS_FULLROWSELECT
318 #define TVS_FULLROWSELECT 0x1000
319#endif
320
321#ifndef TVM_SETBKCOLOR
322 #define TVM_SETBKCOLOR (TV_FIRST + 29)
323 #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
324#endif
325
326 /*
327 * The following are required for BC++ 5.5 (none at present.)
328 */
329
330 /*
331 * The following are specifically required for Digital Mars C++
332 */
333
334#ifdef __DMC__
335
336#ifndef VER_NT_WORKSTATION
337typedef struct _OSVERSIONINFOEX {
338 DWORD dwOSVersionInfoSize;
339 DWORD dwMajorVersion;
340 DWORD dwMinorVersion;
341 DWORD dwBuildNumber;
342 DWORD dwPlatformId;
343 TCHAR szCSDVersion[ 128 ];
344 WORD wServicePackMajor;
345 WORD wServicePackMinor;
346 WORD wSuiteMask;
347 BYTE wProductType;
348 BYTE wReserved;
349} OSVERSIONINFOEX;
350#endif // !defined(VER_NT_WORKSTATION)
351
352#ifndef _TrackMouseEvent
353 #define _TrackMouseEvent TrackMouseEvent
354#endif
355
356#ifndef LVM_SETEXTENDEDLISTVIEWSTYLE
357 #define LVM_SETEXTENDEDLISTVIEWSTYLE (0x1000 + 54)
358#endif
359
360#ifndef LVM_GETSUBITEMRECT
361 #define LVM_GETSUBITEMRECT (0x1000 + 56)
362#endif
363
364#ifndef LVCF_IMAGE
365 #define LVCF_IMAGE 0x0010
366#endif
367
368#ifndef Header_GetItemRect
369 #define Header_GetItemRect(w,i,r) \
370 (BOOL)SendMessage((w),HDM_GETITEMRECT,(WPARAM)(i),(LPARAM)(r))
371#endif
372
373#ifndef HDM_GETITEMRECT
374 #define HDM_GETITEMRECT (HDM_FIRST+7)
375#endif
376
377#ifndef ListView_GetHeader
378 #define ListView_GetHeader(w) (HWND)SendMessage((w),LVM_GETHEADER,0,0)
379#endif
380
381#ifndef ListView_GetSubItemRect
382 #define ListView_GetSubItemRect(w, i, s, c, p) (HWND)SendMessage(w,LVM_GETSUBITEMRECT,i, ((p) ? ((((LPRECT)(p))->top = s), (((LPRECT)(p))->left = c), (LPARAM)(p)) : (LPARAM)(LPRECT)NULL))
383#endif
384
385#ifndef LVM_GETHEADER
386 #define LVM_GETHEADER (LVM_FIRST+31)
387#endif
388
389#ifndef HDLAYOUT
390 #define HDLAYOUT HD_LAYOUT
391#endif
392
393#ifndef HDITEM
394 #define HDITEM HD_ITEM
395#endif
396
397#ifndef NMHEADER
398 #define NMHEADER HD_NOTIFY
399#endif
400
401#ifndef HDS_DRAGDROP
402 #define HDS_DRAGDROP 0x0040
403#endif
404#ifndef HDS_FULLDRAG
405 #define HDS_FULLDRAG 0x0080
406#endif
407
408
409#ifndef HDN_BEGINDRAG
410 #define HDN_BEGINDRAG (HDN_FIRST - 11)
411#endif
412
413#ifndef HDN_ENDDRAG
414 #define HDN_ENDDRAG (HDN_FIRST - 10)
415#endif
416
417#ifndef LVSICF_NOSCROLL
418 #define LVSICF_NOINVALIDATEALL 0x0001
419 #define LVSICF_NOSCROLL 0x0002
420#endif
421
422#ifndef CP_SYMBOL
423 #define CP_SYMBOL 42
424#endif
425
426// ----------------------------------------------------------------------------
427// wxDisplay
428// ----------------------------------------------------------------------------
429
430// The windows headers with Digital Mars lack some typedefs.
431// typedef them as my_XXX and then #define to rename to XXX in case
432// a newer version of Digital Mars fixes the headers
433// (or up to date PSDK is in use with older version)
434// also we use any required definition (MONITOR_DEFAULTTONULL) to recognize
435// whether whole missing block needs to be included
436
437#ifndef MONITOR_DEFAULTTONULL
438
439 #define HMONITOR_DECLARED
440 DECLARE_HANDLE(HMONITOR);
441 typedef BOOL(CALLBACK* my_MONITORENUMPROC)(HMONITOR,HDC,LPRECT,LPARAM);
442 #define MONITORENUMPROC my_MONITORENUMPROC
443 typedef struct my_tagMONITORINFO {
444 DWORD cbSize;
445 RECT rcMonitor;
446 RECT rcWork;
447 DWORD dwFlags;
448 } my_MONITORINFO,*my_LPMONITORINFO;
449 #define MONITORINFO my_MONITORINFO
450 #define LPMONITORINFO my_LPMONITORINFO
451
452 typedef struct my_MONITORINFOEX : public my_tagMONITORINFO
453 {
454 TCHAR szDevice[CCHDEVICENAME];
455 } my_MONITORINFOEX, *my_LPMONITORINFOEX;
456 #define MONITORINFOEX my_MONITORINFOEX
457 #define LPMONITORINFOEX my_LPMONITORINFOEX
458
459 #ifndef MONITOR_DEFAULTTONULL
460 #define MONITOR_DEFAULTTONULL 0
461 #endif // MONITOR_DEFAULTTONULL
462
463 #ifndef MONITORINFOF_PRIMARY
464 #define MONITORINFOF_PRIMARY 1
465 #endif // MONITORINFOF_PRIMARY
466
467 #ifndef DDENUM_ATTACHEDSECONDARYDEVICES
468 #define DDENUM_ATTACHEDSECONDARYDEVICES 1
469 #endif
470
471#endif // MONITOR_DEFAULTTONULL
472
473// ----------------------------------------------------------------------------
474// Tree control
475// ----------------------------------------------------------------------------
476
477#ifndef TVIS_FOCUSED
478 #define TVIS_FOCUSED 0x0001
479#endif
480
481#ifndef TVS_CHECKBOXES
482 #define TVS_CHECKBOXES 0x0100
483#endif
484
485#ifndef TVITEM
486 #define TVITEM TV_ITEM
487#endif
488
489#endif
490 // DMC++
491
492 /*
493 * The following are specifically required for OpenWatcom C++ (none at present)
494 */
495
496#if defined(__WATCOMC__)
497#endif
498
499 /*
500 * The following are specifically required for MinGW (none at present)
501 */
502
503#if defined (__MINGW32__)
504
505#if !wxCHECK_W32API_VERSION(3,1)
506
507#include <windows.h>
508#include "wx/msw/winundef.h"
509
510typedef struct
511{
512 RECT rgrc[3];
513 WINDOWPOS *lppos;
514} NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
515
516#endif
517
518#endif
519
520//Various defines that will be needed by mingw and possibly VC++6
521//Used by the webview library
522
523#ifndef DISPID_COMMANDSTATECHANGE
524#define DISPID_COMMANDSTATECHANGE 105
525#endif
526
527#ifndef DISPID_NAVIGATECOMPLETE2
528#define DISPID_NAVIGATECOMPLETE2 252
529#endif
530
531#ifndef DISPID_NAVIGATEERROR
532#define DISPID_NAVIGATEERROR 271
533#endif
534
535#ifndef DISPID_NEWWINDOW3
536#define DISPID_NEWWINDOW3 273
537#endif
538
539#ifndef INET_E_ERROR_FIRST
540#define INET_E_ERROR_FIRST 0x800C0002L
541#endif
542
543#ifndef INET_E_INVALID_URL
544#define INET_E_INVALID_URL 0x800C0002L
545#endif
546
547#ifndef INET_E_NO_SESSION
548#define INET_E_NO_SESSION 0x800C0003L
549#endif
550
551#ifndef INET_E_CANNOT_CONNECT
552#define INET_E_CANNOT_CONNECT 0x800C0004L
553#endif
554
555#ifndef INET_E_RESOURCE_NOT_FOUND
556#define INET_E_RESOURCE_NOT_FOUND 0x800C0005L
557#endif
558
559#ifndef INET_E_OBJECT_NOT_FOUND
560#define INET_E_OBJECT_NOT_FOUND 0x800C0006L
561#endif
562
563#ifndef INET_E_DATA_NOT_AVAILABLE
564#define INET_E_DATA_NOT_AVAILABLE 0x800C0007L
565#endif
566
567#ifndef INET_E_DOWNLOAD_FAILURE
568#define INET_E_DOWNLOAD_FAILURE 0x800C0008L
569#endif
570
571#ifndef INET_E_AUTHENTICATION_REQUIRED
572#define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L
573#endif
574
575#ifndef INET_E_NO_VALID_MEDIA
576#define INET_E_NO_VALID_MEDIA 0x800C000AL
577#endif
578
579#ifndef INET_E_CONNECTION_TIMEOUT
580#define INET_E_CONNECTION_TIMEOUT 0x800C000BL
581#endif
582
583#ifndef INET_E_INVALID_REQUEST
584#define INET_E_INVALID_REQUEST 0x800C000CL
585#endif
586
587#ifndef INET_E_UNKNOWN_PROTOCOL
588#define INET_E_UNKNOWN_PROTOCOL 0x800C000DL
589#endif
590
591#ifndef INET_E_SECURITY_PROBLEM
592#define INET_E_SECURITY_PROBLEM 0x800C000EL
593#endif
594
595#ifndef INET_E_CANNOT_LOAD_DATA
596#define INET_E_CANNOT_LOAD_DATA 0x800C000FL
597#endif
598
599#ifndef INET_E_CANNOT_INSTANTIATE_OBJECT
600#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
601#endif
602
603#ifndef INET_E_QUERYOPTION_UNKNOWN
604#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
605#endif
606
607#ifndef INET_E_REDIRECT_FAILED
608#define INET_E_REDIRECT_FAILED 0x800C0014L
609#endif
610
611#ifndef INET_E_REDIRECT_TO_DIR
612#define INET_E_REDIRECT_TO_DIR 0x800C0015L
613#endif
614
615#ifndef INET_E_CANNOT_LOCK_REQUEST
616#define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
617#endif
618
619#ifndef INET_E_USE_EXTEND_BINDING
620#define INET_E_USE_EXTEND_BINDING 0x800C0017L
621#endif
622
623#ifndef INET_E_TERMINATED_BIND
624#define INET_E_TERMINATED_BIND 0x800C0018L
625#endif
626
627#ifndef INET_E_INVALID_CERTIFICATE
628#define INET_E_INVALID_CERTIFICATE 0x800C0019L
629#endif
630
631#ifndef INET_E_CODE_DOWNLOAD_DECLINED
632#define INET_E_CODE_DOWNLOAD_DECLINED 0x800C0100L
633#endif
634
635#ifndef INET_E_RESULT_DISPATCHED
636#define INET_E_RESULT_DISPATCHED 0x800C0200L
637#endif
638
639#ifndef INET_E_CANNOT_REPLACE_SFP_FILE
640#define INET_E_CANNOT_REPLACE_SFP_FILE 0x800C0300L
641#endif
642
643#ifndef INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY
644#define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY 0x800C0500L
645#endif
646
647#ifndef INET_E_CODE_INSTALL_SUPPRESSED
648#define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L
649#endif
650
651//We need to check if we are using MinGW or mingw-w64 as their
652//definitions are different
653
654#ifdef __MINGW32__
655#include <_mingw.h>
656#endif
657
658#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
659typedef enum CommandStateChangeConstants {
660 CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
661 CSC_NAVIGATEFORWARD = 0x1,
662 CSC_NAVIGATEBACK = 0x2
663} CommandStateChangeConstants;
664#endif
665
666 /*
667 * In addition to the declarations for VC++, the following are required for WinCE
668 */
669
670#ifdef __WXWINCE__
671 #include "wx/msw/wince/missing.h"
672#endif
673
674 /*
675 * The following are specifically required for Wine
676 */
677
678#ifdef __WINE__
679 #ifndef ENUM_CURRENT_SETTINGS
680 #define ENUM_CURRENT_SETTINGS ((DWORD)-1)
681 #endif
682 #ifndef BROADCAST_QUERY_DENY
683 #define BROADCAST_QUERY_DENY 1112363332
684 #endif
685#endif // defined __WINE__
686
687#ifndef INVALID_FILE_ATTRIBUTES
688 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
689#endif
690
691#endif
692 // _WX_MISSING_H_