-#ifdef __WXWINCE__
- extern wxChar *wxCanvasClassName;
- extern wxChar *wxCanvasClassNameNR;
-#else
- extern const wxChar *wxCanvasClassName;
- extern const wxChar *wxCanvasClassNameNR;
-#endif
- extern const wxChar *wxMDIFrameClassName;
- extern const wxChar *wxMDIFrameClassNameNoRedraw;
- extern const wxChar *wxMDIChildFrameClassName;
- extern const wxChar *wxMDIChildFrameClassNameNoRedraw;
- wxString str(wxGetWindowClass(hWnd));
- if (str == wxCanvasClassName ||
- str == wxCanvasClassNameNR ||
-#if wxUSE_GLCANVAS
- str == _T("wxGLCanvasClass") ||
- str == _T("wxGLCanvasClassNR") ||
-#endif // wxUSE_GLCANVAS
- str == wxMDIFrameClassName ||
- str == wxMDIFrameClassNameNoRedraw ||
- str == wxMDIChildFrameClassName ||
- str == wxMDIChildFrameClassNameNoRedraw ||
- str == _T("wxTLWHiddenParent"))
- return true; // Effectively means don't subclass
- else
- return false;
+ // TODO: get rid of wxTLWHiddenParent special case (currently it's not
+ // registered by wxApp but using ad hoc code in msw/toplevel.cpp);
+ // there is also a hidden window class used by sockets &c
+ return wxApp::IsRegisteredClassName(str) || str == wxT("wxTLWHiddenParent");