]> git.saurik.com Git - wxWidgets.git/commitdiff
Mostly Mingw32/Cygwin corrections
authorJulian Smart <julian@anthemion.co.uk>
Mon, 20 Dec 1999 19:04:48 +0000 (19:04 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 20 Dec 1999 19:04:48 +0000 (19:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

19 files changed:
include/wx/longlong.h
samples/html/about/about.cpp
samples/taskbar/tbtest.cpp
src/common/datetime.cpp
src/common/string.cpp
src/makeg95.env
src/makeprog.vc
src/msw/dialup.cpp
src/msw/fontenum.cpp
src/msw/gdiimage.cpp
src/msw/radiobox.cpp
src/msw/taskbar.cpp
src/msw/tbar95.cpp
src/msw/tbarmsw.cpp
src/msw/textctrl.cpp
src/msw/thread.cpp
src/msw/tooltip.cpp
src/wxvc.dsp
src/wxvc_dll.dsp

index 2731af5ae531ab0585dcef51d6e67e108b5a14de..02f7ded9ea05345ed4ee5b4e8cce6ccb5f9e343b 100644 (file)
@@ -39,6 +39,9 @@
 #if defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
     #define wxLongLong_t long
     #define wxLongLongIsLong
+#elif defined(__WIN16__)
+    #define wxLongLong_t long
+    #define wxLongLongIsLong
 #elif defined(__VISUALC__) || defined( __VMS__ )
     #define wxLongLong_t __int64
 #elif defined(__GNUG__)
index 664b18f06efd17b9a1c677dfcb14b5046908e979..99f32b263e6e52f181e17d1fac07fdddff301f03 100644 (file)
@@ -22,6 +22,7 @@
 #endif
 
 #include <wx/image.h>
+#include <wx/imagpng.h>
 #include <wx/wxhtml.h>
 
 // ----------------------------------------------------------------------------
index 114267dcae9e17b029befb0493a9685670adc29c..74a7200000d814d03282d43487a8187a550ebf1d 100644 (file)
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx.h"
+#include <wx/wx.h>
 #endif
 
-#include "wx/msw/taskbar.h"
+#include <wx/msw/taskbar.h>
 #include "tbtest.h"
 
 // Declare two frames
index 93c8dc6b8428db16e63047b624f28216ca7a4717..00ccb08398eb55c8da12853409e0cde81231b82d 100644 (file)
     #define WX_TIMEZONE timezone
 #endif
 
+// Is this right? Just a guess. (JACS)
+#ifdef __MINGW32__
+#define timezone _timezone
+#endif
+
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -114,7 +119,7 @@ static const int DAYS_PER_400_YEARS = 146097;
 
 // a critical section is needed to protect GetTimeZone() static
 // variable in MT case
-#ifdef wxUSE_THREADS
+#if wxUSE_THREADS
     wxCriticalSection gs_critsectTimezone;
 #endif // wxUSE_THREADS
 
index ed777353a7e37d8cc35e9183dc453a3f34b63b16..8b83cf17fc8767d3bd6066b61931ee4c77bf3f21 100644 (file)
@@ -107,7 +107,7 @@ extern const wxChar WXDLLEXPORT *wxEmptyString = &g_strEmpty.dummy;
 //       function wxVsnprintfA (A for ANSI), should also find one for Unicode
 //       strings in Unicode build
 #ifdef __WXMSW__
-    #if defined(__VISUALC__) || defined(wxUSE_NORLANDER_HEADERS)
+    #if (defined(__VISUALC__) || defined(wxUSE_NORLANDER_HEADERS)) && !defined(__MINGW32__)
         #define wxVsnprintfA     _vsnprintf
     #endif
 #else   // !Windows
index 9c40db3f395987f6e0a7e934c988cc20f86c449d..36a2a1d03a6bb19b48a60f06ba8a58f8d291dd6a 100644 (file)
@@ -7,7 +7,7 @@
 
 # If using Cygwin, set this to 0.
 # If using Mingw32, set this to 1.
-MINGW32=0
+MINGW32=1
 
 # Set to the version you have
 MINGW32VERSION=2.95
index 5c17936e4fe70e07c3ebaac92366f3a23d8d37b1..9de992e7b97df205d8d7daca1e92e2dedb72526b 100644 (file)
@@ -10,7 +10,7 @@
 # Use FINAL=1 argument to nmake to build final version with no debugging
 # info
 
-# Set WXDIR for your system (hint, set an environment variable named WXWIN)
+# Set WXDIR for your system
 WXDIR = $(WXWIN)
 
 WXUSINGDLL=0
index d0163f9dde4389054a54890239e3e8a057574e44..cbf2e82cb9e4f15d2e66a6abb14cf1b137537cb5 100644 (file)
     #include "wx/event.h"
 #endif
 
+#ifndef wxUSE_DYNLIB_CLASS
+#error You need wxUSE_DYNLIB_CLASS to be 1 to compile dialup.cpp.
+#endif
+
 #include "wx/dynlib.h"
 
 #include "wx/dialup.h"
 
 // Doesn't yet compile under BC++ nor with mingw: no wininet.h
-#if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__)
+#if !defined(__BORLANDC__) && !defined(__GNUWIN32_OLD__) && !defined(__GNUWIN32__)
 
 #include <ras.h>
 #include <raserror.h>
index 5674825c1bc8a264c444b6cd2e376d11014a7f62..9d7e1820d03f22e2b29584dd4cabc25585c6a901 100644 (file)
@@ -110,7 +110,9 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
     return TRUE;
 }
 
-#ifdef __GNUWIN32_OLD__
+// I've no idea what __GNUWIN32_OLD__ is. Anyway, I had to add the 2nd condition
+// for Cygwin b20 (JACS)
+#if (defined(__GNUWIN32_OLD__) || defined(__GNUWIN32__)) && !defined(__MINGW32__)
     #define wxFONTENUMPROC int(*)(ENUMLOGFONTEX *, NEWTEXTMETRICEX*, int, LPARAM)
 #else
     #define wxFONTENUMPROC FONTENUMPROC
index d34a94c64c0bebfad8586acec55ed46d8ffa3c34..6d9158e4aa5395180d3209ba4cf39c40f90502fa 100644 (file)
@@ -37,6 +37,7 @@
 #include "wx/app.h"
 
 #include "wx/msw/dib.h"
+#include "wx/msw/bitmap.h"
 #include "wx/msw/gdiimage.h"
 
 #ifdef __WIN16__
index 2767986d6a5b49a3d76b7b5373daf12874b1b54b..fe2d803e2cc34f219a7e0e559ea0bd89ad66a753 100644 (file)
 #include "wx/msw/private.h"
 
 #if wxUSE_TOOLTIPS
+
+#ifndef __GNUWIN32__
     #include <commctrl.h>
+#endif
 
     #include "wx/tooltip.h"
 #endif // wxUSE_TOOLTIPS
 //     and allows tooltips to work with radioboxes, so there should be no
 //     reason to revert to the backward compatible behaviour - but I still
 //     leave this possibility just in case.
+
+// For some reason, the background colour is set wrongly in WIN16 mode
+// if we use the new method.
+
+#ifdef __WIN16__
+#define RADIOBTN_PARENT_IS_RADIOBOX 0
+#else
 #define RADIOBTN_PARENT_IS_RADIOBOX 1
+#endif
 
 // ---------------------------------------------------------------------------
 // private functions
@@ -746,7 +757,7 @@ LRESULT APIENTRY _EXPORT wxRadioBtnWndProc(HWND hwnd,
 
         wxCHECK_MSG( radiobox, 0, wxT("radio button without radio box?") );
 
-#if wxUSE_TOOLTIPS
+#if wxUSE_TOOLTIPS && !defined(__GNUWIN32__)
         if ( msg == WM_NOTIFY )
         {
             NMHDR* hdr = (NMHDR *)lParam;
index 3d8de5f7c64316f50c5385148a6b79e53a26b3cc..cc82231d233cc9d7691913d6fff48827a0c773c6 100644 (file)
@@ -32,6 +32,9 @@
 #if defined(__WIN95__) && !defined(__TWIN32__)
 
 #include <windows.h>
+
+#include "wx/msw/winundef.h"
+
 #include <string.h>
 #include "wx/msw/taskbar.h"
 #include "wx/msw/private.h"
index 77bc8885dc710da1ca61c44f1d985079226aefea..d60c8baa0f154b84359ff341c616d3e5660c2ea1 100644 (file)
 
 #ifndef __TWIN32__
 
-#ifdef __GNUWIN32_OLD__
+// I don't know what _OLD_ refers to so I'm reinstating the old
+// ifdef (JACS).
+// #ifdef __GNUWIN32_OLD__
+#if defined(__GNUWIN32__) && !defined(__MINGW32__)
     #include "wx/msw/gnuwin32/extra.h"
 #else
     #include <commctrl.h>
@@ -199,7 +202,10 @@ bool wxToolBar::Create(wxWindow *parent,
     DWORD msflags = 0;      // WS_VISIBLE | WS_CHILD always included
     if (style & wxBORDER)
         msflags |= WS_BORDER;
+
+#ifdef TBSTYLE_TOOLTIPS
     msflags |= TBSTYLE_TOOLTIPS;
+#endif
 
     if (style & wxTB_FLAT)
     {
index 50410b00f8f93d54c3c87b174fa814f49efd90b1..5de16db0f8c58cf4db37ac1ea9fa05508aa8cab3 100644 (file)
@@ -32,7 +32,7 @@
     #include "wx/wx.h"
 #endif
 
-#if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && !wxUSE_TOOLBAR_SIMPLE
+#if wxUSE_TOOLBAR && defined(__WIN16__)
 
 #if !defined(__WIN32__) && !wxUSE_IMAGE_LOADING_IN_MSW
     #error wxToolBar needs wxUSE_IMAGE_LOADING_IN_MSW under Win16
@@ -48,7 +48,7 @@
 
 #include <stdlib.h>
 
-#include "wx/tbarmsw.h"
+#include "wx/msw/tbarmsw.h"
 #include "wx/event.h"
 #include "wx/app.h"
 #include "wx/bitmap.h"
@@ -491,7 +491,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
     // TODO: use the mapping code from wxToolBar95 to get it right in this class
 #if !defined(__WIN32__) && !defined(__WIN386__)
     wxBitmap bitmap2;
-    if (toggle)
+    if (tool->CanBeToggled())
     {
         HBITMAP hbmp = CreateMappedBitmap((WXHINSTANCE)wxGetInstance(),
                                           GetHbitmapOf(tool->GetBitmap1()));
index 6d55b5594910180ae1e010c8d51cb74b4ba4fa90..011e3e677e332acfcc930f4865513d962bebb870 100644 (file)
@@ -58,7 +58,9 @@
 #   include <fstream>
 #endif
 
-#if wxUSE_RICHEDIT
+// Why oh why did someone remove the tail of this line? Bizarre.
+// It's needed for GNUWIN32 b20, at least.
+#if wxUSE_RICHEDIT && (!defined(__GNUWIN32__) || defined(wxUSE_NORLANDER_HEADERS))
     #include <richedit.h>
 #endif
 
index 8bb3c9938232d394474772a8f8ceb9ff182f6035..472d1916e3d72ca31c6fd3dbdcb9578e78d03b6f 100644 (file)
@@ -521,6 +521,10 @@ bool wxThread::IsMain()
     return ::GetCurrentThreadId() == gs_idMainThread;
 }
 
+#ifdef Yield
+#undef Yield
+#endif
+
 void wxThread::Yield()
 {
     // 0 argument to Sleep() is special and means to just give away the rest of
index 0bac53472b783c6b28d0b93cedc896215f5b183a..0aa577b1aa2bcf29a85b1a178d1c62a0f84759c2 100644 (file)
@@ -32,7 +32,7 @@
 #include "wx/tooltip.h"
 #include "wx/msw/private.h"
 
-#if defined(__WIN95__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && (!defined(__GNUWIN32__) || defined(__MINGW32__))
     #include <commctrl.h>
 #endif
 
index 67dba20a6f04ff8c9fed8f7786c9317c5964d97c..690e86787c3c93f11f7dcf38a81752438000f3d4 100644 (file)
@@ -399,10 +399,6 @@ SOURCE=.\common\tbarbase.cpp
 # End Source File
 # Begin Source File
 
-SOURCE=.\common\tbarsmpl.cpp
-# End Source File
-# Begin Source File
-
 SOURCE=.\common\textcmn.cpp
 # End Source File
 # Begin Source File
@@ -571,6 +567,10 @@ SOURCE=.\generic\tabg.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\generic\tbarsmpl.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\generic\textdlgg.cpp
 # End Source File
 # Begin Source File
index 29ea46b0437faf2c20b7feea43d4ac01d38af7b7..e9f76be312ebd760820dd30bd15212c233cf560f 100644 (file)
@@ -402,10 +402,6 @@ SOURCE=.\common\tbarbase.cpp
 # End Source File
 # Begin Source File
 
-SOURCE=.\common\tbarsmpl.cpp
-# End Source File
-# Begin Source File
-
 SOURCE=.\common\textcmn.cpp
 # End Source File
 # Begin Source File
@@ -565,6 +561,10 @@ SOURCE=.\generic\tabg.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\generic\tbarsmpl.cpp
+# End Source File
+# Begin Source File
+
 SOURCE=.\generic\textdlgg.cpp
 # End Source File
 # Begin Source File