#include "wx/log.h"
-class WXDLLEXPORT wxFont;
-class WXDLLEXPORT wxWindow;
-class WXDLLEXPORT wxWindowBase;
+class WXDLLIMPEXP_FWD_CORE wxFont;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxWindowBase;
// ---------------------------------------------------------------------------
// private constants
#include "wx/gdicmn.h"
#include "wx/colour.h"
+#include "wx/msw/dc.h"
+#include "wx/msw/dcclient.h"
+#include "wx/msw/dcmemory.h"
+
+
// make conversion from wxColour and COLORREF a bit less painful
inline COLORREF wxColourToRGB(const wxColour& c)
{
#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
#endif // GET_X_LPARAM
-// get the current state of SHIFT/CTRL keys
-inline bool wxIsShiftDown()
+// get the current state of SHIFT/CTRL/ALT keys
+inline bool wxIsModifierDown(int vk)
{
-// return (::GetKeyState(VK_SHIFT) & 0x100) != 0;
- // Returns different negative values on WinME and WinNT,
+ // GetKeyState() returns different negative values on WinME and WinNT,
// so simply test for negative value.
- return ::GetKeyState(VK_SHIFT) < 0;
+ return ::GetKeyState(vk) < 0;
+}
+
+inline bool wxIsShiftDown()
+{
+ return wxIsModifierDown(VK_SHIFT);
}
inline bool wxIsCtrlDown()
{
-// return (::GetKeyState(VK_CONTROL) & 0x100) != 0;
- // Returns different negative values on WinME and WinNT,
- // so simply test for negative value.
- return ::GetKeyState(VK_CONTROL) < 0;
+ return wxIsModifierDown(VK_CONTROL);
+}
+
+inline bool wxIsAltDown()
+{
+ return wxIsModifierDown(VK_MENU);
+}
+
+inline bool wxIsAnyModifierDown()
+{
+ return wxIsShiftDown() || wxIsCtrlDown() || wxIsAltDown();
}
// wrapper around GetWindowRect() and GetClientRect() APIs doing error checking
// get the window id (should be unsigned, hence this is not wxWindowID which
// is, for mainly historical reasons, signed)
-extern WXDLLEXPORT WXWORD wxGetWindowId(WXHWND hWnd);
+extern WXDLLEXPORT int wxGetWindowId(WXHWND hWnd);
// check if hWnd's WNDPROC is wndProc. Return true if yes, false if they are
// different