+// ---------------------------------------------------------------------------
+// macros to make casting between WXFOO and FOO a bit easier: the GetFoo()
+// returns Foo cast to the Windows type for oruselves, while GetFoosFoo() takes
+// an argument which should be a pointer to wxFoo (is this really clear?)
+// ---------------------------------------------------------------------------
+
+#define GetHwnd() ((HWND)GetHWND())
+#define GetWinHwnd(win) ((HWND)((win)->GetHWND()))
+
+#define GetHdc() ((HDC)GetHDC())
+
+#define GetHicon() ((HICON)GetHICON())
+#define GetIconHicon(icon) ((HICON)(icon).GetHICON())
+
+#define GetHaccel() ((HACCEL)GetHACCEL())
+#define GetTableHaccel(table) ((HACCEL)((table).GetHACCEL()))
+
+// ---------------------------------------------------------------------------
+// global data
+// ---------------------------------------------------------------------------
+
+// The MakeProcInstance version of the function wxSubclassedGenericControlProc
+WXDLLEXPORT_DATA(extern FARPROC) wxGenericControlSubClassProc;
+WXDLLEXPORT_DATA(extern wxChar*) wxBuffer;
+WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance;
+
+// ---------------------------------------------------------------------------
+// global functions
+// ---------------------------------------------------------------------------
+
+WXDLLEXPORT HINSTANCE wxGetInstance();
+WXDLLEXPORT void wxSetInstance(HINSTANCE hInst);
+
+WXDLLEXPORT wxWindow* wxFindWinFromHandle(WXHWND hWnd);
+
+WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font);
+WXDLLEXPORT void wxFillLogFont(LOGFONT *logFont, wxFont *font);
+WXDLLEXPORT wxFont wxCreateFontFromLogFont(LOGFONT *logFont);
+
+WXDLLEXPORT void wxSliderEvent(WXHWND control, WXWORD wParam, WXWORD pos);
+WXDLLEXPORT void wxScrollBarEvent(WXHWND hbar, WXWORD wParam, WXWORD pos);
+
+// Find maximum size of window/rectangle
+WXDLLEXPORT extern void wxFindMaxSize(WXHWND hwnd, RECT *rect);
+
+WXDLLEXPORT wxWindow* wxFindControlFromHandle(WXHWND hWnd);
+WXDLLEXPORT void wxAddControlHandle(WXHWND hWnd, wxWindow *item);
+
+// Safely get the window text (i.e. without using fixed size buffer)
+WXDLLEXPORT extern wxString wxGetWindowText(WXHWND hWnd);
+
+// get the window class name
+WXDLLEXPORT extern wxString wxGetWindowClass(WXHWND hWnd);
+
+// get the window id (should be unsigned, hence this is not wxWindowID which
+// is, for mainly historical reasons, signed)
+WXDLLEXPORT extern WXWORD wxGetWindowId(WXHWND hWnd);
+
+// Does this window style specify any border?
+inline bool wxStyleHasBorder(long style)
+{
+ return (style & (wxSIMPLE_BORDER | wxRAISED_BORDER |
+ wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0;
+}
+