+extern WXDLLIMPEXP_CORE wxSize wxGetHiconSize(HICON hicon);
+
+// Lines are drawn differently for WinCE and regular WIN32
+WXDLLIMPEXP_CORE void wxDrawLine(HDC hdc, int x1, int y1, int x2, int y2);
+
+// fill the client rect of the given window on the provided dc using this brush
+inline void wxFillRect(HWND hwnd, HDC hdc, HBRUSH hbr)
+{
+ RECT rc;
+ ::GetClientRect(hwnd, &rc);
+ ::FillRect(hdc, &rc, hbr);
+}
+
+// ----------------------------------------------------------------------------
+// 32/64 bit helpers
+// ----------------------------------------------------------------------------
+
+#ifdef __WIN64__
+
+inline void *wxGetWindowProc(HWND hwnd)
+{
+ return (void *)::GetWindowLongPtr(hwnd, GWLP_WNDPROC);
+}
+
+inline void *wxGetWindowUserData(HWND hwnd)
+{
+ return (void *)::GetWindowLongPtr(hwnd, GWLP_USERDATA);
+}
+
+inline WNDPROC wxSetWindowProc(HWND hwnd, WNDPROC func)
+{
+ return (WNDPROC)::SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)func);
+}
+
+inline void *wxSetWindowUserData(HWND hwnd, void *data)
+{
+ return (void *)::SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data);
+}
+
+#else // __WIN32__
+
+// note that the casts to LONG_PTR here are required even on 32-bit machines
+// for the 64-bit warning mode of later versions of MSVC (C4311/4312)
+inline WNDPROC wxGetWindowProc(HWND hwnd)
+{
+ return (WNDPROC)(LONG_PTR)::GetWindowLong(hwnd, GWL_WNDPROC);
+}
+
+inline void *wxGetWindowUserData(HWND hwnd)
+{
+ return (void *)(LONG_PTR)::GetWindowLong(hwnd, GWL_USERDATA);
+}
+
+inline WNDPROC wxSetWindowProc(HWND hwnd, WNDPROC func)
+{
+ return (WNDPROC)(LONG_PTR)::SetWindowLong(hwnd, GWL_WNDPROC, (LONG_PTR)func);
+}
+
+inline void *wxSetWindowUserData(HWND hwnd, void *data)
+{
+ return (void *)(LONG_PTR)::SetWindowLong(hwnd, GWL_USERDATA, (LONG_PTR)data);
+}
+
+#endif // __WIN64__/__WIN32__