Switched wxCheckWindowWndProc to always use the window class name for
comparisons. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1092,18 +1092,17 @@ void wxWindowMSW::DissociateHandle()
|
|||||||
bool wxCheckWindowWndProc(WXHWND hWnd,
|
bool wxCheckWindowWndProc(WXHWND hWnd,
|
||||||
WXFARPROC WXUNUSED_IN_WINCE(wndProc))
|
WXFARPROC WXUNUSED_IN_WINCE(wndProc))
|
||||||
{
|
{
|
||||||
// Unicows note: the code below works, but only because WNDCLASS contains
|
// TODO: This list of window class names should be factored out so they can be
|
||||||
// original window handler rather that the unicows fake one. This may not
|
// managed in one place and then accessed from here and other places, such as
|
||||||
// be on purpose, though; if it stops working with future versions of
|
// wxApp::RegisterWindowClasses() and wxApp::UnregisterWindowClasses()
|
||||||
// unicows.dll, we can override unicows hooks by setting
|
|
||||||
// Unicows_{Set,Get}WindowLong and Unicows_RegisterClass to our own
|
#ifdef __WXWINCE__
|
||||||
// versions that keep track of fake<->real wnd proc mapping.
|
|
||||||
|
|
||||||
// On WinCE (at least), the wndproc comparison doesn't work,
|
|
||||||
// so have to use something like this.
|
|
||||||
#ifdef __WXWINCE__
|
|
||||||
extern wxChar *wxCanvasClassName;
|
extern wxChar *wxCanvasClassName;
|
||||||
extern wxChar *wxCanvasClassNameNR;
|
extern wxChar *wxCanvasClassNameNR;
|
||||||
|
#else
|
||||||
|
extern const wxChar *wxCanvasClassName;
|
||||||
|
extern const wxChar *wxCanvasClassNameNR;
|
||||||
|
#endif
|
||||||
extern const wxChar *wxMDIFrameClassName;
|
extern const wxChar *wxMDIFrameClassName;
|
||||||
extern const wxChar *wxMDIFrameClassNameNoRedraw;
|
extern const wxChar *wxMDIFrameClassNameNoRedraw;
|
||||||
extern const wxChar *wxMDIChildFrameClassName;
|
extern const wxChar *wxMDIChildFrameClassName;
|
||||||
@@ -1117,19 +1116,8 @@ bool wxCheckWindowWndProc(WXHWND hWnd,
|
|||||||
str == wxMDIChildFrameClassNameNoRedraw ||
|
str == wxMDIChildFrameClassNameNoRedraw ||
|
||||||
str == _T("wxTLWHiddenParent"))
|
str == _T("wxTLWHiddenParent"))
|
||||||
return true; // Effectively means don't subclass
|
return true; // Effectively means don't subclass
|
||||||
|
else
|
||||||
return false;
|
|
||||||
#else
|
|
||||||
WNDCLASS cls;
|
|
||||||
if ( !::GetClassInfo(wxGetInstance(), wxGetWindowClass(hWnd), &cls) )
|
|
||||||
{
|
|
||||||
wxLogLastError(_T("GetClassInfo"));
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
return wndProc == (WXFARPROC)cls.lpfnWndProc;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user