get rid of CE-specific code for class name registration, the unique instance enforcement should be implemented by using wxSingleInstanceChecked if it's really necessary

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-11-29 14:59:21 +00:00
parent 0e2ad3233b
commit d2fa187325

View File

@@ -116,15 +116,8 @@
extern void wxSetKeyboardHook(bool doIt);
#endif
// NB: all "NoRedraw" classes must have the same names as the "normal" classes
// with NR suffix - wxWindow::MSWCreate() supposes this
#ifdef __WXWINCE__
WXDLLIMPEXP_CORE wxChar *wxCanvasClassName;
WXDLLIMPEXP_CORE wxChar *wxCanvasClassNameNR;
#else
WXDLLIMPEXP_CORE const wxChar *wxCanvasClassName = NULL;
WXDLLIMPEXP_CORE const wxChar *wxCanvasClassNameNR = NULL;
#endif
WXDLLIMPEXP_CORE const wxChar *wxMDIFrameClassName = NULL;
WXDLLIMPEXP_CORE const wxChar *wxMDIFrameClassNameNoRedraw = NULL;
WXDLLIMPEXP_CORE const wxChar *wxMDIChildFrameClassName = NULL;
@@ -611,20 +604,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
// ensure that base cleanup is done if we return too early
wxCallBaseCleanup callBaseCleanup(this);
#ifdef __WXWINCE__
wxString tmp = GetAppName();
tmp += wxT("ClassName");
wxCanvasClassName = wxStrdup( tmp.wc_str() );
tmp += wxT("NR");
wxCanvasClassNameNR = wxStrdup( tmp.wc_str() );
HWND hWnd = FindWindow( wxCanvasClassNameNR, NULL );
if (hWnd)
{
SetForegroundWindow( (HWND)(((DWORD)hWnd)|0x01) );
return false;
}
#endif
#if !defined(__WXMICROWIN__)
InitCommonControls();
#endif // !defined(__WXMICROWIN__)
@@ -811,11 +790,6 @@ void wxApp::CleanUp()
// which case the registration will fail after the first time if we don't
// unregister the classes now
UnregisterWindowClasses();
#ifdef __WXWINCE__
free( wxCanvasClassName );
free( wxCanvasClassNameNR );
#endif
}
// ----------------------------------------------------------------------------