+// functions dynamically bound by wxDisplayFactoryWin32Base::Initialize()
+static MonitorFromPoint_t gs_MonitorFromPoint = NULL;
+static MonitorFromWindow_t gs_MonitorFromWindow = NULL;
+static GetMonitorInfo_t gs_GetMonitorInfo = NULL;
+
+class wxDisplayFactoryWin32Base : public wxDisplayFactory
+{
+public:
+ virtual ~wxDisplayFactoryWin32Base();
+
+ bool IsOk() const { return !m_displays.empty(); }
+
+ virtual unsigned GetCount() { return unsigned(m_displays.size()); }
+ virtual int GetFromPoint(const wxPoint& pt);
+ virtual int GetFromWindow(const wxWindow *window);
+
+protected:
+ // ctor checks if the current system supports multimon API and dynamically
+ // bind the functions we need if this is the case and sets
+ // ms_supportsMultimon if they're available
+ wxDisplayFactoryWin32Base();
+
+ // delete all m_displays elements: can be called from the derived class
+ // dtor if it is important to do this before destroying it,
+ // otherwise will be done by our dtor
+ void Clear();
+
+ // find the monitor corresponding to the given handle, return wxNOT_FOUND
+ // if not found
+ int FindDisplayFromHMONITOR(HMONITOR hmon) const;
+
+
+ // flag indicating whether gs_MonitorXXX functions are available
+ static int ms_supportsMultimon;
+
+ // the array containing information about all available displays, should be
+ // filled by the derived class ctors
+ wxDisplayInfoArray m_displays;
+
+
+ wxDECLARE_NO_COPY_CLASS(wxDisplayFactoryWin32Base);
+};