X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e373f51b6c2a9a43436e24b690c18f334e0605e6..26ac40202f84fd07c9f24885b4d36b34b9468f4d:/src/msw/radiobox.cpp?ds=sidebyside diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 6ce66a88ea..eff9d9a74b 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -54,17 +54,20 @@ #endif // Win32/16 // wnd proc for radio buttons +#ifdef __WIN32__ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +#endif // --------------------------------------------------------------------------- // global vars // --------------------------------------------------------------------------- // the pointer to standard radio button wnd proc -static WNDPROC s_wndprocRadioBtn = (WNDPROC)NULL; +// static WNDPROC s_wndprocRadioBtn = (WNDPROC)NULL; +static WXFARPROC s_wndprocRadioBtn = (WXFARPROC)NULL; // =========================================================================== // implementation @@ -704,16 +707,22 @@ void wxRadioBox::SubclassRadioButton(WXHWND hWndBtn) HWND hwndBtn = (HWND)hWndBtn; if ( !s_wndprocRadioBtn ) - s_wndprocRadioBtn = (WNDPROC)::GetWindowLong(hwndBtn, GWL_WNDPROC); + s_wndprocRadioBtn = (WXFARPROC)::GetWindowLong(hwndBtn, GWL_WNDPROC); +// s_wndprocRadioBtn = (WNDPROC)::GetWindowLong(hwndBtn, GWL_WNDPROC); + // No GWL_USERDATA in Win16, so omit this subclassing. +#ifdef __WIN32__ ::SetWindowLong(hwndBtn, GWL_WNDPROC, (long)wxRadioBtnWndProc); ::SetWindowLong(hwndBtn, GWL_USERDATA, (long)this); +#endif } // --------------------------------------------------------------------------- // window proc for radio buttons // --------------------------------------------------------------------------- +#ifdef __WIN32__ + LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, UINT msg, WPARAM wParam, @@ -773,8 +782,9 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd, } if ( !processed ) - return ::CallWindowProc(s_wndprocRadioBtn, hwnd, msg, wParam, lParam); + return ::CallWindowProc(CASTWNDPROC s_wndprocRadioBtn, hwnd, msg, wParam, lParam); else return 0; } +#endif