+bool wxApp::RegisterWindowClasses(
+ HAB vHab
+)
+{
+ APIRET rc;
+ ERRORID vError = 0L;
+ wxString sError;
+
+ if (!::WinRegisterClass( vHab
+ ,wxFrameClassName
+ ,NULL
+ ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT
+ ,sizeof(ULONG)
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxFrameClassNameNoRedraw
+ ,NULL
+ ,0
+ ,0
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIFrameClassName
+ ,NULL
+ ,CS_SIZEREDRAW | CS_MOVENOTIFY | CS_SYNCPAINT
+ ,0
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIFrameClassNameNoRedraw
+ ,NULL
+ ,0
+ ,0
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIChildFrameClassName
+ ,NULL
+ ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_SYNCPAINT | CS_HITTEST
+ ,0
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxMDIChildFrameClassNameNoRedraw
+ ,NULL
+ ,CS_HITTEST
+ ,0
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxPanelClassName
+ ,NULL
+ ,CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT
+ ,0
+ ))
+ {
+ vError = ::WinGetLastError(vHab);
+ sError = wxPMErrorToStr(vError);
+ wxLogLastError(sError);
+ return FALSE;
+ }
+
+ if (!::WinRegisterClass( vHab
+ ,wxCanvasClassName
+ ,NULL
+ ,0 // CS_MOVENOTIFY | CS_SIZEREDRAW | CS_HITTEST | CS_SAVEBITS | CS_SYNCPAINT
+ ,0
+ ))
+ {
+ 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
+//