-#include <ddraw.h>
-
-// we don't want to link with ddraw.lib which contains the real
-// IID_IDirectDraw2 definition
-const GUID wxIID_IDirectDraw2 =
- { 0xB3A6F3E0, 0x2B43, 0x11CF, { 0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 } };
-
-// ----------------------------------------------------------------------------
-// macros
-// ----------------------------------------------------------------------------
-
-#ifdef _UNICODE
- #define WINFUNC(x) _T(#x) L"W"
+#include "wx/dynload.h"
+#include "wx/sysopt.h"
+
+#include "wx/display_impl.h"
+#include "wx/msw/wrapwin.h"
+#include "wx/msw/missing.h"
+#include "wx/msw/private.h"
+
+#ifndef __WXWINCE__
+ // Older versions of windef.h don't define HMONITOR. Unfortunately, we
+ // can't directly test whether HMONITOR is defined or not in windef.h as
+ // it's not a macro but a typedef, so we test for an unrelated symbol which
+ // is only defined in winuser.h if WINVER >= 0x0500
+ #if !defined(HMONITOR_DECLARED) && !defined(MNS_NOCHECK)
+ DECLARE_HANDLE(HMONITOR);
+ typedef BOOL(CALLBACK * MONITORENUMPROC )(HMONITOR, HDC, LPRECT, LPARAM);
+ typedef struct tagMONITORINFO
+ {
+ DWORD cbSize;
+ RECT rcMonitor;
+ RECT rcWork;
+ DWORD dwFlags;
+ } MONITORINFO, *LPMONITORINFO;
+ typedef struct tagMONITORINFOEX : public tagMONITORINFO
+ {
+ TCHAR szDevice[CCHDEVICENAME];
+ } MONITORINFOEX, *LPMONITORINFOEX;
+ #define MONITOR_DEFAULTTONULL 0x00000000
+ #define MONITOR_DEFAULTTOPRIMARY 0x00000001
+ #define MONITOR_DEFAULTTONEAREST 0x00000002
+ #define MONITORINFOF_PRIMARY 0x00000001
+ #define HMONITOR_DECLARED
+ #endif
+#endif // !__WXWINCE__
+
+// display functions are found in different DLLs under WinCE and normal Win32
+#ifdef __WXWINCE__
+static const wxChar displayDllName[] = wxT("coredll.dll");