typedef WX_NSView WXWidget; /* wxWindows BASE definition */
#endif /* __WXCOCOA__ */
-#if defined(__WXMSW__) || defined(__WXPM__)
+#ifdef __WXMSW__
/* the keywords needed for WinMain() declaration */
#ifdef __WIN16__
# endif
#endif /* Win16/32 */
-/* Stand-ins for Windows types or OS/2, to avoid #including all of windows.h or os2.h */
+/* Stand-ins for Windows types to avoid #including all of windows.h */
typedef void * WXHWND;
typedef void * WXHANDLE;
typedef void * WXHICON;
typedef WXHWND WXWidget;
-#endif /* MSW or OS2 */
-
-
-#ifdef __WXMSW__
-
#ifdef __WIN64__
typedef unsigned __int64 WXWPARAM;
typedef __int64 WXLPARAM;
#if defined(__WXPM__) || defined(__EMX__)
+#ifdef __WXPM__
+/* Stand-ins for OS/2 types, to avoid #including all of os2.h */
+typedef unsigned long WXHWND;
+typedef unsigned long WXHANDLE;
+typedef unsigned long WXHICON;
+typedef unsigned long WXHFONT;
+typedef unsigned long WXHMENU;
+typedef unsigned long WXHPEN;
+typedef unsigned long WXHBRUSH;
+typedef unsigned long WXHPALETTE;
+typedef unsigned long WXHCURSOR;
+typedef unsigned long WXHRGN;
+typedef unsigned long WXHACCEL;
+typedef unsigned long WXHBITMAP;
+typedef unsigned long WXHDC;
+typedef unsigned int WXUINT;
+typedef unsigned long WXDWORD;
+typedef unsigned short WXWORD;
+
+typedef unsigned long WXCOLORREF;
+typedef void * WXMSG;
+typedef unsigned long WXHTREEITEM;
+
+typedef void * WXDRAWITEMSTRUCT;
+typedef void * WXMEASUREITEMSTRUCT;
+typedef void * WXLPCREATESTRUCT;
+
+typedef WXHWND WXWidget;
+#endif
#ifdef __EMX__
/* Need a well-known type for WXFARPROC
below. MPARAM is typedef'ed too late. */
/* VA 3.0 for some reason needs base data types when typedefing a proc proto??? */
typedef void* (_System *WXFARPROC)(unsigned long, unsigned long, void*, void*);
#else
-#ifdef __EMX__
+#if defined(__EMX__) && !defined(_System)
#define _System
#endif
typedef WXRESULT (_System *WXFARPROC)(WXHWND, WXMSGID, WXWPARAM, WXLPARAM);