+ wxModule::RegisterModules();
+ if (!wxModule::InitializeModules())
+ return FALSE;
+ return TRUE;
+} // end of wxApp::Initialize
+
+const char* CANTREGISTERCLASS = " Can't register Class ";
+// ---------------------------------------------------------------------------
+// RegisterWindowClasses
+// ---------------------------------------------------------------------------
+
+bool wxApp::RegisterWindowClasses(
+ HAB vHab
+)
+{
+ APIRET rc;
+ ERRORID vError = 0L;
+ wxString sError;
+
+ if (!::WinRegisterClass( vHab
+ ,wxFrameClassName
+ ,wxFrameWndProc
+ ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT | CS_CLIPCHILDREN
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxFrameClassNameNoRedraw
+ ,wxWndProc
+ ,0
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIFrameClassName
+ ,wxWndProc
+ ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIFrameClassNameNoRedraw
+ ,wxWndProc
+ ,0
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIChildFrameClassName
+ ,wxWndProc
+ ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_SYNCPAINT | CS_HITTEST
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIChildFrameClassNameNoRedraw
+ ,wxWndProc
+ ,CS_HITTEST
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxPanelClassName
+ ,wxWndProc
+ ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxCanvasClassName
+ ,wxWndProc
+ ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT | CS_CLIPCHILDREN
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+ return TRUE;
+} // end of wxApp::RegisterWindowClasses
+
+//
+// Cleans up any wxWindows internal structures left lying around
+//