+// get the current state of SHIFT/CTRL keys
+inline bool wxIsShiftDown()
+{
+ return (::GetKeyState(VK_SHIFT) & 0x100) != 0;
+}
+
+inline bool wxIsCtrlDown()
+{
+ return (::GetKeyState(VK_CONTROL) & 0x100) != 0;
+}
+
+// wrapper around GetWindowRect() and GetClientRect() APIs doing error checking
+// for Win32
+inline RECT wxGetWindowRect(HWND hwnd)
+{
+ RECT rect;
+#ifdef __WIN16__
+ ::GetWindowRect(hwnd, &rect);
+#else // Win32
+ if ( !::GetWindowRect(hwnd, &rect) )
+ {
+ wxLogLastError(_T("GetWindowRect"));
+ }
+#endif // Win16/32
+
+ return rect;
+}
+
+inline RECT wxGetClientRect(HWND hwnd)
+{
+ RECT rect;
+#ifdef __WIN16__
+ ::GetClientRect(hwnd, &rect);
+#else // Win32
+ if ( !::GetClientRect(hwnd, &rect) )
+ {
+ wxLogLastError(_T("GetClientRect"));
+ }
+#endif // Win16/32
+
+ return rect;
+}
+