]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/app.h
I don't think the last person to edit splitter.cpp did
[wxWidgets.git] / include / wx / app.h
index 738743fa3a837979ead521381cd96a2966369056..ab9e88a562958d79a0e0a42e915ba7e5841edba3 100644 (file)
@@ -21,7 +21,7 @@
 // typedefs
 // ----------------------------------------------------------------------------
 
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || defined (__WXPM__)
     class WXDLLEXPORT wxApp;
     typedef wxApp* (*wxAppInitializerFunction)();
 #else
@@ -218,7 +218,7 @@ public:
         // set use of best visual flag (see below)
     void SetUseBestVisual( bool flag ) { m_useBestVisual = flag; }
     bool GetUseBestVisual() const { return m_useBestVisual; }
-    
+
         // set/get printing mode: see wxPRINT_XXX constants.
         //
         // default behaviour is the normal one for Unix: always use PostScript
@@ -258,7 +258,7 @@ protected:
 
     // TRUE if the application wants to get debug output
     bool m_wantDebugOutput;
-    
+
     // TRUE if the apps whats to use the best visual on systems where
     // more than one are available (Sun, SGI, XFree86 4.0 ?)
     bool m_useBestVisual;
@@ -380,15 +380,35 @@ public:
         #define WXAPIENTRY WXFAR wxSTDCALL
     #endif
 
-    #define IMPLEMENT_WXWIN_MAIN \
-        int WXAPIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,\
+    // Patch from Mumit Khan to allow DLL compilation under mingw. Note that
+    // this includes <windows.h> which is a bad thing because it prevents
+    // wxWindows to work with MFC, so for now I'm making this change for
+    // mingw/cygwin only (these don't work with MFC yet). GRG Mar/2000
+    #if defined(__GNUWIN32__)
+        #include <windows.h>
+        #include "wx/msw/winundef.h"
+
+        #define IMPLEMENT_WXWIN_MAIN \
+            extern "C" int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);\
+            int WINAPI WinMain(HINSTANCE hInstance, \
+                               HINSTANCE hPrevInstance,\
                                LPSTR m_lpCmdLine, int nCmdShow )\
-        {\
-            return wxEntry((WXHINSTANCE) hInstance, \
-                           (WXHINSTANCE) hPrevInstance,\
-                           m_lpCmdLine, nCmdShow);\
-        }
-
+            {\
+                return wxEntry((WXHINSTANCE) hInstance, \
+                               (WXHINSTANCE) hPrevInstance,\
+                               m_lpCmdLine, nCmdShow);\
+            }
+    #else
+        #define IMPLEMENT_WXWIN_MAIN \
+            int WXAPIENTRY WinMain(HINSTANCE hInstance, \
+                                   HINSTANCE hPrevInstance,\
+                                   LPSTR m_lpCmdLine, int nCmdShow )\
+            {\
+                return wxEntry((WXHINSTANCE) hInstance, \
+                               (WXHINSTANCE) hPrevInstance,\
+                               m_lpCmdLine, nCmdShow);\
+            }
+    #endif
 #else
     #define IMPLEMENT_WXWIN_MAIN
 #endif