X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed7919869508ccd5c868683c28706f82e82a1b9b..40bd6154f1476dbe598c60b4760bbf2fe0d9ab0f:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 15d89886ce..2a27a0287d 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -67,15 +67,18 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; // this defines a CASTWNDPROC macro which casts a pointer to the type of a // window proc -#if defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS) +#ifdef __GNUWIN32_OLD__ # define CASTWNDPROC (long unsigned) #else # ifdef __BORLANDC__ # ifdef __WIN32__ +#if __BORLANDC__ > 0x530 + typedef long (__stdcall * WndProcCast)( HWND__*, unsigned int, unsigned int, long) ; +#else typedef int (pascal * WndProcCast) (); +#endif # define CASTWNDPROC (WndProcCast) -// # define CASTWNDPROC # else typedef int (pascal * WndProcCast) (); # define CASTWNDPROC (WndProcCast) @@ -253,6 +256,17 @@ extern HBITMAP wxInvertMask(HBITMAP hbmpMask, int w = 0, int h = 0); #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) #endif // GET_X_LPARAM +// 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; +} + // --------------------------------------------------------------------------- // small helper classes // --------------------------------------------------------------------------- @@ -297,6 +311,9 @@ private: #define GetHmenu() ((HMENU)GetHMenu()) #define GetHmenuOf(menu) ((HMENU)menu->GetHMenu()) +#define GetHcursor() ((HCURSOR)GetHCURSOR()) +#define GetHcursorOf(cursor) ((HCURSOR)(cursor).GetHCURSOR()) + // --------------------------------------------------------------------------- // global data // --------------------------------------------------------------------------- @@ -323,6 +340,10 @@ WXDLLEXPORT void wxSetInstance(HINSTANCE hInst); #if wxUSE_GUI +// cursor stuff +extern HCURSOR wxGetCurrentBusyCursor(); // from msw/utils.cpp +extern const wxCursor *wxGetGlobalCursor(); // from msw/cursor.cpp + WXDLLEXPORT wxWindow* wxFindWinFromHandle(WXHWND hWnd); WXDLLEXPORT void wxGetCharSize(WXHWND wnd, int *x, int *y, const wxFont *the_font);