+ // This is to foil optimizations in Visual C++ that throw out dummy.obj.
+ // PLEASE DO NOT ALTER THIS.
+#if !defined(WXMAKINGDLL) && defined(__VISAGECPP__)
+ extern char wxDummyChar;
+ if (wxDummyChar) wxDummyChar++;
+#endif
+
+ // wxSetKeyboardHook(TRUE);
+
+ wxModule::RegisterModules();
+ if (!wxModule::InitializeModules())
+ return FALSE;
+ return TRUE;
+} // end of wxApp::Initialize
+
+// ---------------------------------------------------------------------------
+// RegisterWindowClasses
+// ---------------------------------------------------------------------------
+
+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