+ ERRORID vError = 0L;
+ wxString sError;
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxFrameClassName
+ ,wxFrameWndProc
+ ,CS_SIZEREDRAW | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxFrameClassNameNoRedraw
+ ,wxWndProc
+ ,0
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxMDIFrameClassName
+ ,wxWndProc
+ ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxMDIFrameClassNameNoRedraw
+ ,wxWndProc
+ ,0
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxMDIChildFrameClassName
+ ,wxWndProc
+ ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_SYNCPAINT | CS_HITTEST
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxMDIChildFrameClassNameNoRedraw
+ ,wxWndProc
+ ,CS_HITTEST
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxPanelClassName
+ ,wxWndProc
+ ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxCanvasClassName
+ ,wxWndProc
+ ,CS_SIZEREDRAW | CS_HITTEST | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+ if (!::WinRegisterClass( vHab
+ ,(PSZ)wxCanvasClassNameNR
+ ,wxWndProc
+ ,CS_HITTEST | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError.c_str());
+ return false;
+ }
+ return true;
+} // end of wxApp::RegisterWindowClasses
+
+//
+// Cleans up any wxWidgets internal structures left lying around
+//
+void wxApp::CleanUp()