X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8614c467553e7dd8a5b9984683d73c89730b8ead..794bcc2dea743ac907b839f54e451847c9ea4b72:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 51e044b022..c23c715266 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) @@ -226,6 +229,15 @@ inline void wxRGBToColour(wxColour& c, COLORREF rgb) c.Set(GetRValue(rgb), GetGValue(rgb), GetBValue(rgb)); } +// copy Windows RECT to our wxRect +inline void wxCopyRECTToRect(const RECT& r, wxRect& rect) +{ + rect.y = r.top; + rect.x = r.left; + rect.width = r.right - r.left; + rect.height = r.bottom - r.top; +} + // translations between HIMETRIC units (which OLE likes) and pixels (which are // liked by all the others) - implemented in msw/utilsexc.cpp extern void HIMETRICToPixel(LONG *x, LONG *y);