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