X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32c1cda24418c225fa2cff4b1416f7a3d62c88b1..d4c241b9e6b05a6a2ca5b701d25792994a52c023:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 889b6d7f67..ea234b7964 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -20,6 +20,7 @@ #include "wx/msw/winundef.h" class WXDLLEXPORT wxFont; +class WXDLLEXPORT wxWindow; // --------------------------------------------------------------------------- // private constants @@ -76,8 +77,12 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; typedef int (pascal * WndProcCast) (); # define CASTWNDPROC (WndProcCast) # else - typedef int (PASCAL * WndProcCast) (); -# define CASTWNDPROC (WndProcCast) +# if defined(__VISUALC__) && defined(STRICT) +# define CASTWNDPROC (WNDPROC) +# else + typedef int (PASCAL * WndProcCast) (); +# define CASTWNDPROC (WndProcCast) +# endif # endif # else # define CASTWNDPROC @@ -104,8 +109,10 @@ WXDLLEXPORT_DATA(extern HFONT) wxSTATUS_LINE_FONT; #endif #if !defined(__WIN32__) // 3.x uses FARPROC for dialogs +#ifndef STRICT #define DLGPROC FARPROC #endif +#endif #if wxUSE_PENWIN WXDLLEXPORT void wxRegisterPenWin(); @@ -200,20 +207,27 @@ extern LONG APIENTRY _EXPORT // --------------------------------------------------------------------------- // macros to make casting between WXFOO and FOO a bit easier: the GetFoo() -// returns Foo cast to the Windows type for oruselves, while GetFoosFoo() takes -// an argument which should be a pointer to wxFoo (is this really clear?) +// returns Foo cast to the Windows type for oruselves, while GetFooOf() takes +// an argument which should be a pointer or reference to the object of the +// corresponding class (this depends on the macro) // --------------------------------------------------------------------------- #define GetHwnd() ((HWND)GetHWND()) -#define GetWinHwnd(win) ((HWND)((win)->GetHWND())) +#define GetHwndOf(win) ((HWND)((win)->GetHWND())) +// old name +#define GetWinHwnd GetHwndOf #define GetHdc() ((HDC)GetHDC()) +#define GetHdcOf(dc) ((HDC)(dc).GetHDC()) #define GetHicon() ((HICON)GetHICON()) -#define GetIconHicon(icon) ((HICON)(icon).GetHICON()) +#define GetHiconOf(icon) ((HICON)(icon).GetHICON()) #define GetHaccel() ((HACCEL)GetHACCEL()) -#define GetTableHaccel(table) ((HACCEL)((table).GetHACCEL())) +#define GetHaccelOf(table) ((HACCEL)((table).GetHACCEL())) + +#define GetHmenu() ((HMENU)GetHMenu()) +#define GetHmenuOf(menu) ((HMENU)menu->GetHMenu()) // --------------------------------------------------------------------------- // global data