]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/app.cpp
Added wxDragImage generic implementation and sample; added mask handling to Motif's
[wxWidgets.git] / src / os2 / app.cpp
index 72c419454c564c7bb7d4dd080ae903c2640e554c..521f05f5868b7866bc55bc28d2d586072d859a7d 100644 (file)
@@ -62,7 +62,6 @@ extern wxChar*                      wxBuffer;
 extern wxChar*                      wxOsVersion;
 extern wxList*                      wxWinHandleList;
 extern wxList WXDLLEXPORT           wxPendingDelete;
-extern void wxSetKeyboardHook(bool doIt);
 extern wxCursor*                    g_globalCursor;
 
 HINSTANCE                           wxhInstance = 0;
@@ -93,7 +92,11 @@ HICON wxDEFAULT_MDIPARENTFRAME_ICON  = (HICON) NULL;
 
 HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
 
-MRESULT wxWndProc(HWND, UINT, MPARAM, MPARAM);
+MRESULT wxWndProc( HWND
+                  ,ULONG
+                  ,MPARAM
+                  ,MPARAM
+                 );
 
 // ===========================================================================
 // implementation
@@ -103,7 +106,6 @@ MRESULT wxWndProc(HWND, UINT, MPARAM, MPARAM);
 // wxApp
 // ---------------------------------------------------------------------------
 
-#if !USE_SHARED_LIBRARY
     IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
 
     BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
@@ -111,7 +113,6 @@ MRESULT wxWndProc(HWND, UINT, MPARAM, MPARAM);
         EVT_END_SESSION(wxApp::OnEndSession)
         EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession)
     END_EVENT_TABLE()
-#endif
 
 //// Initialize
 bool wxApp::Initialize(
@@ -162,12 +163,12 @@ bool wxApp::Initialize(
 
     // This is to foil optimizations in Visual C++ that throw out dummy.obj.
     // PLEASE DO NOT ALTER THIS.
-#if !defined(WXMAKINGDLL)
+#if !defined(WXMAKINGDLL) && defined(__VISAGECPP__)
     extern char wxDummyChar;
     if (wxDummyChar) wxDummyChar++;
 #endif
 
-    wxSetKeyboardHook(TRUE);
+    // wxSetKeyboardHook(TRUE);
 
     wxModule::RegisterModules();
     if (!wxModule::InitializeModules())
@@ -336,7 +337,7 @@ void wxApp::CleanUp()
 
     //// WINDOWS-SPECIFIC CLEANUP
 
-    wxSetKeyboardHook(FALSE);
+    // wxSetKeyboardHook(FALSE);
 
     if (wxSTD_FRAME_ICON)
         ::WinFreeFileIcon(wxSTD_FRAME_ICON);
@@ -399,7 +400,7 @@ int wxEntry(
 , char*                             argv[]
 )
 {
-    HAB                             vHab;
+    HAB                             vHab = 0;
 
     if (!wxApp::Initialize(vHab))
         return 0;
@@ -508,6 +509,7 @@ wxApp::wxApp()
 
 wxApp::~wxApp()
 {
+#if wxUSE_UNICODE
     // Delete command-line args
     int i;
     for (i = 0; i < argc; i++)
@@ -515,6 +517,7 @@ wxApp::~wxApp()
         delete[] argv[i];
     }
     delete[] argv;
+#endif
 }
 
 bool wxApp::Initialized()
@@ -874,7 +877,7 @@ void wxExit()
 // Yield to incoming messages
 bool wxYield()
 {
-    HAB                             vHab;
+    HAB                             vHab = 0;
     QMSG                            vMsg;
     // We want to go back to the main message loop
     // if we see a WM_QUIT. (?)