// note that the casts to LONG_PTR here are required even on 32-bit machines
// for the 64-bit warning mode of later versions of MSVC (C4311/4312)
-inline void *wxGetWindowProc(HWND hwnd)
+inline WNDPROC wxGetWindowProc(HWND hwnd)
{
- return (void *)(LONG_PTR)::GetWindowLong(hwnd, GWL_WNDPROC);
+ return (WNDPROC)(LONG_PTR)::GetWindowLong(hwnd, GWL_WNDPROC);
}
inline void *wxGetWindowUserData(HWND hwnd)
// functions prototypes
// ----------------------------------------------------------------------------
-LRESULT APIENTRY wxFindReplaceWindowProc(HWND hwnd, WXUINT nMsg,
- WPARAM wParam, LPARAM lParam);
+LRESULT CALLBACK wxFindReplaceWindowProc(HWND hwnd, WXUINT nMsg,
+ WPARAM wParam, LPARAM lParam);
UINT_PTR CALLBACK wxFindReplaceDialogHookProc(HWND hwnd,
UINT uiMsg,
// check that we don't subclass the parent twice: this would be a bad idea
// as then we'd have infinite recursion in wxFindReplaceWindowProc
- wxCHECK_RET( wxGetWindowProc(hwnd) != (void *)wxFindReplaceWindowProc,
+ wxCHECK_RET( wxGetWindowProc(hwnd) != &wxFindReplaceWindowProc,
_T("can't have more than one find dialog currently") );
// set the new one and save the old as user data to allow access to it
// Window Proc for handling RegisterWindowMessage(FINDMSGSTRING)
// ----------------------------------------------------------------------------
-LRESULT APIENTRY wxFindReplaceWindowProc(HWND hwnd, WXUINT nMsg,
+LRESULT CALLBACK wxFindReplaceWindowProc(HWND hwnd, WXUINT nMsg,
WPARAM wParam, LPARAM lParam)
{
#if wxUSE_UNICODE_MSLU