]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
warning fixed
[wxWidgets.git] / src / msw / app.cpp
index 145aa72a911d4542d8cc482cc8fbd60d7b5f9ccc..ef23125bdc1483738cc037bf2756581de1d0e5d1 100644 (file)
@@ -19,7 +19,6 @@
 
 #ifdef __GNUG__
     #pragma implementation "app.h"
-    #pragma implementation "appbase.h"
 #endif
 
 // For compilers that support precompilation, includes "wx.h".
@@ -44,8 +43,8 @@
     #include "wx/msgdlg.h"
     #include "wx/intl.h"
     #include "wx/dynarray.h"
-#   include "wx/wxchar.h"
-#   include "wx/icon.h"
+    #include "wx/wxchar.h"
+    #include "wx/icon.h"
 #endif
 
 #include "wx/log.h"
@@ -128,7 +127,7 @@ HICON wxDEFAULT_MDIPARENTFRAME_ICON = (HICON) NULL;
 
 HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
 
-LRESULT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
+LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
 
 #if defined(__WIN95__) && !defined(__TWIN32__)
     #define wxUSE_RICHEDIT 1
@@ -227,6 +226,8 @@ bool wxApp::Initialize()
 
     g_globalCursor = new wxCursor;
 
+    // VZ: these icons are not in wx.rc anyhow (but should they?)!
+#if 0
     wxSTD_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_FRAME"));
     wxSTD_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDIPARENTFRAME"));
     wxSTD_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDICHILDFRAME"));
@@ -234,6 +235,7 @@ bool wxApp::Initialize()
     wxDEFAULT_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_FRAME"));
     wxDEFAULT_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDIPARENTFRAME"));
     wxDEFAULT_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDICHILDFRAME"));
+#endif // 0
 
     RegisterWindowClasses();
 
@@ -556,7 +558,7 @@ void wxApp::CleanUp()
     if (wxWinHandleList)
         delete wxWinHandleList;
 
-    // GL: I'm annoyed ... I don't know where to put this and I don't want to 
+    // GL: I'm annoyed ... I don't know where to put this and I don't want to
     // create a module for that as it's part of the core.
     delete wxPendingEvents;
 #if wxUSE_THREADS
@@ -621,7 +623,6 @@ int wxEntry(WXHINSTANCE hInstance,
 #else
     #undef  CATCH_PROGRAM_EXCEPTIONS
 #endif
-
         wxhInstance = (HINSTANCE) hInstance;
 
         if (!wxApp::Initialize())
@@ -649,6 +650,13 @@ int wxEntry(WXHINSTANCE hInstance,
         // but this call is provided for compatibility across platforms.
         wxTheApp->OnInitGui();
 
+        // We really don't want timestamps by default, because it means
+        // we can't simply double-click on the error message and get to that
+        // line in the source. So VC++ at least, let's have a sensible default.
+#ifdef __VISUALC__
+        wxLog::SetTimestamp(NULL);
+#endif
+
         int retValue = 0;
 
         if ( wxTheApp->OnInit() )
@@ -924,28 +932,6 @@ bool wxApp::ProcessIdle()
     return event.MoreRequested();
 }
 
-void wxApp::ProcessPendingEvents()
-{
-#if wxUSE_THREADS
-    // ensure that we're the only thread to modify the pending events list
-    wxCriticalSectionLocker locker(*wxPendingEventsLocker);
-#endif
-
-    if ( !wxPendingEvents )
-        return;
-
-    wxNode *node = wxPendingEvents->First();
-    while (node)
-    {
-        wxEvtHandler *handler = (wxEvtHandler *)node->Data();
-
-        handler->ProcessPendingEvents();
-
-        delete node;
-        node = wxPendingEvents->First();
-    }
-}
-
 void wxApp::ExitMainLoop()
 {
     m_keepGoing = FALSE;
@@ -979,7 +965,7 @@ bool wxApp::ProcessMessage(WXMSG *wxmsg)
     while ( hWnd && !wndThis )
     {
         hWnd = ::GetParent(hWnd);
-        wndThis = wxFindWinFromHandle((WXHWND)hWnd);        
+        wndThis = wxFindWinFromHandle((WXHWND)hWnd);
     }
 
     // Try translations first; find the youngest window with