]> git.saurik.com Git - wxWidgets.git/commitdiff
removed Win16 code (patch 905241), last version with remains of Win16 support tagged...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 28 Mar 2004 13:10:14 +0000 (13:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 28 Mar 2004 13:10:14 +0000 (13:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

77 files changed:
demos/dbbrowse/dummy.cpp
demos/dbbrowse/pgmctrl.cpp
demos/forty/scorefil.h
demos/life/game.cpp
docs/html/index.htm
docs/latex/wx/config.tex
docs/latex/wx/function.tex
docs/latex/wx/tdb.tex
include/wx/confbase.h
include/wx/dc.h
include/wx/defs.h
include/wx/dragimag.h
include/wx/event.h
include/wx/filefn.h
include/wx/generic/imaglist.h
include/wx/generic/listctrl.h
include/wx/generic/treectlg.h
include/wx/isql.h
include/wx/mac/setup0.h
include/wx/metafile.h
include/wx/msw/ole/uuid.h
include/wx/msw/private.h
include/wx/msw/statbmp.h
include/wx/msw/tbarmsw.h
include/wx/msw/textctrl.h
include/wx/platform.h
include/wx/spinctrl.h
include/wx/treectrl.h
include/wx/wxchar.h
samples/controls/controls.cpp
samples/notebook/notebook.cpp
src/common/cmndata.cpp
src/common/config.cpp
src/common/filename.cpp
src/common/log.cpp
src/common/valgen.cpp
src/common/variant.cpp
src/common/xpmdecod.cpp
src/common/zstream.cpp
src/generic/dragimgg.cpp
src/generic/imaglist.cpp
src/generic/logg.cpp
src/generic/notebook.cpp
src/generic/numdlgg.cpp
src/generic/sashwin.cpp
src/generic/treectlg.cpp
src/msw/accel.cpp
src/msw/app.cpp
src/msw/bitmap.cpp
src/msw/caret.cpp
src/msw/checklst.cpp
src/msw/clipbrd.cpp
src/msw/combobox.cpp
src/msw/dc.cpp
src/msw/dcprint.cpp
src/msw/dialup.cpp
src/msw/dir.cpp
src/msw/dummy.cpp
src/msw/fontdlg.cpp
src/msw/fontenum.cpp
src/msw/mdi.cpp
src/msw/menuitem.cpp
src/msw/mimetype.cpp
src/msw/printdlg.cpp
src/msw/radiobut.cpp
src/msw/regconf.cpp
src/msw/region.cpp
src/msw/registry.cpp
src/msw/settings.cpp
src/msw/statbmp.cpp
src/msw/tbarmsw.cpp
src/msw/textctrl.cpp
src/msw/toplevel.cpp
src/msw/utils.cpp
src/msw/utilsexc.cpp
src/msw/utilsgui.cpp
utils/tex2rtf/src/tex2rtf.cpp

index 6a359111131c329d40f3a8e0a5c7584706056af8..5d4ce56ab045d9e5a1c2829e8636ce5d1b9243fb 100644 (file)
@@ -28,9 +28,3 @@
 
 #include "wx/msw/msvcrt.h"
 
 
 #include "wx/msw/msvcrt.h"
 
-// Foils optimizations in Visual C++ (see also app.cpp). Without it,
-// dummy.obj isn't linked and we get a linker error.
-#if defined(__VISUALC__) && defined(__WIN16__)
-    char wxDummyChar = 0;
-#endif
-
index c7b2ec0663896fca79eaa45a6f7e5108e2182022..786b0dea8f0b7e9b773daba11632729a736e71d5 100644 (file)
@@ -74,12 +74,6 @@ PgmCtrl::PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const
     // Make an image list containing small icons
     p_imageListNormal = new wxImageList(image_size, image_size, TRUE);
     // should correspond to TreeIc_xxx enum
     // Make an image list containing small icons
     p_imageListNormal = new wxImageList(image_size, image_size, TRUE);
     // should correspond to TreeIc_xxx enum
-#if defined(__WXMSW__) && defined(__WIN16__)
-    // This is required in 16-bit Windows mode only because we can't load a specific (16x16)
-    // icon image, so it comes out stretched
-    p_imageListNormal->Add(wxBitmap(wxBitmap("bitmap1", wxBITMAP_TYPE_BMP_RESOURCE).ConvertToImage().Rescale(image_size, image_size)));
-    p_imageListNormal->Add(wxBitmap(wxBitmap("bitmap2", wxBITMAP_TYPE_BMP_RESOURCE).ConvertToImage().Rescale(image_size, image_size)));
-#else
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(aLogo)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DsnClosed)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DsnOpen)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(aLogo)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DsnClosed)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DsnOpen)).ConvertToImage().Rescale(image_size, image_size)));
@@ -87,7 +81,6 @@ PgmCtrl::PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DocOpen)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(FolderClosed)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(FolderOpen)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(DocOpen)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(FolderClosed)).ConvertToImage().Rescale(image_size, image_size)));
     p_imageListNormal->Add(wxBitmap(wxBitmap(wxICON(FolderOpen)).ConvertToImage().Rescale(image_size, image_size)));
-#endif
     SetImageList(p_imageListNormal);
 }
 
     SetImageList(p_imageListNormal);
 }
 
index d73bb62540995714ff7acde8a21cd3d9e1cf3663..9e91de438e4ef14c486052c1f6f889ae4ec237c7 100644 (file)
 
 #include <wx/config.h>
 
 
 #include <wx/config.h>
 
-#ifdef __WIN16__
-#include <wx/fileconf.h>
-
-#undef wxConfig
-#define wxConfig wxFileConfig
-#endif
-
 class ScoreFile {
 public:
        ScoreFile(const wxString& appName);
 class ScoreFile {
 public:
        ScoreFile(const wxString& appName);
index 681e12449ea3d7e232e3e27bf60848ab7beb5f53..a8be0b96e87fa9aae791c2f35731a38979fbe59e 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __WIN16__
-#error "Sorry, Life! will not work in 16-bit Windows"
-#endif
-
 // ==========================================================================
 // headers, declarations, constants
 // ==========================================================================
 // ==========================================================================
 // headers, declarations, constants
 // ==========================================================================
index 8d8b45bb99ff2b80ca1fc673cd07b76ad1d4db9d..a78e86c31a63f53fe205a83a0f45ae34052b4b43 100644 (file)
@@ -295,7 +295,7 @@ wxWindows dialogs by replacing default bitmaps/icons with your own versions.
 <li><a href="../../samples/checklst">checklst</a>: demonstrates wxCheckListBox on
 supported platforms (currently Windows and GTK only).
 <li><a href="../../samples/config">config</a>: demonstrates use of wxConfig, which
 <li><a href="../../samples/checklst">checklst</a>: demonstrates wxCheckListBox on
 supported platforms (currently Windows and GTK only).
 <li><a href="../../samples/config">config</a>: demonstrates use of wxConfig, which
-defaults to wxRegConfig on WIN32, wxIniConfig on WIN16, and wxFileConfig on other platforms.
+defaults to wxRegConfig on WIN32 (optionally wxIniConfig), and wxFileConfig on other platforms.
 <li><a href="../../samples/console">console</a>: demonstrates a console application using
 console-mode (no-GUI) compilation of wxWindows.
 <li><a href="../../samples/controls">controls</a>: sample showing a variety of controls, including
 <li><a href="../../samples/console">console</a>: demonstrates a console application using
 console-mode (no-GUI) compilation of wxWindows.
 <li><a href="../../samples/controls">controls</a>: sample showing a variety of controls, including
index 03b3a892236e830770478bb2284b1be1d86b8006..f1bdd6b7236400b02b422ace81682b284640f2a4 100644 (file)
@@ -11,7 +11,7 @@ the registry under Win32 or text-based config files under Unix (or even
 Windows 3.1 .INI files if you're really unlucky). To make writing the portable
 code even easier, wxWindows provides a typedef wxConfig
 which is mapped onto the native wxConfigBase implementation on the given
 Windows 3.1 .INI files if you're really unlucky). To make writing the portable
 code even easier, wxWindows provides a typedef wxConfig
 which is mapped onto the native wxConfigBase implementation on the given
-platform: i.e. wxRegConfig under Win32, wxIniConfig under Win16 and
+platform: i.e. wxRegConfig under Win32 (optionally wxIniConfig) and
 wxFileConfig otherwise.
 
 See \helpref{config overview}{wxconfigoverview} for the descriptions of all
 wxFileConfig otherwise.
 
 See \helpref{config overview}{wxconfigoverview} for the descriptions of all
index 9af8616778d30ad8ba0dcb53f1cce77552b9f093..545b1036907b1c57e2670a46de1a1b458a73402b 100644 (file)
@@ -969,7 +969,7 @@ directory doesn't exist).
 
 \wxheading{Portability}
 
 
 \wxheading{Portability}
 
-This function is implemented for Win16 (only for drives less than 2Gb), Win32,
+This function is implemented for Win32,
 Mac OS and generic Unix provided the system has {\tt statfs()} function.
 
 This function first appeared in wxWindows 2.3.2.
 Mac OS and generic Unix provided the system has {\tt statfs()} function.
 
 This function first appeared in wxWindows 2.3.2.
index 7a2d7be7fca25e3b0450bd8a4e6185a384c58b4f..e72687c568302847c98774bef67b619abc622bb2 100644 (file)
@@ -291,8 +291,6 @@ in the list of external libraries to be linked in. If using the makefiles
 supplied with wxWindows, this library should already be included for use with 
 makefile.b32, makefile.vc, and makefile.g95. 
 
 supplied with wxWindows, this library should already be included for use with 
 makefile.b32, makefile.vc, and makefile.g95. 
 
-You cannot compile the wxODBC classes under Win16 - sorry.
-
 \normalbox{MORE TO COME}
 
 {\it Under Unix}
 \normalbox{MORE TO COME}
 
 {\it Under Unix}
index 6ce5b907a436eb509705313d18f2cc624e72a14e..699a9e0acef1c437395830bf1a972d274fc1944f 100644 (file)
@@ -49,8 +49,7 @@ class WXDLLIMPEXP_BASE wxArrayString;
 
 /// should we use registry instead of configuration files under Windows?
 // (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
 
 /// should we use registry instead of configuration files under Windows?
 // (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
-//  FALSE) or wxRegConfig (if it's true and we're under Win32) or wxIniConfig
-//  (under Win16))
+//  FALSE) or wxRegConfig (if it's true and we're under Win32))
 #ifndef   wxUSE_CONFIG_NATIVE
   #define wxUSE_CONFIG_NATIVE 1
 #endif
 #ifndef   wxUSE_CONFIG_NATIVE
   #define wxUSE_CONFIG_NATIVE 1
 #endif
@@ -320,12 +319,9 @@ private:
 // ----------------------------------------------------------------------------
 
 // under Windows we prefer to use the native implementation
 // ----------------------------------------------------------------------------
 
 // under Windows we prefer to use the native implementation
+// wxIniConfig isn't native anywhere after droping win16 in wxWidgets 2.6
 #if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
 #if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
-  #ifdef __WIN32__
     #define wxConfig  wxRegConfig
     #define wxConfig  wxRegConfig
-  #else  //WIN16
-    #define wxConfig  wxIniConfig
-  #endif
 #else // either we're under Unix or wish to use files even under Windows
   #define wxConfig  wxFileConfig
 #endif
 #else // either we're under Unix or wish to use files even under Windows
   #define wxConfig  wxFileConfig
 #endif
index 777ee3170268bf3276b010b493da56c3b302657c..f805dd61acd50d749cfc4d565626bd233f021dcf 100644 (file)
@@ -596,7 +596,6 @@ public:
     // ------------------
 
     // for compatibility with the old code when wxCoord was long everywhere
     // ------------------
 
     // for compatibility with the old code when wxCoord was long everywhere
-#ifndef __WIN16__
     void GetTextExtent(const wxString& string,
                        long *x, long *y,
                        long *descent = NULL,
     void GetTextExtent(const wxString& string,
                        long *x, long *y,
                        long *descent = NULL,
@@ -645,7 +644,6 @@ public:
         if (w) *w = ww;
         if (h) *h = hh;
     }
         if (w) *w = ww;
         if (h) *h = hh;
     }
-#endif // !Win16
 
 protected:
     // the pure virtual functions which should be implemented by wxDC
 
 protected:
     // the pure virtual functions which should be implemented by wxDC
index 27199b41b3ac4e4d23926aef77d68c08e6b452ea..d2bd046176ead6f8ebb90efb78afafdf14fbedb8 100644 (file)
@@ -234,11 +234,7 @@ typedef int wxWindowID;
 /*  general, but there are places where you can use them to advantage */
 /*  without totally breaking ports that cannot use them.  If you do, then */
 /*  wrap it in this guard, but such cases should still be relatively rare. */
 /*  general, but there are places where you can use them to advantage */
 /*  without totally breaking ports that cannot use them.  If you do, then */
 /*  wrap it in this guard, but such cases should still be relatively rare. */
-#ifndef __WIN16__
-    #define wxUSE_NESTED_CLASSES    1
-#else
-    #define wxUSE_NESTED_CLASSES    0
-#endif
+#define wxUSE_NESTED_CLASSES    1
 
 /*  check for explicit keyword support */
 #ifndef HAVE_EXPLICIT
 
 /*  check for explicit keyword support */
 #ifndef HAVE_EXPLICIT
@@ -566,14 +562,8 @@ enum
     /*  to ensure compatibility with 2.0, we must use long */
     #define wxCoord long
 #else  /*  !wxUSE_COMPATIBLE_COORD_TYPES */
     /*  to ensure compatibility with 2.0, we must use long */
     #define wxCoord long
 #else  /*  !wxUSE_COMPATIBLE_COORD_TYPES */
-    #ifdef __WIN16__
-        /*  under Win16, int is too small, so use long to allow for bigger */
-        /*  virtual canvases */
-        typedef long wxCoord;
-    #else /*  !Win16 */
         /*  other platforms we support have at least 32bit int - quite enough */
         typedef int wxCoord;
         /*  other platforms we support have at least 32bit int - quite enough */
         typedef int wxCoord;
-    #endif /*  Win16/!Win16 */
 #endif /*  wxUSE_COMPATIBLE_COORD_TYPES/!wxUSE_COMPATIBLE_COORD_TYPES */
 
 
 #endif /*  wxUSE_COMPATIBLE_COORD_TYPES/!wxUSE_COMPATIBLE_COORD_TYPES */
 
 
@@ -2158,17 +2148,9 @@ typedef WX_NSView WXWidget; /*  wxWindows BASE definition */
 #ifdef __WXMSW__
 
 /*  the keywords needed for WinMain() declaration */
 #ifdef __WXMSW__
 
 /*  the keywords needed for WinMain() declaration */
-#ifdef __WIN16__
-#  ifdef __VISUALC__
-#    define WXFAR __far
-#  else
-#    define WXFAR _far
-#  endif
-#else  /*  Win32 */
-#  ifndef WXFAR
+#ifndef WXFAR
 #    define WXFAR
 #    define WXFAR
-#  endif
-#endif /*  Win16/32 */
+#endif
 
 /*  Stand-ins for Windows types to avoid #including all of windows.h */
 typedef void *          WXHWND;
 
 /*  Stand-ins for Windows types to avoid #including all of windows.h */
 typedef void *          WXHWND;
index 6cea95e0340e9204e04f973bb7b1bc97214ac7a5..2563a895fd1be1eacf8731fd480f2efd7f2a923c 100644 (file)
@@ -8,32 +8,32 @@ class WXDLLEXPORT wxMemoryDC;
 class WXDLLEXPORT wxDC;
 
 #if defined(__WXMSW__)
 class WXDLLEXPORT wxDC;
 
 #if defined(__WXMSW__)
-#if defined(__WIN16__)  || defined(__WXUNIVERSAL__)
-#include "wx/generic/dragimgg.h"
-#define wxDragImage wxGenericDragImage
+#   if defined(__WXUNIVERSAL__)
+#       include "wx/generic/dragimgg.h"
+#       define wxDragImage wxGenericDragImage
+#   else
+#       include "wx/msw/dragimag.h"
+#   endif
 
 
-#else
-#include "wx/msw/dragimag.h"
-#endif
 #elif defined(__WXMOTIF__)
 #elif defined(__WXMOTIF__)
-#include "wx/generic/dragimgg.h"
-#define wxDragImage wxGenericDragImage
+#   include "wx/generic/dragimgg.h"
+#   define wxDragImage wxGenericDragImage
 
 #elif defined(__WXGTK__)
 
 #elif defined(__WXGTK__)
-#include "wx/generic/dragimgg.h"
-#define wxDragImage wxGenericDragImage
+#   include "wx/generic/dragimgg.h"
+#   define wxDragImage wxGenericDragImage
 
 #elif defined(__WXX11__)
 
 #elif defined(__WXX11__)
-#include "wx/generic/dragimgg.h"
-#define wxDragImage wxGenericDragImage
+#   include "wx/generic/dragimgg.h"
+#   define wxDragImage wxGenericDragImage
 
 #elif defined(__WXMAC__)
 
 #elif defined(__WXMAC__)
-#include "wx/generic/dragimgg.h"
-#define wxDragImage wxGenericDragImage
+#   include "wx/generic/dragimgg.h"
+#   define wxDragImage wxGenericDragImage
 
 #elif defined(__WXPM__)
 
 #elif defined(__WXPM__)
-#include "wx/generic/dragimgg.h"
-#define wxDragImage wxGenericDragImage
+#   include "wx/generic/dragimgg.h"
+#   define wxDragImage wxGenericDragImage
 
 #endif
 
 
 #endif
 
index 17d67521a91cb8f46860091b98ddbba3b4a4d6d5..29100ac6616158bb08e7f663ce90015c1174de64 100644 (file)
@@ -754,7 +754,6 @@ public:
             *ypos = m_y;
     }
 
             *ypos = m_y;
     }
 
-#ifndef __WIN16__
     void GetPosition(long *xpos, long *ypos) const
     {
         if (xpos)
     void GetPosition(long *xpos, long *ypos) const
     {
         if (xpos)
@@ -762,7 +761,6 @@ public:
         if (ypos)
             *ypos = (long)m_y;
     }
         if (ypos)
             *ypos = (long)m_y;
     }
-#endif
 
     // Find the position of the event
     wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
 
     // Find the position of the event
     wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
@@ -905,13 +903,11 @@ public:
         if (ypos) *ypos = m_y;
     }
 
         if (ypos) *ypos = m_y;
     }
 
-#ifndef __WIN16__
     void GetPosition(long *xpos, long *ypos) const
     {
         if (xpos) *xpos = (long)m_x;
         if (ypos) *ypos = (long)m_y;
     }
     void GetPosition(long *xpos, long *ypos) const
     {
         if (xpos) *xpos = (long)m_x;
         if (ypos) *ypos = (long)m_y;
     }
-#endif
 
     wxPoint GetPosition() const
         { return wxPoint(m_x, m_y); }
 
     wxPoint GetPosition() const
         { return wxPoint(m_x, m_y); }
index eb714186e38f6997629bad6680544a4e8e0b7728..65e3396aa0e1ea62d60f4f40a379ef564f776dd5 100644 (file)
@@ -39,8 +39,6 @@
 
 #if defined(__VISUALC__) || ( defined(__MWERKS__) && defined( __INTEL__) )
     typedef _off_t off_t;
 
 #if defined(__VISUALC__) || ( defined(__MWERKS__) && defined( __INTEL__) )
     typedef _off_t off_t;
-#elif defined(__BORLANDC__) && defined(__WIN16__)
-    typedef long off_t;
 #elif defined(__SYMANTEC__)
     typedef long off_t;
 #elif defined(__MWERKS__) && !defined(__INTEL__) && !defined(__MACH__)
 #elif defined(__SYMANTEC__)
     typedef long off_t;
 #elif defined(__MWERKS__) && !defined(__INTEL__) && !defined(__MACH__)
index 72c4f686946defd3ea23baa7f4d0355e199f3ab3..3eef4e40cc93a1716ca450bd73ceda77ac353069 100644 (file)
@@ -86,7 +86,7 @@ private:
     DECLARE_DYNAMIC_CLASS(wxGenericImageList)
 };
 
     DECLARE_DYNAMIC_CLASS(wxGenericImageList)
 };
 
-#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
 /*
  * wxImageList has to be a real class or we have problems with
  * the run-time information.
 /*
  * wxImageList has to be a real class or we have problems with
  * the run-time information.
@@ -104,7 +104,7 @@ public:
     {
     }
 };
     {
     }
 };
-#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
+#endif // !__WXMSW__ || __WXUNIVERSAL__
 
 #endif  // __IMAGELISTH_G__
 
 
 #endif  // __IMAGELISTH_G__
 
index 5eb658e02c0b6c3c1b672ac004b6ecdbabe3ed29..47ba79defec6eb191340fd6026f73823fe0c540e 100644 (file)
@@ -37,7 +37,7 @@ class WXDLLEXPORT wxDropTarget;
 class WXDLLEXPORT wxListItem;
 class WXDLLEXPORT wxListEvent;
 
 class WXDLLEXPORT wxListItem;
 class WXDLLEXPORT wxListEvent;
 
-#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
 class WXDLLEXPORT wxListCtrl;
 #define wxImageListType wxImageList
 #else
 class WXDLLEXPORT wxListCtrl;
 #define wxImageListType wxImageList
 #else
@@ -247,7 +247,7 @@ private:
     DECLARE_DYNAMIC_CLASS(wxGenericListCtrl);
 };
 
     DECLARE_DYNAMIC_CLASS(wxGenericListCtrl);
 };
 
-#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
 /*
  * wxListCtrl has to be a real class or we have problems with
  * the run-time information.
 /*
  * wxListCtrl has to be a real class or we have problems with
  * the run-time information.
@@ -270,6 +270,6 @@ public:
     {
     }
 };
     {
     }
 };
-#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
+#endif // !__WXMSW__ || __WXUNIVERSAL__
 
 #endif // __LISTCTRLH_G__
 
 #endif // __LISTCTRLH_G__
index f82e154ac7bf2bafd85cf2509abf28a651c79591..db054192235588610f963ca4c342e05ee3c7a45e 100644 (file)
@@ -495,7 +495,7 @@ private:
     DECLARE_NO_COPY_CLASS(wxGenericTreeCtrl)
 };
 
     DECLARE_NO_COPY_CLASS(wxGenericTreeCtrl)
 };
 
-#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
 /*
  * wxTreeCtrl has to be a real class or we have problems with
  * the run-time information.
 /*
  * wxTreeCtrl has to be a real class or we have problems with
  * the run-time information.
@@ -518,7 +518,7 @@ public:
     {
     }
 };
     {
     }
 };
-#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
+#endif // !__WXMSW__ || __WXUNIVERSAL__
 
 #endif // wxUSE_TREECTRL
 
 
 #endif // wxUSE_TREECTRL
 
index 5d4bb72fe2b1fc345cafa009e8028943a581a268..fd2f4c1ad8c6fda8ef9262b282a8e7e75de42330 100644 (file)
 #ifndef _ISQL_H
 #define _ISQL_H
 
 #ifndef _ISQL_H
 #define _ISQL_H
 
-#if defined(__WIN16__)
-
-#define SQL_API EXPORT CALLBACK
-#ifndef EXPORT
-#define EXPORT _export
-#endif
-
-#elif defined(WIN32)
+#if defined(WIN32)
 #define SQL_API                                __stdcall
 
 #ifndef FAR
 #define SQL_API                                __stdcall
 
 #ifndef FAR
index c0b2f7642e24a1af3f847e460e166462b1f3a9af..3d2dfd0864d00985f8c06a5424e2bffe98bc835e 100644 (file)
 // library without it if you have no use for it - this will result in a
 // somewhat smaller and faster operation.
 //
 // library without it if you have no use for it - this will result in a
 // somewhat smaller and faster operation.
 //
-// This is ignored under Win16, threads are only supported under Win32.
+// Threads are only supported under Win32.
 //
 // Default is 1
 //
 //
 // Default is 1
 //
index 78908d8df4fc2348a8ab41fd7c63f0bd4d7e047c..ba83cfa3e29d7dad645c9d64ce900b93e9bf1baf 100644 (file)
@@ -20,7 +20,7 @@
 #define wxMakeMetaFilePlaceable wxMakeMetafilePlaceable
 
 #if defined(__WXMSW__)
 #define wxMakeMetaFilePlaceable wxMakeMetafilePlaceable
 
 #if defined(__WXMSW__)
-    #if defined(__WIN32__) && wxUSE_ENH_METAFILE
+    #if wxUSE_ENH_METAFILE
         #include "wx/msw/enhmeta.h"
 
         // map all metafile classes to enh metafile
         #include "wx/msw/enhmeta.h"
 
         // map all metafile classes to enh metafile
@@ -33,7 +33,7 @@
             // this flag will be set if wxMetafile class is wxEnhMetaFile
             #define wxMETAFILE_IS_ENH
         #endif // wxUSE_WIN_METAFILES_ALWAYS
             // this flag will be set if wxMetafile class is wxEnhMetaFile
             #define wxMETAFILE_IS_ENH
         #endif // wxUSE_WIN_METAFILES_ALWAYS
-    #else // Win16
+    #else // !wxUSE_ENH_METAFILE
         #include "wx/msw/metafile.h"
     #endif
 #elif defined(__WXPM__)
         #include "wx/msw/metafile.h"
     #endif
 #elif defined(__WXPM__)
index 5b0875fe32b7040b3609506ab35d2b9f9d1df8cf..c194a4e4174c9392a5da1742ecd8b460e07f6989 100644 (file)
@@ -32,8 +32,6 @@
       unsigned short  Data3;
       unsigned char   Data4[8];
     } UUID;                     // UUID = GUID = CLSID = LIBID = IID
       unsigned short  Data3;
       unsigned char   Data4[8];
     } UUID;                     // UUID = GUID = CLSID = LIBID = IID
-  #else   // WIN16
-    #error "Don't know about UUIDs on this platform"
   #endif  // WIN32
 #endif  // UUID_DEFINED
 
   #endif  // WIN32
 #endif  // UUID_DEFINED
 
index 8337606c2257cf509d657edc12fcab292cbff5db..528a5ba437f8577245d88bed8e8e7825de837311 100644 (file)
@@ -299,14 +299,11 @@ inline bool wxIsCtrlDown()
 inline RECT wxGetWindowRect(HWND hwnd)
 {
     RECT rect;
 inline RECT wxGetWindowRect(HWND hwnd)
 {
     RECT rect;
-#ifdef __WIN16__
-    ::GetWindowRect(hwnd, &rect);
-#else // Win32
+
     if ( !::GetWindowRect(hwnd, &rect) )
     {
         wxLogLastError(_T("GetWindowRect"));
     }
     if ( !::GetWindowRect(hwnd, &rect) )
     {
         wxLogLastError(_T("GetWindowRect"));
     }
-#endif // Win16/32
 
     return rect;
 }
 
     return rect;
 }
@@ -314,14 +311,11 @@ inline RECT wxGetWindowRect(HWND hwnd)
 inline RECT wxGetClientRect(HWND hwnd)
 {
     RECT rect;
 inline RECT wxGetClientRect(HWND hwnd)
 {
     RECT rect;
-#ifdef __WIN16__
-    ::GetClientRect(hwnd, &rect);
-#else // Win32
+
     if ( !::GetClientRect(hwnd, &rect) )
     {
         wxLogLastError(_T("GetClientRect"));
     }
     if ( !::GetClientRect(hwnd, &rect) )
     {
         wxLogLastError(_T("GetClientRect"));
     }
-#endif // Win16/32
 
     return rect;
 }
 
     return rect;
 }
index 7aed8c8b123f62996a6aede10b44a5a49ab76595..e778d2e373daef075fb0ba4665c618a4b61acbaf 100644 (file)
@@ -74,9 +74,6 @@ public:
     // -------------------------------
 
     // implement base class virtuals
     // -------------------------------
 
     // implement base class virtuals
-#ifdef __WIN16__
-    virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
-#endif // __WIN16__
     virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
 
 protected:
     virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
 
 protected:
index aa0b9dc33d5fcbcab2c4b4fc60371cd7ec55c44d..388b501c0825c6a08ac964142e0a0a876261e969 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wx/msw/tbarmsw.h
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wx/msw/tbarmsw.h
-// Purpose:     wxToolBar for Win16
+// Purpose:     wxToolBar for older Windowses
 // Author:      Julian Smart
 // Modified by: 13.12.99 by VZ during toolbar classes reorganization
 // Created:     01/02/97
 // Author:      Julian Smart
 // Modified by: 13.12.99 by VZ during toolbar classes reorganization
 // Created:     01/02/97
@@ -25,7 +25,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxButtonBarNameStr;
 class WXDLLEXPORT wxMemoryDC;
 
 // ----------------------------------------------------------------------------
 class WXDLLEXPORT wxMemoryDC;
 
 // ----------------------------------------------------------------------------
-// wxToolBar for Win16
+// wxToolBar for older Windowses
 // ----------------------------------------------------------------------------
 
 class WXDLLEXPORT wxToolBar : public wxToolBarBase
 // ----------------------------------------------------------------------------
 
 class WXDLLEXPORT wxToolBar : public wxToolBarBase
index 71ac994ad92cb1289e923463a3b8964b2225dca2..e0928b117468440d6ac5272c657383b00f79138c 100644 (file)
@@ -147,12 +147,6 @@ public:
     virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
             WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
 
     virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
             WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
 
-    // In WIN16, need to override normal erasing because
-    // Ctl3D doesn't use the wxWindows background colour.
-#ifdef __WIN16__
-    void OnEraseBackground(wxEraseEvent& event);
-#endif
-
 #if wxUSE_RICHEDIT
     virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
 
 #if wxUSE_RICHEDIT
     virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
 
index 91f11101ecff7c9a5b3595a0e495cd134e1368f5..6085934aa8b6297d9e7dfe82547ce631e7ca025c 100644 (file)
 
     /* to be changed for Win64! */
 #    ifndef __WIN32__
 
     /* to be changed for Win64! */
 #    ifndef __WIN32__
-#        define __WIN16__
+#        error "__WIN32__ should be defined for Win32 and Win64, Win16 is not supported"
 #    endif
 
     /*
 #    endif
 
     /*
index 4f3f067d2601c55ad3fbb418e621453d0572c06e..7910a98de36f7084d5575b4d32b5eb1bfd03cd18 100644 (file)
@@ -55,7 +55,7 @@ protected:
 
 #if defined(__WXUNIVERSAL__)
     #include "wx/generic/spinctlg.h"
 
 #if defined(__WXUNIVERSAL__)
     #include "wx/generic/spinctlg.h"
-#elif defined(__WXMSW__) && defined(__WIN32__)
+#elif defined(__WXMSW__)
     #include "wx/msw/spinctrl.h"
 #elif defined(__WXPM__)
     #include "wx/os2/spinctrl.h"
     #include "wx/msw/spinctrl.h"
 #elif defined(__WXPM__)
     #include "wx/os2/spinctrl.h"
@@ -65,8 +65,6 @@ protected:
     #include "wx/generic/spinctlg.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/spinctrl.h"
     #include "wx/generic/spinctlg.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/spinctrl.h"
-#else // Win16 || !Win
-    #include "wx/generic/spinctlg.h"
 #endif // platform
 
 #define EVT_SPINCTRL(id, fn) \
 #endif // platform
 
 #define EVT_SPINCTRL(id, fn) \
index 5f2c44557a765d63287cc6ff2031abdc8204c367..080de6b24dc80950e80f08c1bca07be3cc434f37 100644 (file)
 #if defined(__WXUNIVERSAL__)
     #include "wx/generic/treectlg.h"
 #elif defined(__WXMSW__)
 #if defined(__WXUNIVERSAL__)
     #include "wx/generic/treectlg.h"
 #elif defined(__WXMSW__)
-    #ifdef __WIN16__
-        #include "wx/generic/treectlg.h"
-    #else
         #include "wx/msw/treectrl.h"
         #include "wx/msw/treectrl.h"
-    #endif
 #elif defined(__WXMOTIF__)
     #include "wx/generic/treectlg.h"
 #elif defined(__WXGTK__)
 #elif defined(__WXMOTIF__)
     #include "wx/generic/treectlg.h"
 #elif defined(__WXGTK__)
index 6a047fe88acc8bec9502e4ad2d9c6c29e0082f1a..f0eea9f373b9c6d354d26e722bd5f0ad64f3195e 100644 (file)
 
 /* check whether we have wchar_t and which size it is if we do */
 #if !defined(wxUSE_WCHAR_T)
 
 /* check whether we have wchar_t and which size it is if we do */
 #if !defined(wxUSE_WCHAR_T)
-    #if defined(__WIN16__)
-        /* no wchar_t under Win16 regadrless of compiler used */
-        #define wxUSE_WCHAR_T 0
-    #elif defined(__UNIX__)
+    #if defined(__UNIX__)
         #if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__)
             #define wxUSE_WCHAR_T 1
         #else
         #if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__)
             #define wxUSE_WCHAR_T 1
         #else
index 489ed36f6590171c1efedc36d13c909bc725a741..f85667d24b7c3dc1b94d4dd7468cdabafbf87aec 100644 (file)
     #include "icons/gauge.xpm"
 #endif
 
     #include "icons/gauge.xpm"
 #endif
 
-#ifdef __WIN16__
-    // Win16 doesn't have them
-    #ifdef wxUSE_SPINBTN
-    #undef wxUSE_SPINBTN
-    #endif
-    #define wxUSE_SPINBTN 0
-#else
-    #ifndef wxUSE_SPINBTN
+#ifndef wxUSE_SPINBTN
     #define wxUSE_SPINBTN 1
     #define wxUSE_SPINBTN 1
-    #endif
-#endif // __WIN16__
+#endif
 
 #include "wx/progdlg.h"
 
 
 #include "wx/progdlg.h"
 
@@ -793,7 +785,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
 
     panel = new wxPanel(m_notebook);
 
 
     panel = new wxPanel(m_notebook);
 
-#if !defined(__WXMOTIF__) && !defined(__WIN16__)  // wxStaticBitmap not working under Motif yet; and icons not allowed under WIN16.
+#if !defined(__WXMOTIF__) // wxStaticBitmap not working under Motif yet.
     wxIcon icon = wxArtProvider::GetIcon(wxART_INFORMATION);
     (void) new wxStaticBitmap( panel, wxID_ANY, icon, wxPoint(10, 10) );
 
     wxIcon icon = wxArtProvider::GetIcon(wxART_INFORMATION);
     (void) new wxStaticBitmap( panel, wxID_ANY, icon, wxPoint(10, 10) );
 
index c2f40aa6d6320dbe2bfa3f3950fe44526e63af3b..1328a8fe7b1bf50acc8c4101e61683af1ceb04e7 100644 (file)
@@ -33,7 +33,7 @@ bool MyApp::OnInit()
 
     // Problem with generic wxNotebook implementation whereby it doesn't size
     // properly unless you set the size again
 
     // Problem with generic wxNotebook implementation whereby it doesn't size
     // properly unless you set the size again
-#if defined(__WIN16__) || defined(__WXMOTIF__)
+#if defined(__WXMOTIF__)
     int width, height;
     frame->GetSize(& width, & height);
     frame->SetSize(-1, -1, width, height);
     int width, height;
     frame->GetSize(& width, & height);
     frame->SetSize(-1, -1, width, height);
index dfad53794b6a76859b52d7794fdfe6ae66843595..53667862aa2d8f10552e3a548bc87a264412595b 100644 (file)
@@ -390,10 +390,8 @@ void wxPrintData::ConvertToNative()
 
         //// Collation
 
 
         //// Collation
 
-#ifndef __WIN16__
         devMode->dmCollate = (m_printCollate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE);
         devMode->dmFields |= DM_COLLATE;
         devMode->dmCollate = (m_printCollate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE);
         devMode->dmFields |= DM_COLLATE;
-#endif
 
         //// Number of copies
 
 
         //// Number of copies
 
@@ -516,7 +514,6 @@ void wxPrintData::ConvertFromNative()
 
         //// Collation
 
 
         //// Collation
 
-#ifndef __WIN16__
         if (devMode->dmFields & DM_COLLATE)
         {
             if (devMode->dmCollate == DMCOLLATE_TRUE)
         if (devMode->dmFields & DM_COLLATE)
         {
             if (devMode->dmCollate == DMCOLLATE_TRUE)
@@ -524,7 +521,6 @@ void wxPrintData::ConvertFromNative()
             else
                 m_printCollate = FALSE;
         }
             else
                 m_printCollate = FALSE;
         }
-#endif
 
         //// Number of copies
 
 
         //// Number of copies
 
index 9b5612a4b0a2a7e976c009a278d5312172484c64..535a272f1ec2794b0c93c80ed18448f2a143e4cb 100644 (file)
@@ -88,11 +88,7 @@ wxConfigBase *wxConfigBase::Create()
   if ( ms_bAutoCreate && ms_pConfig == NULL ) {
     ms_pConfig =
     #if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
   if ( ms_bAutoCreate && ms_pConfig == NULL ) {
     ms_pConfig =
     #if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
-      #ifdef __WIN32__
         new wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName());
         new wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName());
-      #else  //WIN16
-        new wxIniConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName());
-      #endif
     #else // either we're under Unix or wish to use files even under Windows
       new wxFileConfig(wxTheApp->GetAppName());
     #endif
     #else // either we're under Unix or wish to use files even under Windows
       new wxFileConfig(wxTheApp->GetAppName());
     #endif
index 02e83a3506b124d5a71fdae287a745967f8a614f..0659a8b565749e16a65c9cdee72522d8ef9c941e 100644 (file)
@@ -585,7 +585,7 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
     }
 
 #elif defined(__WINDOWS__) && !defined(__WXMICROWIN__)
     }
 
 #elif defined(__WINDOWS__) && !defined(__WXMICROWIN__)
-#ifdef __WIN32__
+
     if ( dir.empty() )
     {
         if ( !::GetTempPath(MAX_PATH, wxStringBuffer(dir, MAX_PATH + 1)) )
     if ( dir.empty() )
     {
         if ( !::GetTempPath(MAX_PATH, wxStringBuffer(dir, MAX_PATH + 1)) )
@@ -612,12 +612,6 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
 
         path.clear();
     }
 
         path.clear();
     }
-#else // Win16
-    if ( !::GetTempFileName(NULL, prefix, 0, wxStringBuffer(path, 1025)) )
-    {
-        path.clear();
-    }
-#endif // Win32/16
 
 #else // !Windows
     if ( dir.empty() )
 
 #else // !Windows
     if ( dir.empty() )
index 4da49d8fe959ee21f37fecf98ac655c5bba88c75..9ec3b7ae46373087ce446b4ad08f549f1c20a779 100644 (file)
@@ -721,12 +721,7 @@ static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz)
 unsigned long wxSysErrorCode()
 {
 #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
 unsigned long wxSysErrorCode()
 {
 #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
-#ifdef  __WIN32__
     return ::GetLastError();
     return ::GetLastError();
-#else   //WIN16
-    // TODO what to do on Windows 3.1?
-    return 0;
-#endif  //WIN16/32
 #else   //Unix
     return errno;
 #endif  //Win/Unix
 #else   //Unix
     return errno;
 #endif  //Win/Unix
@@ -739,7 +734,6 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
         nErrCode = wxSysErrorCode();
 
 #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
         nErrCode = wxSysErrorCode();
 
 #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
-#ifdef  __WIN32__
     static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
 
     // get error message from system
     static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
 
     // get error message from system
@@ -771,11 +765,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
     }
 
     return s_szBuf;
     }
 
     return s_szBuf;
-#else   //Win16
-    // TODO
-    return NULL;
-#endif // Win16/32
-#else   // Unix
+#else   // Unix-WXMICROWIN
 #if wxUSE_UNICODE
     static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
     wxConvCurrent->MB2WC(s_szBuf, strerror(nErrCode), WXSIZEOF(s_szBuf) -1);
 #if wxUSE_UNICODE
     static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
     wxConvCurrent->MB2WC(s_szBuf, strerror(nErrCode), WXSIZEOF(s_szBuf) -1);
@@ -783,7 +773,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
 #else
     return strerror((int)nErrCode);
 #endif
 #else
     return strerror((int)nErrCode);
 #endif
-#endif  // Win/Unix
+#endif  // Win/Unix-WXMICROWIN
 }
 
 #endif // wxUSE_LOG
 }
 
 #endif // wxUSE_LOG
index 4cf521922f37eb460e50adff15dbf31403eca3b1..b4d296e619b9da167e1acbd18692aefc300feb3c 100644 (file)
@@ -168,7 +168,7 @@ bool wxGenericValidator::TransferToWindow(void)
         }
     } else
 #endif
         }
     } else
 #endif
-#if wxUSE_SPINCTRL && !defined(__WIN16__) && !defined(__WXMOTIF__)
+#if wxUSE_SPINCTRL && !defined(__WXMOTIF__)
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
     {
         wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow;
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
     {
         wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow;
@@ -179,7 +179,7 @@ bool wxGenericValidator::TransferToWindow(void)
         }
     } else
 #endif
         }
     } else
 #endif
-#if wxUSE_SPINBTN && !defined(__WIN16__)
+#if wxUSE_SPINBTN
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
     {
         wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
     {
         wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
@@ -284,7 +284,7 @@ bool wxGenericValidator::TransferToWindow(void)
     } else
 #endif
     // array controls
     } else
 #endif
     // array controls
-#if wxUSE_CHECKLISTBOX && !defined(__WIN16__)
+#if wxUSE_CHECKLISTBOX
     // NOTE: wxCheckListBox is a wxListBox, so wxCheckListBox MUST come first:
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
     {
     // NOTE: wxCheckListBox is a wxListBox, so wxCheckListBox MUST come first:
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
     {
@@ -398,7 +398,7 @@ bool wxGenericValidator::TransferFromWindow(void)
     }
   } else
 #endif
     }
   } else
 #endif
-#if wxUSE_SPINCTRL && !defined(__WIN16__) && !defined(__WXMOTIF__)
+#if wxUSE_SPINCTRL && !defined(__WXMOTIF__)
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
     {
         wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow;
     if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinCtrl)) )
     {
         wxSpinCtrl* pControl = (wxSpinCtrl*) m_validatorWindow;
@@ -409,7 +409,7 @@ bool wxGenericValidator::TransferFromWindow(void)
         }
     } else
 #endif
         }
     } else
 #endif
-#if wxUSE_SPINBTN && !defined(__WIN16__)
+#if wxUSE_SPINBTN
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
   {
     wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
   {
     wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
@@ -502,7 +502,6 @@ bool wxGenericValidator::TransferFromWindow(void)
 #endif
   // array controls
 #if wxUSE_CHECKLISTBOX
 #endif
   // array controls
 #if wxUSE_CHECKLISTBOX
-#ifndef __WIN16__
   // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first:
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
   {
   // NOTE: wxCheckListBox isa wxListBox, so wxCheckListBox MUST come first:
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxCheckListBox)) )
   {
@@ -527,7 +526,6 @@ bool wxGenericValidator::TransferFromWindow(void)
       return FALSE;
   } else
 #endif
       return FALSE;
   } else
 #endif
-#endif
 #if wxUSE_LISTBOX
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
   {
 #if wxUSE_LISTBOX
   if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
   {
index 9d85126a322db80393697981008b19e9f3e994df..79f7c116a79fc13c19b0293ddb89f9c6c46c9bf2 100644 (file)
@@ -713,18 +713,9 @@ bool wxVariantDataChar::Read(wxString& str)
  * wxVariantDataString
  */
 
  * wxVariantDataString
  */
 
-#if defined(__BORLANDC__) && defined(__WIN16__)
-// Change name because of truncation
-#define wxVariantDataString wxVariantStringData
-#endif
-
 class WXDLLIMPEXP_BASE wxVariantDataString: public wxVariantData
 {
 class WXDLLIMPEXP_BASE wxVariantDataString: public wxVariantData
 {
-#if defined(__BORLANDC__) && defined(__WIN16__)
-DECLARE_DYNAMIC_CLASS(wxVariantStringData)
-#else
 DECLARE_DYNAMIC_CLASS(wxVariantDataString)
 DECLARE_DYNAMIC_CLASS(wxVariantDataString)
-#endif
 public:
     wxVariantDataString() { }
     wxVariantDataString(const wxString& value) { m_value = value; }
 public:
     wxVariantDataString() { }
     wxVariantDataString(const wxString& value) { m_value = value; }
@@ -816,11 +807,7 @@ bool wxVariantDataString::Read(wxString& str)
     return TRUE;
 }
 
     return TRUE;
 }
 
-#if defined(__BORLANDC__) && defined(__WIN16__)
-IMPLEMENT_DYNAMIC_CLASS(wxVariantStringData, wxVariantData)
-#else
 IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
 IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
-#endif
 
 /*
  * wxVariantDataVoidPtr
 
 /*
  * wxVariantDataVoidPtr
index cc0e2bad48366147fd31b9f99f46dd9b64e392c3..358131f241f007791e9f37f1ae8b7be32905fc12 100644 (file)
@@ -236,11 +236,7 @@ wxImage wxXPMDecoder::ReadFile(wxInputStream& stream)
      */
     wxImage img = ReadData(xpm_lines);
 
      */
     wxImage img = ReadData(xpm_lines);
 
-#ifdef __WIN16__
-    delete[] (char**) xpm_lines;
-#else
     delete[] xpm_lines;
     delete[] xpm_lines;
-#endif
 
     return img;
 }
 
     return img;
 }
index 678b0d7485e32264eba7181ee2b327c8e3b44e71..6c1a0c423dcd5c25550a4063ebb4571f2e6d023d 100644 (file)
 #endif
 
 enum {
 #endif
 
 enum {
-#ifdef __WIN16__
-    ZSTREAM_BUFFER_SIZE = 4096
-#else
     ZSTREAM_BUFFER_SIZE = 16384
     ZSTREAM_BUFFER_SIZE = 16384
-#endif
 };
 
 //////////////////////
 };
 
 //////////////////////
index 20e90cf378bd9c9de60a7d1e9c0f456268e8d8a1..5890d2dc9ac4be85b99885adaa87d752a69c48e2 100644 (file)
 #include "wx/log.h"
 #include "wx/intl.h"
 
 #include "wx/log.h"
 #include "wx/intl.h"
 
-#ifdef __WIN16__
-#define wxUSE_IMAGE_IN_DRAGIMAGE 0
-#else
 #define wxUSE_IMAGE_IN_DRAGIMAGE 1
 #define wxUSE_IMAGE_IN_DRAGIMAGE 1
-#endif
 
 #if wxUSE_IMAGE_IN_DRAGIMAGE
 #include "wx/image.h"
 
 #if wxUSE_IMAGE_IN_DRAGIMAGE
 #include "wx/image.h"
index 8aac4fa72e2940d38820025f5cd41bd321ef4b05..ea69fbfaf2fe3d5be4cac42eac550996f3d215ac 100644 (file)
@@ -29,7 +29,7 @@
 
 IMPLEMENT_DYNAMIC_CLASS(wxGenericImageList, wxObject)
 
 
 IMPLEMENT_DYNAMIC_CLASS(wxGenericImageList, wxObject)
 
-#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
 /*
  * wxImageList has to be a real class or we have problems with
  * the run-time information.
 /*
  * wxImageList has to be a real class or we have problems with
  * the run-time information.
index c3d62b8f2921bd1a843ad9ace9325275f0ba30c1..6dafd5d0790fb6417bd3a0ffa37d8116db5318e0 100644 (file)
@@ -754,7 +754,6 @@ wxLogDialog::wxLogDialog(wxWindow *parent,
     m_btnDetails = new wxButton(this, wxID_MORE, ms_details + EXPAND_SUFFIX);
     sizerButtons->Add(m_btnDetails, 0, wxCENTRE | wxTOP, MARGIN/2 - 1);
 
     m_btnDetails = new wxButton(this, wxID_MORE, ms_details + EXPAND_SUFFIX);
     sizerButtons->Add(m_btnDetails, 0, wxCENTRE | wxTOP, MARGIN/2 - 1);
 
-#ifndef __WIN16__
     wxBitmap bitmap;
     switch ( style & wxICON_MASK )
     {
     wxBitmap bitmap;
     switch ( style & wxICON_MASK )
     {
@@ -783,7 +782,6 @@ wxLogDialog::wxLogDialog(wxWindow *parent,
             wxFAIL_MSG(_T("incorrect log style"));
     }
     sizerAll->Add(new wxStaticBitmap(this, -1, bitmap), 0);
             wxFAIL_MSG(_T("incorrect log style"));
     }
     sizerAll->Add(new wxStaticBitmap(this, -1, bitmap), 0);
-#endif // !Win16
 
     const wxString& message = messages.Last();
     sizerAll->Add(CreateTextSizer(message), 1,
 
     const wxString& message = messages.Last();
     sizerAll->Add(CreateTextSizer(message), 1,
@@ -862,7 +860,6 @@ void wxLogDialog::CreateDetailsControls()
 
     bool loadedIcons = TRUE;
 
 
     bool loadedIcons = TRUE;
 
-#ifndef __WIN16__
     for ( size_t icon = 0; icon < WXSIZEOF(icons); icon++ )
     {
         wxBitmap bmp = wxArtProvider::GetBitmap(icons[icon], wxART_MESSAGE_BOX,
     for ( size_t icon = 0; icon < WXSIZEOF(icons); icon++ )
     {
         wxBitmap bmp = wxArtProvider::GetBitmap(icons[icon], wxART_MESSAGE_BOX,
@@ -881,7 +878,6 @@ void wxLogDialog::CreateDetailsControls()
     }
 
     m_listctrl->SetImageList(imageList, wxIMAGE_LIST_SMALL);
     }
 
     m_listctrl->SetImageList(imageList, wxIMAGE_LIST_SMALL);
-#endif // !Win16
 
     // and fill it
     wxString fmt = wxLog::GetTimestamp();
 
     // and fill it
     wxString fmt = wxLog::GetTimestamp();
@@ -896,7 +892,6 @@ void wxLogDialog::CreateDetailsControls()
     {
         int image;
 
     {
         int image;
 
-#ifndef __WIN16__
         if ( loadedIcons )
         {
             switch ( m_severity[n] )
         if ( loadedIcons )
         {
             switch ( m_severity[n] )
@@ -914,7 +909,6 @@ void wxLogDialog::CreateDetailsControls()
             }
         }
         else // failed to load images
             }
         }
         else // failed to load images
-#endif // !Win16
         {
             image = -1;
         }
         {
             image = -1;
         }
index 756369436e038ba036d1e2d35e603ab049b60560..719d8bba0d389f8f911810e7cee8a8ae5a3d3bd8 100644 (file)
@@ -162,13 +162,10 @@ int wxNotebook::SetSelection(size_t nPage)
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
-#if defined (__WIN16__)
-    m_tabView->SetTabSelection(nPage);
-#else
     wxNotebookPage* pPage = GetPage(nPage);
 
     m_tabView->SetTabSelection((int) (long) pPage);
     wxNotebookPage* pPage = GetPage(nPage);
 
     m_tabView->SetTabSelection((int) (long) pPage);
-#endif
+
     // TODO
     return 0;
 }
     // TODO
     return 0;
 }
@@ -188,11 +185,7 @@ void wxNotebook::AdvanceSelection(bool bForward)
 bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
-#if defined (__WIN16__)
-       m_tabView->SetTabText(nPage, strText);
-    Refresh();
-    return TRUE;
-#else
+
     wxNotebookPage* page = GetPage(nPage);
     if (page)
     {
     wxNotebookPage* page = GetPage(nPage);
     if (page)
     {
@@ -200,7 +193,7 @@ bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
         Refresh();
         return TRUE;
     }
         Refresh();
         return TRUE;
     }
-#endif
+
     return FALSE;
 }
 
     return FALSE;
 }
 
@@ -208,15 +201,11 @@ wxString wxNotebook::GetPageText(size_t nPage) const
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
-#if defined (__WIN16__)
-    return m_tabView->GetTabText(nPage);
-#else
     wxNotebookPage* page = ((wxNotebook*)this)->GetPage(nPage);
     if (page)
         return m_tabView->GetTabText((int) (long) page);
     else
         return wxEmptyString;
     wxNotebookPage* page = ((wxNotebook*)this)->GetPage(nPage);
     if (page)
         return m_tabView->GetTabText((int) (long) page);
     else
         return wxEmptyString;
-#endif
 }
 
 int wxNotebook::GetPageImage(size_t nPage) const
 }
 
 int wxNotebook::GetPageImage(size_t nPage) const
@@ -269,11 +258,8 @@ bool wxNotebook::DeletePage(size_t nPage)
     }
 
     wxNotebookPage* pPage = GetPage(nPage);
     }
 
     wxNotebookPage* pPage = GetPage(nPage);
-#if defined (__WIN16__)
-    m_tabView->RemoveTab(nPage);
-#else
+
     m_tabView->RemoveTab((int) (long) pPage);
     m_tabView->RemoveTab((int) (long) pPage);
-#endif
 
     m_pages.Remove(pPage);
     delete pPage;
 
     m_pages.Remove(pPage);
     delete pPage;
@@ -286,11 +272,9 @@ bool wxNotebook::DeletePage(size_t nPage)
     else if (m_nSelection > -1)
     {
       m_nSelection = -1;
     else if (m_nSelection > -1)
     {
       m_nSelection = -1;
-#if defined (__WIN16__)
-      m_tabView->SetTabSelection(0, FALSE);
-#else
+
       m_tabView->SetTabSelection((int) (long) GetPage(0), FALSE);
       m_tabView->SetTabSelection((int) (long) GetPage(0), FALSE);
-#endif
+
       if (m_nSelection != 0)
         ChangePage(-1, 0);
     }
       if (m_nSelection != 0)
         ChangePage(-1, 0);
     }
@@ -323,11 +307,8 @@ wxWindow* wxNotebook::DoRemovePage(size_t nPage)
     //    m_pages[nPage]->Lower();
 
     wxNotebookPage* pPage = GetPage(nPage);
     //    m_pages[nPage]->Lower();
 
     wxNotebookPage* pPage = GetPage(nPage);
-#if defined (__WIN16__)
-    m_tabView->RemoveTab(nPage);
-#else
+
     m_tabView->RemoveTab((int) (long) pPage);
     m_tabView->RemoveTab((int) (long) pPage);
-#endif
 
     m_pages.Remove(pPage);
 
 
     m_pages.Remove(pPage);
 
@@ -406,12 +387,8 @@ bool wxNotebook::InsertPage(size_t nPage,
     wxASSERT( pPage != NULL );
     wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
 
     wxASSERT( pPage != NULL );
     wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
 
-// For 16 bit integers (tabs limited to 32768)
-#if defined (__WIN16__)
-    m_tabView->AddTab(nPage, strText);
-#else
     m_tabView->AddTab((int) (long) pPage, strText);
     m_tabView->AddTab((int) (long) pPage, strText);
-#endif
+
     if (!bSelect)
       pPage->Show(FALSE);
 
     if (!bSelect)
       pPage->Show(FALSE);
 
@@ -421,11 +398,8 @@ bool wxNotebook::InsertPage(size_t nPage,
     if (bSelect)
     {
         // This will cause ChangePage to be called, via OnSelPage
     if (bSelect)
     {
         // This will cause ChangePage to be called, via OnSelPage
-#if defined (__WIN16__)
-        m_tabView->SetTabSelection(nPage, TRUE);
-#else
+
         m_tabView->SetTabSelection((int) (long) pPage, TRUE);
         m_tabView->SetTabSelection((int) (long) pPage, TRUE);
-#endif
     }
 
     // some page must be selected: either this one or the first one if there is
     }
 
     // some page must be selected: either this one or the first one if there is
@@ -689,10 +663,6 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId)
 
   wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId());
 
 
   wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId());
 
-#if defined (__WIN16__)
-  int activatePos = activateId;
-  int deactivatePos = deactivateId;
-#else
   // Translate from wxTabView's ids (which aren't position-dependent)
   // to wxNotebook's (which are).
   wxNotebookPage* pActive = (wxNotebookPage*) activateId;
   // Translate from wxTabView's ids (which aren't position-dependent)
   // to wxNotebook's (which are).
   wxNotebookPage* pActive = (wxNotebookPage*) activateId;
@@ -701,7 +671,6 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId)
   int activatePos = m_notebook->FindPagePosition(pActive);
   int deactivatePos = m_notebook->FindPagePosition(pDeactive);
 
   int activatePos = m_notebook->FindPagePosition(pActive);
   int deactivatePos = m_notebook->FindPagePosition(pDeactive);
 
-#endif
   event.SetEventObject(m_notebook);
   event.SetSelection(activatePos);
   event.SetOldSelection(deactivatePos);
   event.SetEventObject(m_notebook);
   event.SetSelection(activatePos);
   event.SetOldSelection(deactivatePos);
@@ -717,10 +686,6 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId)
   {
     wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_notebook->GetId());
 
   {
     wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_notebook->GetId());
 
-#if defined (__WIN16__)
-    int activatePos = activateId;
-    int deactivatePos = deactivateId;
-#else
     // Translate from wxTabView's ids (which aren't position-dependent)
     // to wxNotebook's (which are).
     wxNotebookPage* pActive = (wxNotebookPage*) activateId;
     // Translate from wxTabView's ids (which aren't position-dependent)
     // to wxNotebook's (which are).
     wxNotebookPage* pActive = (wxNotebookPage*) activateId;
@@ -729,7 +694,6 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId)
     int activatePos = m_notebook->FindPagePosition(pActive);
     int deactivatePos = m_notebook->FindPagePosition(pDeactive);
 
     int activatePos = m_notebook->FindPagePosition(pActive);
     int deactivatePos = m_notebook->FindPagePosition(pDeactive);
 
-#endif
     event.SetEventObject(m_notebook);
     event.SetSelection(activatePos);
     event.SetOldSelection(deactivatePos);
     event.SetEventObject(m_notebook);
     event.SetSelection(activatePos);
     event.SetOldSelection(deactivatePos);
index e9ef27266a675f93e470c75a0c17852023357287..624a2f4c7bc65edc13223907e6bd0c08e5220bbc 100644 (file)
@@ -46,7 +46,7 @@
   #include "wx/statline.h"
 #endif
 
   #include "wx/statline.h"
 #endif
 
-#if !defined(__WIN16__) && wxUSE_SPINCTRL
+#if wxUSE_SPINCTRL
 #include "wx/spinctrl.h"
 #endif
 
 #include "wx/spinctrl.h"
 #endif
 
@@ -105,7 +105,7 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
     wxString valStr;
     valStr.Printf(wxT("%ld"), m_value);
     m_spinctrl = new wxSpinCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) );
     wxString valStr;
     valStr.Printf(wxT("%ld"), m_value);
     m_spinctrl = new wxSpinCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) );
-#if !defined(__WIN16__) && wxUSE_SPINCTRL
+#if wxUSE_SPINCTRL
     m_spinctrl->SetRange((int)m_min, (int)m_max);
 #endif
     inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
     m_spinctrl->SetRange((int)m_min, (int)m_max);
 #endif
     inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
index f026ed1b74840cad7508f69c155a841b11ee38ee..b713f12752a95285e8928dc38e373b709656257c 100644 (file)
@@ -670,19 +670,11 @@ void wxSashWindow::SizeWindows()
 void wxSashWindow::InitColours()
 {
     // Shadow colours
 void wxSashWindow::InitColours()
 {
     // Shadow colours
-#ifndef __WIN16__
     m_faceColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
     m_mediumShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
     m_darkShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW);
     m_lightShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT);
     m_hilightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT);
     m_faceColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
     m_mediumShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW);
     m_darkShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW);
     m_lightShadowColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT);
     m_hilightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DHILIGHT);
-#else
-    m_faceColour = wxTheColourDatabase->Find("LIGHT GREY");
-    m_mediumShadowColour = wxTheColourDatabase->Find("GREY");
-    m_darkShadowColour = wxTheColourDatabase->Find("BLACK");
-    m_lightShadowColour = wxTheColourDatabase->Find("LIGHT GREY");
-    m_hilightColour = wxTheColourDatabase->Find("WHITE");
-#endif
 }
 
 void wxSashWindow::SetSashVisible(wxSashEdgePosition edge, bool sash)
 }
 
 void wxSashWindow::SetSashVisible(wxSashEdgePosition edge, bool sash)
index ee996625f141b2a4f188695cf1be4ad76e6ed3e3..97c309222a1461ff9b2d1d874e75fabf99bf4b5b 100644 (file)
@@ -681,7 +681,7 @@ BEGIN_EVENT_TABLE(wxGenericTreeCtrl,wxScrolledWindow)
     EVT_TREE_ITEM_GETTOOLTIP(-1, wxGenericTreeCtrl::OnGetToolTip)
 END_EVENT_TABLE()
 
     EVT_TREE_ITEM_GETTOOLTIP(-1, wxGenericTreeCtrl::OnGetToolTip)
 END_EVENT_TABLE()
 
-#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
+#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
 /*
  * wxTreeCtrl has to be a real class or we have problems with
  * the run-time information.
 /*
  * wxTreeCtrl has to be a real class or we have problems with
  * the run-time information.
index b25c03c146069bac93d02046fe1019f8547704b1..5f82d74601d38830f3e6429b133e420de7fe517a 100644 (file)
@@ -59,10 +59,7 @@ wxAcceleratorRefData::~wxAcceleratorRefData()
 {
   if (m_hAccel)
   {
 {
   if (m_hAccel)
   {
-    // This function not available in WIN16
-#if !defined(__WIN16__)
     DestroyAcceleratorTable((HACCEL) m_hAccel);
     DestroyAcceleratorTable((HACCEL) m_hAccel);
-#endif
   }
   m_hAccel = 0 ;
 }
   }
   m_hAccel = 0 ;
 }
@@ -98,10 +95,8 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
 extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
 
 // Create from an array
 extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
 
 // Create from an array
-#if !defined(__WIN16__)
 wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
 {
 wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
 {
-    // Not available in WIN16
     m_refData = new wxAcceleratorRefData;
 
     ACCEL* arr = new ACCEL[n];
     m_refData = new wxAcceleratorRefData;
 
     ACCEL* arr = new ACCEL[n];
@@ -133,14 +128,6 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]
 
     M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0);
 }
 
     M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0);
 }
-#else // Win16
-wxAcceleratorTable::wxAcceleratorTable(int WXUNUSED(n), const wxAcceleratorEntry WXUNUSED(entries)[])
-{
-    // No, we simply gracefully degrade; we don't expect the
-    // developer to pepper their code with #ifdefs just for this.
-    // wxFAIL_MSG("not implemented");
-}
-#endif // Win32/16
 
 bool wxAcceleratorTable::Ok() const
 {
 
 bool wxAcceleratorTable::Ok() const
 {
index d689dfa1e66841f2709e593e6df81e7095aca7bf..6143dbb8520365c7628e55da3bc9ce480eb463e5 100644 (file)
@@ -276,13 +276,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
 #if wxUSE_OLE || wxUSE_DRAG_AND_DROP
 
 
 #if wxUSE_OLE || wxUSE_DRAG_AND_DROP
 
-#ifdef __WIN16__
-    // for OLE, enlarge message queue to be as large as possible
-    int iMsg = 96;
-    while (!SetMessageQueue(iMsg) && (iMsg -= 8))
-        ;
-#endif // Win16
-
 #if wxUSE_OLE
     // we need to initialize OLE library
 #ifdef __WXWINCE__
 #if wxUSE_OLE
     // we need to initialize OLE library
 #ifdef __WXWINCE__
@@ -326,13 +319,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
     wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100);
 
 
     wxWinHandleHash = new wxWinHashTable(wxKEY_INTEGER, 100);
 
-    // This is to foil optimizations in Visual C++ that throw out dummy.obj.
-    // PLEASE DO NOT ALTER THIS.
-#if defined(__VISUALC__) && defined(__WIN16__) && !defined(WXMAKINGDLL)
-    extern char wxDummyChar;
-    if (wxDummyChar) wxDummyChar++;
-#endif
-
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
     wxSetKeyboardHook(TRUE);
 #endif
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
     wxSetKeyboardHook(TRUE);
 #endif
index 6a2c74a221e869b6b44188143f6376db90f11cd8..37e69a0e5c995feb00b1d272cb520a75011d1d38 100644 (file)
@@ -275,13 +275,7 @@ bool wxBitmap::CopyFromCursor(const wxCursor& cursor)
     if ( !cursor.Ok() )
         return FALSE;
 
     if ( !cursor.Ok() )
         return FALSE;
 
-#ifdef __WIN16__
-    wxFAIL_MSG( _T("don't know how to convert cursor to bitmap") );
-
-    return FALSE;
-#else
     return CopyFromIconOrCursor(cursor);
     return CopyFromIconOrCursor(cursor);
-#endif // Win16
 }
 
 bool wxBitmap::CopyFromIcon(const wxIcon& icon)
 }
 
 bool wxBitmap::CopyFromIcon(const wxIcon& icon)
@@ -291,37 +285,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
     if ( !icon.Ok() )
         return FALSE;
 
     if ( !icon.Ok() )
         return FALSE;
 
-    // GetIconInfo() doesn't exist under Win16 and I don't know any other way
-    // to create a bitmap from icon there - but using this way we won't have
-    // the mask (FIXME)
-#ifdef __WIN16__
-    int width = icon.GetWidth(),
-        height = icon.GetHeight();
-
-    // copy the icon to the bitmap
-    ScreenHDC hdcScreen;
-    HDC hdc = ::CreateCompatibleDC(hdcScreen);
-    HBITMAP hbitmap = ::CreateCompatibleBitmap(hdcScreen, width, height);
-    HBITMAP hbmpOld = (HBITMAP)::SelectObject(hdc, hbitmap);
-
-    ::DrawIcon(hdc, 0, 0, GetHiconOf(icon));
-
-    ::SelectObject(hdc, hbmpOld);
-    ::DeleteDC(hdc);
-
-    wxBitmapRefData *refData = new wxBitmapRefData;
-    m_refData = refData;
-
-    refData->m_width = width;
-    refData->m_height = height;
-    refData->m_depth = wxDisplayDepth();
-
-    refData->m_hBitmap = (WXHBITMAP)hbitmap;
-
-    return TRUE;
-#else // Win32
     return CopyFromIconOrCursor(icon);
     return CopyFromIconOrCursor(icon);
-#endif // Win16/Win32
 }
 
 #if wxUSE_WXDIB
 }
 
 #if wxUSE_WXDIB
index 63fc43ac088e8f11c4ff5d5361e6fc172aaf182b..a043aa174aaaa9576498f2cdd2182f290989c58c 100644 (file)
 // macros
 // ---------------------------------------------------------------------------
 
 // macros
 // ---------------------------------------------------------------------------
 
-// under Win16 the caret APIs are void but under Win32 they may return an
-// error code which we want to check - this macro does just this
-#ifdef __WIN16__
-    #define CALL_CARET_API(api, args)   api args
-#else // Win32
-    #define CALL_CARET_API(api, args)   \
+#define CALL_CARET_API(api, args)   \
         if ( !api args )                \
             wxLogLastError(_T(#api))
         if ( !api args )                \
             wxLogLastError(_T(#api))
-#endif // Win16/32
 
 // ===========================================================================
 // implementation
 
 // ===========================================================================
 // implementation
index 47867f2de0d5618825eff64cad08cd781f229d2a..3474192705c36011d987afaabd8a96e747a65915 100644 (file)
@@ -171,14 +171,6 @@ wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex)
   SetMarginWidth(GetDefaultMarginWidth());
 }
 
   SetMarginWidth(GetDefaultMarginWidth());
 }
 
-/*
- * JACS - I've got the owner-draw stuff partially working with WIN16,
- * with a really horrible-looking cross for wxCheckListBox instead of a
- * check - could use a bitmap check-mark instead, defined in wx.rc.
- * Also there's a refresh problem whereby it doesn't always draw the
- * check until you click to the right of it, which is OK for WIN32.
- */
-
 bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc,
                                     wxODAction act, wxODStatus stat)
 {
 bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc,
                                     wxODAction act, wxODStatus stat)
 {
@@ -285,7 +277,6 @@ void wxCheckListBoxItem::Check(bool check)
 
     HWND hwndListbox = (HWND)m_pParent->GetHWND();
 
 
     HWND hwndListbox = (HWND)m_pParent->GetHWND();
 
-    #ifdef __WIN32__
         RECT rcUpdate;
 
         if ( ::SendMessage(hwndListbox, LB_GETITEMRECT,
         RECT rcUpdate;
 
         if ( ::SendMessage(hwndListbox, LB_GETITEMRECT,
@@ -293,16 +284,6 @@ void wxCheckListBoxItem::Check(bool check)
         {
             wxLogDebug(wxT("LB_GETITEMRECT failed"));
         }
         {
             wxLogDebug(wxT("LB_GETITEMRECT failed"));
         }
-    #else // Win16
-        // FIXME this doesn't work if the listbox is scrolled!
-        size_t nHeight = m_pParent->GetItemHeight();
-        size_t y = m_nIndex * nHeight;
-        RECT rcUpdate ;
-        rcUpdate.left   = 0 ;
-        rcUpdate.top    = y ;
-        rcUpdate.right  = GetDefaultMarginWidth() ;
-        rcUpdate.bottom = y + nHeight ;
-    #endif  // Win32/16
 
     InvalidateRect(hwndListbox, &rcUpdate, FALSE);
 }
 
     InvalidateRect(hwndListbox, &rcUpdate, FALSE);
 }
@@ -555,7 +536,6 @@ void wxCheckListBox::OnLeftClick(wxMouseEvent& event)
 
 int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
 {
 
 int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
 {
-  #ifdef __WIN32__
     int nItem = (int)::SendMessage
                              (
                               (HWND)GetHWND(),
     int nItem = (int)::SendMessage
                              (
                               (HWND)GetHWND(),
@@ -563,10 +543,6 @@ int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
                               0,
                               MAKELPARAM(x, y)
                              );
                               0,
                               MAKELPARAM(x, y)
                              );
-  #else // Win16
-    // FIXME this doesn't work when the listbox is scrolled!
-    int nItem = y / m_nItemHeight;
-  #endif // Win32/16
 
   return nItem >= m_noItems ? wxNOT_FOUND : nItem;
 }
 
   return nItem >= m_noItems ? wxNOT_FOUND : nItem;
 }
index 5c06269c927f923edc7a99a5d38a0a129ca54df0..842a9c94aa0b5a6ad7808d470e4d7d2432af5404 100644 (file)
@@ -161,7 +161,7 @@ bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
         case CF_BITMAP:
             return ::IsClipboardFormatAvailable(CF_DIB) != 0;
 
         case CF_BITMAP:
             return ::IsClipboardFormatAvailable(CF_DIB) != 0;
 
-#if wxUSE_ENH_METAFILE && !defined(__WIN16__) && !defined(__WXWINCE__)
+#if wxUSE_ENH_METAFILE && !defined(__WXWINCE__)
         case CF_METAFILEPICT:
             return ::IsClipboardFormatAvailable(CF_ENHMETAFILE) != 0;
 #endif // wxUSE_ENH_METAFILE
         case CF_METAFILEPICT:
             return ::IsClipboardFormatAvailable(CF_ENHMETAFILE) != 0;
 #endif // wxUSE_ENH_METAFILE
@@ -252,7 +252,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
             }
 #endif // wxUSE_METAFILE
 
             }
 #endif // wxUSE_METAFILE
 
-#if wxUSE_ENH_METAFILE && !defined(__WIN16__) && !defined(__WXWINCE__)
+#if wxUSE_ENH_METAFILE && !defined(__WXWINCE__)
         case wxDF_ENHMETAFILE:
             {
                 wxEnhMetaFile *emf = (wxEnhMetaFile *)data;
         case wxDF_ENHMETAFILE:
             {
                 wxEnhMetaFile *emf = (wxEnhMetaFile *)data;
index 7c60aa5121b47135b369ad7036e5026d13a9f935..26ef863e24eb805e34acc969e25dfde012b45854 100644 (file)
@@ -581,13 +581,7 @@ void wxComboBox::SetSelection(long from, long to)
       toChar = -1;
     }
 
       toChar = -1;
     }
 
-    if (
-#ifdef __WIN32__
-    SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar))
-#else // Win16
-    SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)fromChar, (LPARAM)toChar)
-#endif
-        == CB_ERR )
+    if ( SendMessage(hWnd, CB_SETEDITSEL, (WPARAM)0, (LPARAM)MAKELONG(fromChar, toChar)) == CB_ERR )
     {
         wxLogDebug(_T("CB_SETEDITSEL failed"));
     }
     {
         wxLogDebug(_T("CB_SETEDITSEL failed"));
     }
index 92af78fd5374fc93b92dd6bf04ec31843f09ca25..343ed9d7a0681185f183ca9ff819a8b6a5c51f06 100644 (file)
@@ -389,7 +389,7 @@ void wxDC::SetClippingHrgn(WXHRGN hrgn)
     // note that we combine the new clipping region with the existing one: this
     // is compatible with what the other ports do and is the documented
     // behaviour now (starting with 2.3.3)
     // note that we combine the new clipping region with the existing one: this
     // is compatible with what the other ports do and is the documented
     // behaviour now (starting with 2.3.3)
-#if defined(__WIN16__) || defined(__WXWINCE__)
+#if defined(__WXWINCE__)
     RECT rectClip;
     if ( !::GetClipBox(GetHdc(), &rectClip) )
         return;
     RECT rectClip;
     if ( !::GetClipBox(GetHdc(), &rectClip) )
         return;
@@ -405,14 +405,14 @@ void wxDC::SetClippingHrgn(WXHRGN hrgn)
 
     ::DeleteObject(hrgnClipOld);
     ::DeleteObject(hrgnDest);
 
     ::DeleteObject(hrgnClipOld);
     ::DeleteObject(hrgnDest);
-#else // Win32
+#else // !WinCE
     if ( ::ExtSelectClipRgn(GetHdc(), (HRGN)hrgn, RGN_AND) == ERROR )
     {
         wxLogLastError(_T("ExtSelectClipRgn"));
 
         return;
     }
     if ( ::ExtSelectClipRgn(GetHdc(), (HRGN)hrgn, RGN_AND) == ERROR )
     {
         wxLogLastError(_T("ExtSelectClipRgn"));
 
         return;
     }
-#endif // Win16/32
+#endif // WinCE/!WinCE
 
     m_clipping = true;
 
 
     m_clipping = true;
 
@@ -699,8 +699,8 @@ void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1,
 #else
     DrawFrameControl(GetHdc(), &rect, DFC_MENU, DFCS_MENUCHECK);
 #endif
 #else
     DrawFrameControl(GetHdc(), &rect, DFC_MENU, DFCS_MENUCHECK);
 #endif
-#else // Win16
-    // In WIN16, draw a cross
+#else // Symantec-MicroWin
+    // draw a cross
     HPEN blackPen = ::CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
     HPEN whiteBrush = (HPEN)::GetStockObject(WHITE_BRUSH);
     HPEN hPenOld = (HPEN)::SelectObject(GetHdc(), blackPen);
     HPEN blackPen = ::CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
     HPEN whiteBrush = (HPEN)::GetStockObject(WHITE_BRUSH);
     HPEN hPenOld = (HPEN)::SelectObject(GetHdc(), blackPen);
@@ -714,7 +714,7 @@ void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1,
     ::SelectObject(GetHdc(), hPenOld);
     ::SelectObject(GetHdc(), hBrushOld);
     ::DeleteObject(blackPen);
     ::SelectObject(GetHdc(), hPenOld);
     ::SelectObject(GetHdc(), hBrushOld);
     ::DeleteObject(blackPen);
-#endif // Win32/16
+#endif // Win32/Symantec-MicroWin
 
     CalcBoundingBox(x1, y1);
     CalcBoundingBox(x2, y2);
 
     CalcBoundingBox(x1, y1);
     CalcBoundingBox(x2, y2);
index 53542de5ea305ad0c257f2203b31f4ecaab0601c..819514bb60cd22b6b5681589547883c12d7673a4 100644 (file)
@@ -195,13 +195,11 @@ bool wxPrinterDC::StartDoc(const wxString& message)
 
     int ret = ::StartDoc(GetHdc(), &docinfo);
 
 
     int ret = ::StartDoc(GetHdc(), &docinfo);
 
-#ifndef __WIN16__
     if (ret <= 0)
     {
         DWORD lastError = GetLastError();
         wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError);
     }
     if (ret <= 0)
     {
         DWORD lastError = GetLastError();
         wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError);
     }
-#endif
 
     return (ret > 0);
 }
 
     return (ret > 0);
 }
index c9eb8937e2383e0eb091cd13716989dd49a70e82..3ef963a5f5ab6f04570dc341761fe0f3ad186d74 100644 (file)
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
-// these functions require Win32
-#if defined(__WIN16__) && wxUSE_DIALUP_MANAGER
-    #undef wxUSE_DIALUP_MANAGER
-    #define wxUSE_DIALUP_MANAGER 0
-#endif // wxUSE_DIALUP_MANAGER && Win16
-
 #if wxUSE_DIALUP_MANAGER
 
 #ifndef WX_PRECOMP
 #if wxUSE_DIALUP_MANAGER
 
 #ifndef WX_PRECOMP
index 156147b0aec1cb75313198cdc76b338508cf7085..fc9c933185413555fd869da817ce412491b3254f 100644 (file)
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
-// For _A_SUBDIR, etc.
-#if defined(__BORLANDC__) && defined(__WIN16__)
-#include <dos.h>
-#endif
-
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.h"
 #ifndef WX_PRECOMP
     #include "wx/intl.h"
     #include "wx/log.h"
 // define the types and functions used for file searching
 // ----------------------------------------------------------------------------
 
 // define the types and functions used for file searching
 // ----------------------------------------------------------------------------
 
-// under Win16 use compiler-specific functions
-#ifdef __WIN16__
-    #ifdef __VISUALC__
-        #include <dos.h>
-        #include <errno.h>
-
-        typedef struct _find_t FIND_STRUCT;
-    #elif defined(__BORLANDC__)
-        #include <dir.h>
-
-        typedef struct ffblk FIND_STRUCT;
-    #else
-        #error "No directory searching functions for this compiler"
-    #endif
-
-    typedef FIND_STRUCT *FIND_DATA;
-    typedef char FIND_ATTR;
-
-    static inline FIND_DATA InitFindData() { return (FIND_DATA)NULL; }
-    static inline bool IsFindDataOk(FIND_DATA fd) { return fd != NULL; }
-    static inline void FreeFindData(FIND_DATA fd) { free(fd); }
-
-    static inline FIND_DATA FindFirst(const wxString& spec,
-                                      FIND_STRUCT * WXUNUSED(finddata))
-    {
-        // attribute to find all files
-        static const FIND_ATTR attr = 0x3F;
-
-        FIND_DATA fd = (FIND_DATA)malloc(sizeof(FIND_STRUCT));
-
-        if (
-        #ifdef __VISUALC__
-            _dos_findfirst(spec, attr, fd) == 0
-        #else // Borland
-            findfirst(spec, fd, attr) == 0
-        #endif
-           )
-        {
-            return fd;
-        }
-        else
-        {
-            free(fd);
-
-            return NULL;
-        }
-    }
-
-    static inline bool FindNext(FIND_DATA fd, FIND_STRUCT * WXUNUSED(finddata))
-    {
-        #ifdef __VISUALC__
-            return _dos_findnext(fd) == 0;
-        #else // Borland
-            return findnext(fd) == 0;
-        #endif
-    }
-
-    static const wxChar *GetNameFromFindData(FIND_STRUCT *finddata)
-    {
-        #ifdef __VISUALC__
-            return finddata->name;
-        #else // Borland
-            return finddata->ff_name;
-        #endif
-    }
-
-    static const FIND_ATTR GetAttrFromFindData(FIND_STRUCT *finddata)
-    {
-        #ifdef __VISUALC__
-            return finddata->attrib;
-        #else // Borland
-            return finddata->ff_attrib;
-        #endif
-    }
+typedef WIN32_FIND_DATA FIND_STRUCT;
+typedef HANDLE FIND_DATA;
+typedef DWORD FIND_ATTR;
 
 
-    static inline bool IsDir(FIND_ATTR attr)
-    {
-        return (attr & _A_SUBDIR) != 0;
-    }
-
-    static inline bool IsHidden(FIND_ATTR attr)
-    {
-        return (attr & (_A_SYSTEM | _A_HIDDEN)) != 0;
-    }
-#else // Win32
-    typedef WIN32_FIND_DATA FIND_STRUCT;
-    typedef HANDLE FIND_DATA;
-    typedef DWORD FIND_ATTR;
-
-    static inline FIND_DATA InitFindData() { return INVALID_HANDLE_VALUE; }
+static inline FIND_DATA InitFindData() { return INVALID_HANDLE_VALUE; }
 
 
-    static inline bool IsFindDataOk(FIND_DATA fd)
-    {
+static inline bool IsFindDataOk(FIND_DATA fd)
+{
         return fd != INVALID_HANDLE_VALUE;
         return fd != INVALID_HANDLE_VALUE;
-    }
+}
 
 
-    static inline void FreeFindData(FIND_DATA fd)
-    {
+static inline void FreeFindData(FIND_DATA fd)
+{
         if ( !::FindClose(fd) )
         {
             wxLogLastError(_T("FindClose"));
         }
         if ( !::FindClose(fd) )
         {
             wxLogLastError(_T("FindClose"));
         }
-    }
+}
 
 
-    static inline FIND_DATA FindFirst(const wxString& spec,
+static inline FIND_DATA FindFirst(const wxString& spec,
                                       FIND_STRUCT *finddata)
                                       FIND_STRUCT *finddata)
-    {
+{
         return ::FindFirstFile(spec, finddata);
         return ::FindFirstFile(spec, finddata);
-    }
+}
 
 
-    static inline bool FindNext(FIND_DATA fd, FIND_STRUCT *finddata)
-    {
+static inline bool FindNext(FIND_DATA fd, FIND_STRUCT *finddata)
+{
         return ::FindNextFile(fd, finddata) != 0;
         return ::FindNextFile(fd, finddata) != 0;
-    }
+}
 
 
-    static const wxChar *GetNameFromFindData(FIND_STRUCT *finddata)
-    {
+static const wxChar *GetNameFromFindData(FIND_STRUCT *finddata)
+{
         return finddata->cFileName;
         return finddata->cFileName;
-    }
+}
 
 
-    static const FIND_ATTR GetAttrFromFindData(FIND_STRUCT *finddata)
-    {
+static const FIND_ATTR GetAttrFromFindData(FIND_STRUCT *finddata)
+{
         return finddata->dwFileAttributes;
         return finddata->dwFileAttributes;
-    }
+}
 
 
-    static inline bool IsDir(FIND_ATTR attr)
-    {
+static inline bool IsDir(FIND_ATTR attr)
+{
         return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0;
         return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0;
-    }
+}
 
 
-    static inline bool IsHidden(FIND_ATTR attr)
-    {
+static inline bool IsHidden(FIND_ATTR attr)
+{
         return (attr & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) != 0;
         return (attr & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) != 0;
-    }
-#endif // __WIN16__
+}
 
 // ----------------------------------------------------------------------------
 // constants
 
 // ----------------------------------------------------------------------------
 // constants
@@ -268,12 +177,8 @@ bool wxDirData::Read(wxString *filename)
 {
     bool first = FALSE;
 
 {
     bool first = FALSE;
 
-#ifdef __WIN32__
     WIN32_FIND_DATA finddata;
     #define PTR_TO_FINDDATA (&finddata)
     WIN32_FIND_DATA finddata;
     #define PTR_TO_FINDDATA (&finddata)
-#else // Win16
-    #define PTR_TO_FINDDATA (m_finddata)
-#endif
 
     if ( !IsFindDataOk(m_finddata) )
     {
 
     if ( !IsFindDataOk(m_finddata) )
     {
index 4829376c7c7f75dfe6ab8afaba18a12c7af15f45..b4a58ed66a4d0fd97354b852cf6f1bf8f7d24766 100644 (file)
@@ -28,9 +28,3 @@
 
 #include "wx/msw/msvcrt.h"
 
 
 #include "wx/msw/msvcrt.h"
 
-// Foils optimizations in Visual C++ (see also app.cpp). Without it,
-// dummy.obj isn't linked and we get a linker error.
-#if defined(__VISUALC__) && defined(__WIN16__)
-    char wxDummyChar = 0;
-#endif
-
index ee3382628cd7b12fca2236a107144016f8e1f54a..bffa169a38132b42559e9a026486a625e782b2d3 100644 (file)
@@ -95,12 +95,8 @@ int wxFontDialog::ShowModal()
     // CF_ANSIONLY flag is obsolete for Win32
     if ( !m_fontData.GetAllowSymbols() )
     {
     // CF_ANSIONLY flag is obsolete for Win32
     if ( !m_fontData.GetAllowSymbols() )
     {
-#ifdef __WIN16__
-      flags |= CF_ANSIONLY;
-#else // Win32
       flags |= CF_SELECTSCRIPT;
       logFont.lfCharSet = ANSI_CHARSET;
       flags |= CF_SELECTSCRIPT;
       logFont.lfCharSet = ANSI_CHARSET;
-#endif // Win16/32
     }
 
     if ( m_fontData.GetEnableEffects() )
     }
 
     if ( m_fontData.GetEnableEffects() )
index 68c3e999f8c55feaef9447199d8c0eb99f1edf18..7ee7852e0293d01673496f72a2c1f92ffda98ce5 100644 (file)
@@ -163,22 +163,14 @@ void wxFontEnumeratorHelper::DoEnumerate()
 #ifdef __WXWINCE__
     ::EnumFontFamilies(hDC, m_facename, (wxFONTENUMPROC)wxFontEnumeratorProc,
                          (LPARAM)this) ;
 #ifdef __WXWINCE__
     ::EnumFontFamilies(hDC, m_facename, (wxFONTENUMPROC)wxFontEnumeratorProc,
                          (LPARAM)this) ;
-#elif defined(__WIN32__)
+#else // __WIN32__
     LOGFONT lf;
     lf.lfCharSet = m_charset;
     wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
     lf.lfPitchAndFamily = 0;
     ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
                          (LPARAM)this, 0 /* reserved */) ;
     LOGFONT lf;
     lf.lfCharSet = m_charset;
     wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
     lf.lfPitchAndFamily = 0;
     ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
                          (LPARAM)this, 0 /* reserved */) ;
-#else // Win16
-    ::EnumFonts(hDC, (LPTSTR)NULL, (FONTENUMPROC)wxFontEnumeratorProc,
-    #ifdef STRICT
-               (LPARAM)
-    #else
-               (LPSTR)
-    #endif
-               this);
-#endif // Win32/16
+#endif // Win32/CE
 
     ::ReleaseDC(NULL, hDC);
 #endif
 
     ::ReleaseDC(NULL, hDC);
 #endif
index 3f3754a68be1e24d338fb60e872fe694dc6bdd70..72ba895be88e9ab97db486ce46dfb91d66fa0920 100644 (file)
@@ -1306,9 +1306,7 @@ static void MDISetMenu(wxWindow *win, HMENU hmenuFrame, HMENU hmenuWindow)
     wxWindow *parent = win->GetParent();
     wxCHECK_RET( parent, wxT("MDI client without parent frame? weird...") );
 
     wxWindow *parent = win->GetParent();
     wxCHECK_RET( parent, wxT("MDI client without parent frame? weird...") );
 
-#ifndef __WIN16__
     ::SendMessage(GetWinHwnd(win), WM_MDIREFRESHMENU, 0, 0L);
     ::SendMessage(GetWinHwnd(win), WM_MDIREFRESHMENU, 0, 0L);
-#endif
 
     ::DrawMenuBar(GetWinHwnd(parent));
 }
 
     ::DrawMenuBar(GetWinHwnd(parent));
 }
@@ -1396,15 +1394,9 @@ static void RemoveWindowMenu(wxWindow *win, WXHMENU menu)
 static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam,
                               WXWORD *activate, WXHWND *hwndAct, WXHWND *hwndDeact)
 {
 static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam,
                               WXWORD *activate, WXHWND *hwndAct, WXHWND *hwndDeact)
 {
-#ifdef __WIN32__
     *activate = true;
     *hwndAct = (WXHWND)lParam;
     *hwndDeact = (WXHWND)wParam;
     *activate = true;
     *hwndAct = (WXHWND)lParam;
     *hwndDeact = (WXHWND)wParam;
-#else // Win16
-    *activate = (WXWORD)wParam;
-    *hwndAct = (WXHWND)LOWORD(lParam);
-    *hwndDeact = (WXHWND)HIWORD(lParam);
-#endif // Win32/Win16
 }
 
 #endif
 }
 
 #endif
index 4a17c4579be2ee5e406258102ea150b765c9a582..0703b51244c73c007a2ace188e1f69dd121f7852 100644 (file)
@@ -321,12 +321,6 @@ void wxMenuItem::Check(bool check)
                 node->GetData()->m_isChecked = FALSE;
             }
 
                 node->GetData()->m_isChecked = FALSE;
             }
 
-            // we also have to do it in the menu for Win16 (under Win32
-            // CheckMenuRadioItem() does it for us)
-#ifndef __WIN32__
-            ::CheckMenuItem(hmenu, n, n == pos ? MF_CHECKED : MF_UNCHECKED);
-#endif // Win16
-
             node = node->GetNext();
         }
     }
             node = node->GetNext();
         }
     }
index 78eb544ea93a131891a3129d7d36293b1f7461c6..bd6edf88f5f84fd5eac096a9ac904a91a19ada81 100644 (file)
@@ -22,9 +22,6 @@
 
 #if wxUSE_MIMETYPE
 
 
 #if wxUSE_MIMETYPE
 
-// Doesn't compile in WIN16 mode
-#ifndef __WIN16__
-
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #if wxUSE_GUI
 #ifndef WX_PRECOMP
     #include "wx/string.h"
     #if wxUSE_GUI
@@ -822,7 +819,4 @@ bool wxFileTypeImpl::RemoveDescription()
     return !rkey.Exists() || rkey.DeleteSelf();
 }
 
     return !rkey.Exists() || rkey.DeleteSelf();
 }
 
-#endif
-  // __WIN16__
-
 #endif // wxUSE_MIMETYPE
 #endif // wxUSE_MIMETYPE
index d7387012f2889df4a6db5dcfeb02af5660044e84..d3210c96b99ec1209c37e8db04016d2b96d3bf6d 100644 (file)
 #include "wx/printdlg.h"
 #include "wx/dcprint.h"
 
 #include "wx/printdlg.h"
 #include "wx/dcprint.h"
 
-// Have to emulate page setup dialog for Win16
-#if !defined(__WIN95__)
-    #include "wx/generic/prntdlgg.h"
-#endif
-
 #include <stdlib.h>
 
 #include "wx/msw/private.h"
 #include <stdlib.h>
 
 #include "wx/msw/private.h"
index 96f4803110b9aa557403689f578971e8f1d27eed..3cf326adf75e2b716b4199462d064051e087c233 100644 (file)
@@ -158,9 +158,7 @@ bool wxRadioButton::Create(wxWindow *parent,
 
 void wxRadioButton::SetValue(bool value)
 {
 
 void wxRadioButton::SetValue(bool value)
 {
-    // BST_CHECKED is defined as 1, BST_UNCHECKED as 0, so we can just pass
-    // value as is (we don't use BST_XXX here as they're not defined for Win16)
-    (void)::SendMessage(GetHwnd(), BM_SETCHECK, (WPARAM)value, 0L);
+    (void)::SendMessage(GetHwnd(), BM_SETCHECK, (value?BST_CHECKED:BST_UNCHECKED), 0L);
 
     m_isChecked = value;
 
 
     m_isChecked = value;
 
index 39a13a4bc4a8e4f79ac6845fc44a97e00d830cf7..cb302531f976372622a38891e33c5b631be3d806 100644 (file)
@@ -33,8 +33,6 @@
 
 #include "wx/config.h"
 
 
 #include "wx/config.h"
 
-#ifndef __WIN16__
-
 #include "wx/msw/registry.h"
 #include "wx/msw/regconf.h"
 
 #include "wx/msw/registry.h"
 #include "wx/msw/regconf.h"
 
@@ -729,8 +727,5 @@ bool wxRegConfig::DeleteAll()
   return bOk;
 }
 
   return bOk;
 }
 
-#endif
-  // __WIN16__
-
 #endif
   // wxUSE_CONFIG
 #endif
   // wxUSE_CONFIG
index 4ff31ef0f7b78d588c2707c6d815523ef4b52822..a5edd5cb498398971f0c91cbf1b2b6677408635a 100644 (file)
@@ -421,7 +421,6 @@ void wxRegionIterator::Reset(const wxRegion& region)
         m_numRects = 0;
     else
     {
         m_numRects = 0;
     else
     {
-#if defined(__WIN32__)
         DWORD noBytes = ::GetRegionData(((wxRegionRefData*)region.m_refData)->m_region, 0, NULL);
         RGNDATA *rgnData = (RGNDATA*) new char[noBytes];
         ::GetRegionData(((wxRegionRefData*)region.m_refData)->m_region, noBytes, rgnData);
         DWORD noBytes = ::GetRegionData(((wxRegionRefData*)region.m_refData)->m_region, 0, NULL);
         RGNDATA *rgnData = (RGNDATA*) new char[noBytes];
         ::GetRegionData(((wxRegionRefData*)region.m_refData)->m_region, noBytes, rgnData);
@@ -442,17 +441,6 @@ void wxRegionIterator::Reset(const wxRegion& region)
         m_numRects = header->nCount;
 
         delete[] (char*) rgnData;
         m_numRects = header->nCount;
 
         delete[] (char*) rgnData;
-#else // Win16
-        RECT rect;
-        ::GetRgnBox(((wxRegionRefData*)region.m_refData)->m_region, &rect);
-        m_rects = new wxRect[1];
-        m_rects[0].x = rect.left;
-        m_rects[0].y = rect.top;
-        m_rects[0].width = rect.right - rect.left;
-        m_rects[0].height = rect.bottom - rect.top;
-
-        m_numRects = 1;
-#endif // Win32/16
     }
 }
 
     }
 }
 
index 72515030b03c476f2f708a74b1183a5aa8a6c992..b2a25f43918594b2c1e749af7a23f0a6c7cf0827 100644 (file)
@@ -28,8 +28,6 @@
 #include  "wx/intl.h"
 #include  "wx/log.h"
 
 #include  "wx/intl.h"
 #include  "wx/log.h"
 
-#ifndef __WIN16__
-
 // Windows headers
 /*
 #define   STRICT
 // Windows headers
 /*
 #define   STRICT
@@ -321,8 +319,6 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys,
                           size_t *pnValues,
                           size_t *pnMaxValueLen) const
 {
                           size_t *pnValues,
                           size_t *pnMaxValueLen) const
 {
-#if defined(__WIN32__)
-
     // old gcc headers incorrectly prototype RegQueryInfoKey()
 #if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
     #define REG_PARAM   (size_t *)
     // old gcc headers incorrectly prototype RegQueryInfoKey()
 #if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
     #define REG_PARAM   (size_t *)
@@ -362,11 +358,6 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys,
   }
 
   return TRUE;
   }
 
   return TRUE;
-#else // Win16
-  wxFAIL_MSG("GetKeyInfo() not implemented");
-
-  return FALSE;
-#endif
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -708,7 +699,6 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
   if ( !Open() )
     return FALSE;
 
   if ( !Open() )
     return FALSE;
 
-#if defined(__WIN32__)
     m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue);
 
     // deleting a value which doesn't exist is not considered an error
     m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue);
 
     // deleting a value which doesn't exist is not considered an error
@@ -718,18 +708,6 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
                     szValue, GetName().c_str());
       return FALSE;
     }
                     szValue, GetName().c_str());
       return FALSE;
     }
-#else   //WIN16
-    // named registry values don't exist in Win16 world
-    wxASSERT( IsEmpty(szValue) );
-
-    // just set the (default and unique) value of the key to ""
-    m_dwLastError = RegSetValue((HKEY) m_hKey, NULL, REG_SZ, "", RESERVED);
-    if ( m_dwLastError != ERROR_SUCCESS ) {
-      wxLogSysError(m_dwLastError, _("Can't delete value of key '%s'"),
-                    GetName().c_str());
-      return FALSE;
-    }
-#endif  //WIN16/32
 
   return TRUE;
 }
 
   return TRUE;
 }
@@ -744,7 +722,6 @@ bool wxRegKey::HasValue(const wxChar *szValue) const
   // this function should be silent, so suppress possible messages from Open()
   wxLogNull nolog;
 
   // this function should be silent, so suppress possible messages from Open()
   wxLogNull nolog;
 
-  #ifdef  __WIN32__
     if ( !CONST_CAST Open() )
         return FALSE;
 
     if ( !CONST_CAST Open() )
         return FALSE;
 
@@ -753,10 +730,6 @@ bool wxRegKey::HasValue(const wxChar *szValue) const
                                    RESERVED,
                                    NULL, NULL, NULL);
     return dwRet == ERROR_SUCCESS;
                                    RESERVED,
                                    NULL, NULL, NULL);
     return dwRet == ERROR_SUCCESS;
-  #else   // WIN16
-    // only unnamed value exists
-    return IsEmpty(szValue);
-  #endif  // WIN16/32
 }
 
 // returns TRUE if this key has any values
 }
 
 // returns TRUE if this key has any values
@@ -797,7 +770,6 @@ bool wxRegKey::HasSubKey(const wxChar *szKey) const
 
 wxRegKey::ValueType wxRegKey::GetValueType(const wxChar *szValue) const
 {
 
 wxRegKey::ValueType wxRegKey::GetValueType(const wxChar *szValue) const
 {
-  #ifdef  __WIN32__
     if ( ! CONST_CAST Open() )
       return Type_None;
 
     if ( ! CONST_CAST Open() )
       return Type_None;
 
@@ -811,9 +783,6 @@ wxRegKey::ValueType wxRegKey::GetValueType(const wxChar *szValue) const
     }
 
     return (ValueType)dwType;
     }
 
     return (ValueType)dwType;
-  #else   //WIN16
-    return IsEmpty(szValue) ? Type_String : Type_None;
-  #endif  //WIN16/32
 }
 
 #ifdef  __WIN32__
 }
 
 #ifdef  __WIN32__
@@ -862,7 +831,7 @@ bool wxRegKey::QueryValue(const wxChar *szValue,
                           bool raw) const
 {
   if ( CONST_CAST Open() ) {
                           bool raw) const
 {
   if ( CONST_CAST Open() ) {
-    #ifdef  __WIN32__
+
       // first get the type and size of the data
       DWORD dwType, dwSize;
       m_dwLastError = RegQueryValueEx((HKEY) m_hKey, WXSTRINGCAST szValue, RESERVED,
       // first get the type and size of the data
       DWORD dwType, dwSize;
       m_dwLastError = RegQueryValueEx((HKEY) m_hKey, WXSTRINGCAST szValue, RESERVED,
@@ -916,15 +885,6 @@ bool wxRegKey::QueryValue(const wxChar *szValue,
           return TRUE;
         }
       }
           return TRUE;
         }
       }
-    #else   //WIN16
-      // named registry values don't exist in Win16
-      wxASSERT( IsEmpty(szValue) );
-
-      m_dwLastError = RegQueryValue((HKEY) m_hKey, 0, strValue.GetWriteBuf(256), &l);
-      strValue.UngetWriteBuf();
-      if ( m_dwLastError == ERROR_SUCCESS )
-        return TRUE;
-    #endif  //WIN16/32
   }
 
   wxLogSysError(m_dwLastError, _("Can't read value of '%s'"),
   }
 
   wxLogSysError(m_dwLastError, _("Can't read value of '%s'"),
@@ -935,20 +895,11 @@ bool wxRegKey::QueryValue(const wxChar *szValue,
 bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue)
 {
   if ( CONST_CAST Open() ) {
 bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue)
 {
   if ( CONST_CAST Open() ) {
-#if defined( __WIN32__)
       m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_SZ,
                                     (RegString)strValue.c_str(),
                                     (strValue.Len() + 1)*sizeof(wxChar));
       if ( m_dwLastError == ERROR_SUCCESS )
         return TRUE;
       m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_SZ,
                                     (RegString)strValue.c_str(),
                                     (strValue.Len() + 1)*sizeof(wxChar));
       if ( m_dwLastError == ERROR_SUCCESS )
         return TRUE;
-#else   //WIN16
-      // named registry values don't exist in Win16
-      wxASSERT( IsEmpty(szValue) );
-
-      m_dwLastError = RegSetValue((HKEY) m_hKey, NULL, REG_SZ, strValue, NULL);
-      if ( m_dwLastError == ERROR_SUCCESS )
-        return TRUE;
-#endif  //WIN16/32
   }
 
   wxLogSysError(m_dwLastError, _("Can't set value of '%s'"),
   }
 
   wxLogSysError(m_dwLastError, _("Can't set value of '%s'"),
@@ -986,7 +937,6 @@ bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
   if ( lIndex == -1 )
     return FALSE;
 
   if ( lIndex == -1 )
     return FALSE;
 
-#if defined( __WIN32__)
     wxChar  szValueName[1024];                  // @@ use RegQueryInfoKey...
     DWORD dwValueLen = WXSIZEOF(szValueName);
 
     wxChar  szValueName[1024];                  // @@ use RegQueryInfoKey...
     DWORD dwValueLen = WXSIZEOF(szValueName);
 
@@ -1011,13 +961,6 @@ bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
     }
 
     strValueName = szValueName;
     }
 
     strValueName = szValueName;
-#else   //WIN16
-    // only one unnamed value
-    wxASSERT( lIndex == 0 );
-
-    lIndex = -1;
-    strValueName.Empty();
-#endif
 
   return TRUE;
 }
 
   return TRUE;
 }
@@ -1125,6 +1068,3 @@ void RemoveTrailingSeparator(wxString& str)
     str.Truncate(str.Len() - 1);
 }
 
     str.Truncate(str.Len() - 1);
 }
 
-#endif
-  // __WIN16__
-
index 13dbf8e2d26e1dd817c2815a2557c953704929f5..a2c3447c996d0b1b8ab90ca095a51c1e5c22acfd 100644 (file)
@@ -141,8 +141,6 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
         // all Windows version, for the other ones we have to check
         bool useDefault;
 
         // all Windows version, for the other ones we have to check
         bool useDefault;
 
-        // none of the is supported under Win16 anyhow
-#ifdef __WIN32__
         int verMaj, verMin;
         wxGetOsVersion(&verMaj, &verMin);
         if ( verMaj < 4 )
         int verMaj, verMin;
         wxGetOsVersion(&verMaj, &verMin);
         if ( verMaj < 4 )
@@ -175,9 +173,6 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
                                }
                        }
        }
                                }
                        }
        }
-#else
-        useDefault = TRUE;
-#endif // __WIN32__
 
         if ( useDefault )
         {
 
         if ( useDefault )
         {
index a367e2df50b31e1e3adf91bcbf12782504f55509..1d6bfd0c7ccd566f0fba52da4b5f4d3253fa7a82 100644 (file)
@@ -111,8 +111,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
 // note that this function will create a new object every time
 // it is called even if the image needs no conversion
 
 // note that this function will create a new object every time
 // it is called even if the image needs no conversion
 
-#ifndef __WIN16__
-
 static wxGDIImage* ConvertImage( const wxGDIImage& bitmap )
 {
     bool isIcon = bitmap.IsKindOf( CLASSINFO(wxIcon) );
 static wxGDIImage* ConvertImage( const wxGDIImage& bitmap )
 {
     bool isIcon = bitmap.IsKindOf( CLASSINFO(wxIcon) );
@@ -139,8 +137,6 @@ static wxGDIImage* ConvertImage( const wxGDIImage& bitmap )
     return new wxIcon( (const wxIcon&)bitmap );
 }
 
     return new wxIcon( (const wxIcon&)bitmap );
 }
 
-#endif
-
 bool wxStaticBitmap::Create(wxWindow *parent,
                             wxWindowID id,
                             const wxGDIImage& bitmap,
 bool wxStaticBitmap::Create(wxWindow *parent,
                             wxWindowID id,
                             const wxGDIImage& bitmap,
@@ -158,25 +154,14 @@ bool wxStaticBitmap::Create(wxWindow *parent,
     wxGDIImage *image = (wxGDIImage *)NULL;
     m_isIcon = bitmap.IsKindOf(CLASSINFO(wxIcon));
 
     wxGDIImage *image = (wxGDIImage *)NULL;
     m_isIcon = bitmap.IsKindOf(CLASSINFO(wxIcon));
 
-#ifdef __WIN16__
-    wxASSERT_MSG( !m_isIcon, "Icons are not supported in wxStaticBitmap under WIN16." );
-    image = &bitmap;
-#else // Win32
     image = ConvertImage( bitmap );
     m_isIcon = image->IsKindOf( CLASSINFO(wxIcon) );
     image = ConvertImage( bitmap );
     m_isIcon = image->IsKindOf( CLASSINFO(wxIcon) );
-#endif // Win16/32
 
     // create the native control
 
     // create the native control
-    if ( !MSWCreateControl(
-#ifdef __WIN32__
-                           _T("STATIC"),
-#else // Win16
-                           _T("BUTTON"),
-#endif // Win32/16
-                           wxEmptyString, pos, size) )
+    if ( !MSWCreateControl(_T("STATIC"), wxEmptyString, pos, size) )
     {
         // control creation failed
     {
         // control creation failed
-        return FALSE;
+        return false;
     }
 
     // no need to delete the new image
     }
 
     // no need to delete the new image
@@ -194,16 +179,12 @@ WXDWORD wxStaticBitmap::MSWGetStyle(long style, WXDWORD *exstyle) const
 {
     WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
 
 {
     WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle);
 
-#ifdef __WIN32__
     // what kind of control are we?
     msStyle |= m_isIcon ? SS_ICON : SS_BITMAP;
 
     // we use SS_CENTERIMAGE to prevent the control from resizing the bitmap to
     // fit to its size -- this is unexpected and doesn't happen in other ports
     msStyle |= SS_CENTERIMAGE;
     // what kind of control are we?
     msStyle |= m_isIcon ? SS_ICON : SS_BITMAP;
 
     // we use SS_CENTERIMAGE to prevent the control from resizing the bitmap to
     // fit to its size -- this is unexpected and doesn't happen in other ports
     msStyle |= SS_CENTERIMAGE;
-#else // Win16
-    msStyle |= BS_OWNERDRAW;
-#endif // Win32/16
 
     return msStyle;
 }
 
     return msStyle;
 }
@@ -276,45 +257,6 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image)
     InvalidateRect(GetHwndOf(GetParent()), &rect, TRUE);
 }
 
     InvalidateRect(GetHwndOf(GetParent()), &rect, TRUE);
 }
 
-// under Win32 we use the standard static control style for this
-#ifdef __WIN16__
-bool wxStaticBitmap::MSWOnDraw(WXDRAWITEMSTRUCT *item)
-{
-    LPDRAWITEMSTRUCT lpDIS = (LPDRAWITEMSTRUCT) item;
-
-    wxCHECK_MSG( !m_isIcon, FALSE, _T("icons not supported in wxStaticBitmap") );
-
-    wxBitmap* bitmap = (wxBitmap *)m_image;
-    if ( !bitmap->Ok() )
-        return FALSE;
-
-    HDC hDC = lpDIS->hDC;
-    HDC memDC = ::CreateCompatibleDC(hDC);
-
-    HBITMAP old = (HBITMAP) ::SelectObject(memDC, (HBITMAP) bitmap->GetHBITMAP());
-
-    if (!old)
-        return FALSE;
-
-    int x = lpDIS->rcItem.left;
-    int y = lpDIS->rcItem.top;
-    int width = lpDIS->rcItem.right - x;
-    int height = lpDIS->rcItem.bottom - y;
-
-    // Centre the bitmap in the control area
-    int x1 = (int) (x + ((width - bitmap->GetWidth()) / 2));
-    int y1 = (int) (y + ((height - bitmap->GetHeight()) / 2));
-
-    ::BitBlt(hDC, x1, y1, bitmap->GetWidth(), bitmap->GetHeight(), memDC, 0, 0, SRCCOPY);
-
-    ::SelectObject(memDC, old);
-
-    ::DeleteDC(memDC);
-
-    return TRUE;
-}
-#endif // Win16
-
 // We need this or the control can never be moved e.g. in Dialog Editor.
 WXLRESULT wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
                                    WXWPARAM wParam,
 // We need this or the control can never be moved e.g. in Dialog Editor.
 WXLRESULT wxStaticBitmap::MSWWindowProc(WXUINT nMsg,
                                    WXWPARAM wParam,
index f558a94b804fff348fb20dbfdb8321d66ec71637..ad62237f603ffe8fc2665965feb4fde01cc063b4 100644 (file)
     #include "wx/wx.h"
 #endif
 
     #include "wx/wx.h"
 #endif
 
-#if wxUSE_TOOLBAR && defined(__WIN16__)
-
-#if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
-    #include "malloc.h"
-#endif
-
-#if !defined(__MWERKS__) && !defined(__SALFORDC__)
-    #include <memory.h>
-#endif
-
-#include <stdlib.h>
-
-#include "wx/msw/tbarmsw.h"
-#include "wx/event.h"
-#include "wx/app.h"
-#include "wx/bitmap.h"
-#include "wx/msw/private.h"
-#include "wx/msw/dib.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-#define DEFAULTBITMAPX   16
-#define DEFAULTBITMAPY   15
-#define DEFAULTBUTTONX   24
-#define DEFAULTBUTTONY   22
-#define DEFAULTBARHEIGHT 27
-
-//
-// States (not all of them currently used)
-//
-#define wxTBSTATE_CHECKED         0x01    // radio button is checked
-#define wxTBSTATE_PRESSED         0x02    // button is being depressed (any style)
-#define wxTBSTATE_ENABLED         0x04    // button is enabled
-#define wxTBSTATE_HIDDEN          0x08    // button is hidden
-#define wxTBSTATE_INDETERMINATE   0x10    // button is indeterminate
-
-// ----------------------------------------------------------------------------
-// private classes
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxToolBarTool : public wxToolBarToolBase
-{
-public:
-    wxToolBarTool(wxToolBar *tbar,
-                  int id,
-                  const wxBitmap& bmpNormal,
-                  const wxBitmap& bmpDisabled,
-                  bool toggle,
-                  wxObject *clientData,
-                  const wxString& shortHelp,
-                  const wxString& longHelp)
-        : wxToolBarToolBase(tbar, id, bmpNormal, bmpDisabled, toggle,
-                            clientData, shortHelp, longHelp)
-    {
-    }
-
-    wxToolBarTool(wxToolBar *tbar, wxControl *control)
-        : wxToolBarToolBase(tbar, control)
-    {
-    }
-
-    void SetSize(const wxSize& size)
-    {
-        m_width = size.x;
-        m_height = size.y;
-    }
-
-    long GetWidth() const { return m_width; }
-    long GetHeight() const { return m_height; }
-
-    wxCoord               m_x;
-    wxCoord               m_y;
-    wxCoord               m_width;
-    wxCoord               m_height;
-};
-
-// ----------------------------------------------------------------------------
-// wxWin macros
-// ----------------------------------------------------------------------------
-
-#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase)
-
-BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase)
-       EVT_PAINT(wxToolBar::OnPaint)
-       EVT_MOUSE_EVENTS(wxToolBar::OnMouseEvent)
-END_EVENT_TABLE()
-#endif
-
-// ============================================================================
-// implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxToolBarTool
-// ----------------------------------------------------------------------------
-
-wxToolBarToolBase *wxToolBar::CreateTool(int id,
-                                         const wxString& label,
-                                         const wxBitmap& bmpNormal,
-                                         const wxBitmap& bmpDisabled,
-                                         wxItemKind kind,
-                                         wxObject *clientData,
-                                         const wxString& shortHelp,
-                                         const wxString& longHelp)
-{
-    return new wxToolBarTool(this, id, label, bmpNormal, bmpDisabled, kind,
-                             clientData, shortHelp, longHelp);
-}
-
-wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control)
-{
-    return new wxToolBarTool(this, control);
-}
-
-// ----------------------------------------------------------------------------
-// wxToolBar
-// ----------------------------------------------------------------------------
-
-void wxToolBar::Init()
-{
-    m_hbrDither = 0;
-    m_rgbFace = 0;
-    m_rgbShadow = 0;
-    m_rgbHilight = 0;
-    m_rgbFrame = 0;
-    m_hdcMono = 0;
-    m_hbmMono = 0;
-    m_hbmDefault = 0;
-
-    m_defaultWidth = DEFAULTBITMAPX;
-    m_defaultHeight = DEFAULTBITMAPY;
-
-    m_xPos =
-    m_yPos = -1;
-
-    m_maxWidth = m_maxHeight = 0;
-    m_pressedTool = m_currentTool = -1;
-    m_toolPacking = 1;
-    m_toolSeparation = 5;
-}
-
-bool wxToolBar::Create(wxWindow *parent,
-                       wxWindowID id,
-                       const wxPoint& pos,
-                       const wxSize& size,
-                       long style,
-                       const wxString& name)
-{
-    if ( !wxWindow::Create(parent, id, pos, size, style, name) )
-        return FALSE;
-
-    if ( style & wxTB_HORIZONTAL )
-    {
-        m_lastX = 3;
-        m_lastY = 7;
-    }
-    else
-    {
-        m_lastX = 7;
-        m_lastY = 3;
-    }
-
-    // Set it to grey
-    SetBackgroundColour(wxColour(192, 192, 192));
-
-    InitGlobalObjects();
-
-    return TRUE;
-}
-
-wxToolBar::~wxToolBar()
-{
-    FreeGlobalObjects();
-}
-
-void wxToolBar::SetToolBitmapSize(const wxSize& size)
-{
-    m_defaultWidth = size.x;
-    m_defaultHeight = size.y;
-
-    FreeGlobalObjects();
-    InitGlobalObjects();
-}
-
-// The button size is bigger than the bitmap size
-wxSize wxToolBar::GetToolSize() const
-{
-    return wxSize(m_defaultWidth + 8, m_defaultHeight + 7);
-}
-
-wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord x, wxCoord y) const
-{
-    wxToolBarToolsList::Node *node = m_tools.GetFirst();
-    while (node)
-    {
-        wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
-        if ((x >= tool->m_x) && (y >= tool->m_y) &&
-            (x <= (tool->m_x + tool->GetWidth())) &&
-            (y <= (tool->m_y + tool->GetHeight())))
-        {
-            return tool;
-        }
-
-        node = node->GetNext();
-    }
-
-    return (wxToolBarToolBase *)NULL;
-}
-
-wxToolBarToolBase *wxToolBar::AddTool(int id,
-                                      const wxBitmap& bitmap,
-                                      const wxBitmap& pushedBitmap,
-                                      bool toggle,
-                                      wxCoord xPos,
-                                      wxCoord yPos,
-                                      wxObject *clientData,
-                                      const wxString& helpString1,
-                                      const wxString& helpString2)
-{
-    // rememeber the position for DoInsertTool()
-    m_xPos = xPos;
-    m_yPos = yPos;
-
-    return wxToolBarBase::AddTool(id, bitmap, pushedBitmap, toggle,
-                                  xPos, yPos, clientData,
-                                  helpString1, helpString2);
-}
-
-void wxToolBar::OnPaint(wxPaintEvent& event)
-{
-    wxPaintDC dc(this);
-
-    static int wxOnPaintCount = 0;
-
-    // Prevent reentry of OnPaint which would cause
-    // wxMemoryDC errors.
-    if (wxOnPaintCount > 0)
-        return;
-    wxOnPaintCount++;
-
-    wxToolBarToolsList::Node *node = m_tools.GetFirst();
-    while (node)
-    {
-        wxToolBarToolBase *tool = node->GetData();
-        if ( tool->GetStyle()!= wxTOOL_STYLE_BUTTON )
-        {
-            int state = tool->IsEnabled() ? wxTBSTATE_ENABLED : 0;
-            if ( tool->IsToggled() )
-                state |= wxTBSTATE_CHECKED;
-
-            DrawTool(dc, tool, state);
-        }
-
-        node = node->GetNext();
-    }
-
-    wxOnPaintCount--;
-}
-
-// If a Button is disabled, then NO function (besides leaving
-// or entering) should be carried out. Therefore the additions
-// of 'enabled' testing (Stefan Hammes).
-void wxToolBar::OnMouseEvent(wxMouseEvent& event)
-{
-    static wxToolBarToolBase *eventCurrentTool = NULL;
-    wxClientDC dc(this);
-
-    if (event.Leaving())
-    {
-        m_currentTool = -1;
-        if (eventCurrentTool && eventCurrentTool->IsEnabled())
-        {
-            ::ReleaseCapture();
-            int state = wxTBSTATE_ENABLED;
-            if (eventCurrentTool->IsToggled())
-                state |= wxTBSTATE_CHECKED;
-            DrawTool(dc, eventCurrentTool, state);
-            eventCurrentTool = NULL;
-        }
-        OnMouseEnter(-1);
-        return;
-    }
-
-    wxCoord x, y;
-    event.GetPosition(&x, &y);
-    wxToolBarToolBase *tool = FindToolForPosition(x, y);
-
-    if (!tool)
-    {
-        if (eventCurrentTool && eventCurrentTool->IsEnabled())
-        {
-            ::ReleaseCapture();
-
-            int state = wxTBSTATE_ENABLED;
-            if (eventCurrentTool->IsToggled())
-                state |= wxTBSTATE_CHECKED;
-            DrawTool(dc, eventCurrentTool, state);
-            eventCurrentTool = NULL;
-        }
-        if (m_currentTool > -1)
-        {
-            m_currentTool = -1;
-            OnMouseEnter(-1);
-        }
-        return;
-    }
-
-    if (!event.Dragging() && !event.IsButton())
-    {
-        if (tool->GetId() != m_currentTool)
-        {
-            OnMouseEnter(m_currentTool = tool->GetId());
-            return;
-        }
-    }
-    if (event.Dragging() && tool->IsEnabled())
-    {
-        if (eventCurrentTool)
-        {
-            // Might have dragged outside tool
-            if (eventCurrentTool != tool)
-            {
-                int state = wxTBSTATE_ENABLED;
-                if (tool->IsToggled())
-                    state |= wxTBSTATE_CHECKED;
-                DrawTool(dc, tool, state);
-                eventCurrentTool = NULL;
-                return;
-            }
-        }
-        else
-        {
-            if (tool && event.LeftIsDown() && tool->IsEnabled())
-            {
-                eventCurrentTool = tool;
-                ::SetCapture((HWND) GetHWND());
-                int state = wxTBSTATE_ENABLED|wxTBSTATE_PRESSED;
-                if (tool->IsToggled())
-                    state |= wxTBSTATE_CHECKED;
-                DrawTool(dc, tool, state);
-            }
-        }
-    }
-    if (event.LeftDown() && tool->IsEnabled())
-    {
-        eventCurrentTool = tool;
-        ::SetCapture((HWND) GetHWND());
-        int state = wxTBSTATE_ENABLED|wxTBSTATE_PRESSED;
-        if (tool->IsToggled())
-            state |= wxTBSTATE_CHECKED;
-        DrawTool(dc, tool, state);
-    }
-    else if (event.LeftUp() && tool->IsEnabled())
-    {
-        if (eventCurrentTool)
-            ::ReleaseCapture();
-        if (eventCurrentTool == tool)
-        {
-            if (tool->CanBeToggled())
-            {
-                tool->Toggle();
-                if (!OnLeftClick(tool->GetId(), tool->IsToggled()))
-                {
-                    tool->Toggle();
-                }
-                int state = wxTBSTATE_ENABLED;
-                if (tool->IsToggled())
-                    state |= wxTBSTATE_CHECKED;
-                DrawTool(dc, tool, state);
-            }
-            else
-            {
-                int state = wxTBSTATE_ENABLED;
-                if (tool->IsToggled())
-                    state |= wxTBSTATE_CHECKED;
-                DrawTool(dc, tool, state);
-                OnLeftClick(tool->GetId(), tool->IsToggled());
-            }
-        }
-        eventCurrentTool = NULL;
-    }
-    else if (event.RightDown() && tool->IsEnabled())
-    {
-        OnRightClick(tool->GetId(), x, y);
-    }
-}
-
-void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool WXUNUSED(enable))
-{
-    DoRedrawTool(tool);
-}
-
-void wxToolBar::DoToggleTool(wxToolBarToolBase *tool, bool WXUNUSED(toggle))
-{
-    DoRedrawTool(tool);
-}
-
-void wxToolBar::DoSetToggle(wxToolBarToolBase * WXUNUSED(tool),
-                            bool WXUNUSED(toggle))
-{
-    // nothing to do
-}
-
-void wxToolBar::DoRedrawTool(wxToolBarToolBase *tool)
-{
-    wxClientDC dc(this);
-
-    DrawTool(dc, tool);
-}
-
-void wxToolBar::DrawTool(wxDC& dc, wxToolBarToolBase *toolBase, int state)
-{
-    wxToolBarTool *tool = (wxToolBarTool *)toolBase;
-
-    DrawButton(dc.GetHDC(),
-               tool->m_x, tool->m_y,
-               tool->GetWidth(), tool->GetHeight(),
-               tool, state);
-}
-
-void wxToolBar::DrawTool(wxDC& dc, wxToolBarToolBase *tool)
-{
-    int state = 0;
-    if (tool->IsEnabled())
-        state |= wxTBSTATE_ENABLED;
-    if (tool->IsToggled())
-        state |= wxTBSTATE_CHECKED;
-    // how can i access the PRESSED state???
-
-    DrawTool(dc, tool, state);
-}
-
-bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos),
-                             wxToolBarToolBase *tool)
-{
-    // VZ: didn't test whether it works, but why not...
-    tool->Detach();
-
-    Refresh();
-
-    return TRUE;
-}
-
-bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
-{
-    wxToolBarTool *tool = (wxToolBarTool *)toolBase;
-
-    wxCHECK_MSG( !tool->IsControl(), FALSE,
-                 _T("generic wxToolBar doesn't support controls") );
-
-    // TODO: use the mapping code from wxToolBar95 to get it right in this class
-#if !defined(__WIN32__) && !defined(__WIN386__)
-    wxBitmap bmpDisabled;
-    if (tool->CanBeToggled())
-    {
-        HBITMAP hbmp = CreateMappedBitmap((WXHINSTANCE)wxGetInstance(),
-                                          GetHbitmapOf(tool->GetBitmap1()));
-
-        wxBitmap bmp;
-        bmp.SetHBITMAP((WXHBITMAP)hbmp);
-        tool->SetBitmap2(bmp);
-    }
-#endif
-
-    tool->m_x = m_xPos;
-    if ( tool->m_x == -1 )
-        tool->m_x = m_xMargin;
-
-    tool->m_y = m_yPos;
-    if ( tool->m_y == -1 )
-        tool->m_y = m_yMargin;
-
-    tool->SetSize(GetToolSize());
-
-    if ( tool->IsButton() )
-    {
-        // Calculate reasonable max size in case Layout() not called
-        if ((tool->m_x + tool->GetBitmap1().GetWidth() + m_xMargin) > m_maxWidth)
-            m_maxWidth = (tool->m_x + tool->GetWidth() + m_xMargin);
-
-        if ((tool->m_y + tool->GetBitmap1().GetHeight() + m_yMargin) > m_maxHeight)
-            m_maxHeight = (tool->m_y + tool->GetHeight() + m_yMargin);
-    }
-
-    return TRUE;
-}
-
-bool wxToolBar::Realize()
-{
-    m_currentRowsOrColumns = 0;
-    m_lastX = m_xMargin;
-    m_lastY = m_yMargin;
-    int maxToolWidth = 0;
-    int maxToolHeight = 0;
-    m_maxWidth = 0;
-    m_maxHeight = 0;
-
-    // Find the maximum tool width and height
-    wxToolBarToolsList::Node *node = m_tools.GetFirst();
-    while (node)
-    {
-        wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
-        if (tool->GetWidth() > maxToolWidth)
-            maxToolWidth = tool->GetWidth();
-        if (tool->GetHeight() > maxToolHeight)
-            maxToolHeight = tool->GetHeight();
-        node = node->GetNext();
-    }
-
-    int separatorSize = m_toolSeparation;
-
-    node = m_tools.GetFirst();
-    while (node)
-    {
-        wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
-        if (tool->GetStyle() == wxTOOL_STYLE_SEPARATOR)
-        {
-            if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
-            {
-                if (m_currentRowsOrColumns >= m_maxCols)
-                    m_lastY += separatorSize;
-                else
-                    m_lastX += separatorSize;
-            }
-            else
-            {
-                if (m_currentRowsOrColumns >= m_maxRows)
-                    m_lastX += separatorSize;
-                else
-                    m_lastY += separatorSize;
-            }
-        }
-        else if (tool->GetStyle() == wxTOOL_STYLE_BUTTON)
-        {
-            if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
-            {
-                if (m_currentRowsOrColumns >= m_maxCols)
-                {
-                    m_currentRowsOrColumns = 0;
-                    m_lastX = m_xMargin;
-                    m_lastY += maxToolHeight + m_toolPacking;
-                }
-                tool->m_x = (long) (m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
-                tool->m_y = (long) (m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
-
-                m_lastX += maxToolWidth + m_toolPacking;
-            }
-            else
-            {
-                if (m_currentRowsOrColumns >= m_maxRows)
-                {
-                    m_currentRowsOrColumns = 0;
-                    m_lastX += (maxToolWidth + m_toolPacking);
-                    m_lastY = m_yMargin;
-                }
-                tool->m_x = (long) (m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
-                tool->m_y = (long) (m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
-
-                m_lastY += maxToolHeight + m_toolPacking;
-            }
-            m_currentRowsOrColumns ++;
-        }
-
-        if (m_lastX > m_maxWidth)
-            m_maxWidth = m_lastX;
-        if (m_lastY > m_maxHeight)
-            m_maxHeight = m_lastY;
-
-        node = node->GetNext();
-    }
-
-    if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
-    {
-        m_maxWidth += maxToolWidth;
-        m_maxHeight += maxToolHeight;
-    }
-    else
-    {
-        m_maxWidth += maxToolWidth;
-        m_maxHeight += maxToolHeight;
-    }
-
-    m_maxWidth += m_xMargin;
-    m_maxHeight += m_yMargin;
-
-    SetSize(m_maxWidth, m_maxHeight);
-
-    return TRUE;
-}
-
-bool wxToolBar::InitGlobalObjects()
-{
-    GetSysColors();      
-    if (!CreateDitherBrush())
-        return FALSE;
-
-    m_hdcMono = (WXHDC) CreateCompatibleDC(NULL);
-    if (!m_hdcMono)
-        return FALSE;
-
-    m_hbmMono = (WXHBITMAP) CreateBitmap((int)GetToolSize().x, (int)GetToolSize().y, 1, 1, NULL);
-    if (!m_hbmMono)
-        return FALSE;
-
-    m_hbmDefault = (WXHBITMAP) SelectObject((HDC) m_hdcMono, (HBITMAP) m_hbmMono);
-    return TRUE;
-}
-
-void wxToolBar::FreeGlobalObjects()
-{
-    FreeDitherBrush();
-
-    if (m_hdcMono) {
-        if (m_hbmDefault)
-        {
-            SelectObject((HDC) m_hdcMono, (HBITMAP) m_hbmDefault);
-            m_hbmDefault = 0;
-        }
-        DeleteDC((HDC) m_hdcMono);             // toast the DCs
-    }
-    m_hdcMono = 0;
-
-    if (m_hbmMono)
-        DeleteObject((HBITMAP) m_hbmMono);
-    m_hbmMono = 0;
-}
-
-// ----------------------------------------------------------------------------
-// drawing routines
-// ----------------------------------------------------------------------------
-
-void wxToolBar::PatB(WXHDC hdc,int x,int y,int dx,int dy, long rgb)
-{
-    RECT    rc;
-
-    rc.left   = x;
-    rc.top    = y;
-    rc.right  = x + dx;
-    rc.bottom = y + dy;
-
-    SetBkColor((HDC) hdc,rgb);
-    ExtTextOut((HDC) hdc,0,0,ETO_OPAQUE,&rc,NULL,0,NULL);
-}
-
-
-// create a mono bitmap mask:
-//   1's where color == COLOR_BTNFACE || COLOR_HILIGHT
-//   0's everywhere else
-
-void wxToolBar::CreateMask(WXHDC hdc, int xoffset, int yoffset, int dx, int dy)
-{
-    HDC globalDC = ::GetDC(NULL);
-    HDC hdcGlyphs = CreateCompatibleDC((HDC) globalDC);
-    ReleaseDC(NULL, (HDC) globalDC);
-
-    // krj - create a new bitmap and copy the image from hdc.
-    //HBITMAP bitmapOld = SelectObject(hdcGlyphs, hBitmap);
-    HBITMAP hBitmap = CreateCompatibleBitmap((HDC) hdc, dx, dy);
-    HBITMAP bitmapOld = (HBITMAP) SelectObject(hdcGlyphs, hBitmap);
-    BitBlt(hdcGlyphs, 0,0, dx, dy, (HDC) hdc, 0, 0, SRCCOPY);
-
-    // initalize whole area with 1's
-    PatBlt((HDC) m_hdcMono, 0, 0, dx, dy, WHITENESS);
-
-    // create mask based on color bitmap
-    // convert this to 1's
-    SetBkColor(hdcGlyphs, m_rgbFace);
-    BitBlt((HDC) m_hdcMono, xoffset, yoffset, (int)GetToolBitmapSize().x, (int)GetToolBitmapSize().y,
-        hdcGlyphs, 0, 0, SRCCOPY);
-    // convert this to 1's
-    SetBkColor(hdcGlyphs, m_rgbHilight);
-    // OR in the new 1's
-    BitBlt((HDC) m_hdcMono, xoffset, yoffset, (int)GetToolBitmapSize().x, (int)GetToolBitmapSize().y,
-        hdcGlyphs, 0, 0, SRCPAINT);
-
-    SelectObject(hdcGlyphs, bitmapOld);
-    DeleteObject(hBitmap);
-    DeleteDC(hdcGlyphs);
-}
-
-void wxToolBar::DrawBlankButton(WXHDC hdc, int x, int y, int dx, int dy, int state)
-{
-    // face color
-    PatB(hdc, x, y, dx, dy, m_rgbFace);
-
-    if (state & wxTBSTATE_PRESSED) {
-        PatB(hdc, x + 1, y, dx - 2, 1, m_rgbFrame);
-        PatB(hdc, x + 1, y + dy - 1, dx - 2, 1, m_rgbFrame);
-        PatB(hdc, x, y + 1, 1, dy - 2, m_rgbFrame);
-        PatB(hdc, x + dx - 1, y +1, 1, dy - 2, m_rgbFrame);
-        PatB(hdc, x + 1, y + 1, 1, dy-2, m_rgbShadow);
-        PatB(hdc, x + 1, y + 1, dx-2, 1, m_rgbShadow);
-    }
-    else {
-        PatB(hdc, x + 1, y, dx - 2, 1, m_rgbFrame);
-        PatB(hdc, x + 1, y + dy - 1, dx - 2, 1, m_rgbFrame);
-        PatB(hdc, x, y + 1, 1, dy - 2, m_rgbFrame);
-        PatB(hdc, x + dx - 1, y + 1, 1, dy - 2, m_rgbFrame);
-        dx -= 2;
-        dy -= 2;
-        PatB(hdc, x + 1, y + 1, 1, dy - 1, m_rgbHilight);
-        PatB(hdc, x + 1, y + 1, dx - 1, 1, m_rgbHilight);
-        PatB(hdc, x + dx, y + 1, 1, dy, m_rgbShadow);
-        PatB(hdc, x + 1, y + dy, dx, 1,   m_rgbShadow);
-        PatB(hdc, x + dx - 1, y + 2, 1, dy - 2, m_rgbShadow);
-        PatB(hdc, x + 2, y + dy - 1, dx - 2, 1,   m_rgbShadow);
-    }
-}
-
-void wxToolBar::DrawButton(WXHDC hdc, int x, int y, int dx, int dy,
-                           wxToolBarToolBase *toolBase, int state)
-{
-    wxToolBarTool *tool = (wxToolBarTool *)toolBase;
-
-    int yOffset;
-    HBRUSH hbrOld, hbr;
-    BOOL bMaskCreated = FALSE;
-    int xButton = 0;           // assume button is down
-    int dxFace, dyFace;
-    int xCenterOffset;
-
-    dxFace = dx;
-    dyFace = dy;
-
-//    HBITMAP hBitmap = (HBITMAP) tool->m_bitmap1.GetHBITMAP();
-    HDC globalDC = ::GetDC(NULL);
-    HDC hdcGlyphs = CreateCompatibleDC(globalDC);
-    ReleaseDC(NULL, globalDC);
-
-    // get the proper button look - up or down.
-    if (!(state & (wxTBSTATE_PRESSED | wxTBSTATE_CHECKED))) {
-       xButton = dx;   // use 'up' version of button
-       dxFace -= 2;    
-       dyFace -= 2;    // extents to ignore button highlight
-    }
-
-    DrawBlankButton(hdc, x, y, dx, dy, state);
-
-
-    // move coordinates inside border and away from upper left highlight.
-    // the extents change accordingly.
-    x += 2;
-    y += 2;
-    dxFace -= 3;               
-    dyFace -= 3;
-
-    // Using bmpDisabled can cause problems (don't know why!)
-#if !defined(__WIN32__) && !defined(__WIN386__)
-    HBITMAP bitmapOld;
-    if (tool->GetBitmap2().Ok())
-      bitmapOld = GetHbitmapOf(tool->GetBitmap2());
-    else
-      bitmapOld = GetHbitmapOf(tool->GetBitmap1());
-#else
-    HBITMAP bitmapOld = GetHbitmapOf(tool->GetBitmap1());
-#endif    
-
-    bitmapOld = (HBITMAP)SelectObject(hdcGlyphs, bitmapOld);
-
-    // calculate offset of face from (x,y).  y is always from the top,
-    // so the offset is easy.  x needs to be centered in face.
-    yOffset = 1;
-    xCenterOffset = (dxFace - (int)GetToolBitmapSize().x)/2;
-    if (state & (wxTBSTATE_PRESSED | wxTBSTATE_CHECKED))
-    {
-       // pressed state moves down and to the right
-       // (x moves automatically as face size grows)
-        yOffset++;
-    }
-
-    // now put on the face
-    if (state & wxTBSTATE_ENABLED) {
-        // regular version
-        BitBlt((HDC) hdc, x+xCenterOffset, y + yOffset, (int)GetToolBitmapSize().x, (int)GetToolBitmapSize().y,
-            hdcGlyphs, 0, 0, SRCCOPY);
-    } else {
-        // disabled version (or indeterminate)
-       bMaskCreated = TRUE;
-        CreateMask((WXHDC) hdcGlyphs, xCenterOffset, yOffset, dxFace, dyFace);
-//        CreateMask(hBitmap, xCenterOffset, yOffset, dxFace, dyFace);
-
-       SetTextColor((HDC) hdc, 0L);     // 0's in mono -> 0 (for ROP)
-       SetBkColor((HDC) hdc, 0x00FFFFFF); // 1's in mono -> 1
-
-       // draw glyph's white understrike
-       if (!(state & wxTBSTATE_INDETERMINATE)) {
-           hbr = CreateSolidBrush(m_rgbHilight);
-           if (hbr) {
-               hbrOld = (HBRUSH) SelectObject((HDC) hdc, hbr);
-               if (hbrOld) {
-                   // draw hilight color where we have 0's in the mask
-                    BitBlt((HDC) hdc, x + 1, y + 1, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00B8074A);
-                   SelectObject((HDC) hdc, hbrOld);
-               }
-               DeleteObject(hbr);
-           }
-       }
-
-       // gray out glyph
-       hbr = CreateSolidBrush(m_rgbShadow);
-       if (hbr) {
-           hbrOld = (HBRUSH) SelectObject((HDC) hdc, hbr);
-           if (hbrOld) {
-               // draw the shadow color where we have 0's in the mask
-                BitBlt((HDC) hdc, x, y, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00B8074A);
-               SelectObject((HDC) hdc, hbrOld);
-           }
-           DeleteObject(hbr);
-       }
-
-       if (state & wxTBSTATE_CHECKED) {
-           BitBlt((HDC) m_hdcMono, 1, 1, dxFace - 1, dyFace - 1, (HDC) m_hdcMono, 0, 0, SRCAND);
-       }
-    }
-
-    if (state & (wxTBSTATE_CHECKED | wxTBSTATE_INDETERMINATE)) {
-
-        hbrOld = (HBRUSH) SelectObject((HDC) hdc, (HBRUSH) m_hbrDither);
-       if (hbrOld) {
-
-           if (!bMaskCreated)
-                CreateMask((WXHDC) hdcGlyphs, xCenterOffset, yOffset, dxFace, dyFace);
-//                CreateMask(hBitmap, xCenterOffset, yOffset, dxFace, dyFace);
-
-           SetTextColor((HDC) hdc, 0L);                // 0 -> 0
-           SetBkColor((HDC) hdc, 0x00FFFFFF);  // 1 -> 1
-
-           // only draw the dither brush where the mask is 1's
-            BitBlt((HDC) hdc, x, y, dxFace, dyFace, (HDC) m_hdcMono, 0, 0, 0x00E20746);
-
-           SelectObject((HDC) hdc, hbrOld);
-       }
-    }
-    SelectObject(hdcGlyphs, bitmapOld);
-    DeleteDC(hdcGlyphs);
-}
-
-// ----------------------------------------------------------------------------
-// drawing helpers
-// ----------------------------------------------------------------------------
-
-void wxToolBar::GetSysColors()
-{
-       static COLORREF rgbSaveFace    = 0xffffffffL,
-                       rgbSaveShadow  = 0xffffffffL,
-                       rgbSaveHilight = 0xffffffffL,
-                       rgbSaveFrame   = 0xffffffffL;
-
-    // For now, override these because the colour replacement isn't working,
-    // and we get inconsistent colours. Assume all buttons are grey for the moment.
-
-//     m_rgbFace    = GetSysColor(COLOR_BTNFACE);
-        m_rgbFace = RGB(192,192,192);
-//     m_rgbShadow  = GetSysColor(COLOR_BTNSHADOW);
-        m_rgbShadow = RGB(128,128,128);
-//     m_rgbHilight = GetSysColor(COLOR_BTNHIGHLIGHT);
-       m_rgbHilight = RGB(255, 255, 255);
-
-       m_rgbFrame   = GetSysColor(COLOR_WINDOWFRAME);
-
-       if (rgbSaveFace!=m_rgbFace || rgbSaveShadow!=m_rgbShadow
-               || rgbSaveHilight!=m_rgbHilight || rgbSaveFrame!=m_rgbFrame)
-       {
-               rgbSaveFace    = m_rgbFace;
-               rgbSaveShadow  = m_rgbShadow;
-               rgbSaveHilight = m_rgbHilight;
-        rgbSaveFrame   = m_rgbFrame;
-
-               // Update the brush for pushed-in buttons
-               CreateDitherBrush();
-       }
-}
-
-WXHBITMAP wxToolBar::CreateDitherBitmap()
-{
-    BITMAPINFO* pbmi;
-    HBITMAP hbm;
-    HDC hdc;
-    int i;
-    long patGray[8];
-    DWORD rgb;
-
-    pbmi = (BITMAPINFO *)malloc(sizeof(BITMAPINFOHEADER) + 16*sizeof(RGBQUAD));
-    memset(pbmi, 0, (sizeof(BITMAPINFOHEADER) + 16*sizeof(RGBQUAD)));
-
-    pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
-    pbmi->bmiHeader.biWidth = 8;
-    pbmi->bmiHeader.biHeight = 8;
-    pbmi->bmiHeader.biPlanes = 1;
-    pbmi->bmiHeader.biBitCount = 1;
-    pbmi->bmiHeader.biCompression = BI_RGB;
-
-//    rgb = GetSysColor(COLOR_BTNFACE);
-    rgb = RGB(192,192,192);
-
-    pbmi->bmiColors[0].rgbBlue  = GetBValue(rgb);
-    pbmi->bmiColors[0].rgbGreen = GetGValue(rgb);
-    pbmi->bmiColors[0].rgbRed   = GetRValue(rgb);
-    pbmi->bmiColors[0].rgbReserved = 0;
-
-//    rgb = GetSysColor(COLOR_BTNHIGHLIGHT);
-    rgb = RGB(255, 255, 255);
-
-    pbmi->bmiColors[1].rgbBlue  = GetBValue(rgb);
-    pbmi->bmiColors[1].rgbGreen = GetGValue(rgb);
-    pbmi->bmiColors[1].rgbRed   = GetRValue(rgb);
-    pbmi->bmiColors[1].rgbReserved = 0;
-
-    /* initialize the brushes */
-
-    for (i = 0; i < 8; i++)
-       if (i & 1)
-           patGray[i] = 0xAAAA5555L;   //  0x11114444L; // lighter gray
-       else
-           patGray[i] = 0x5555AAAAL;   //  0x11114444L; // lighter gray
-
-    hdc = ::GetDC(NULL);
-
-    hbm = CreateDIBitmap(hdc, &pbmi->bmiHeader, CBM_INIT, patGray, pbmi, DIB_RGB_COLORS);
-
-    ReleaseDC(NULL, hdc);
-    free(pbmi);
-
-    return (WXHBITMAP)hbm;
-}
-
-bool wxToolBar::CreateDitherBrush()
-{
-       HBITMAP hbmGray;
-       HBRUSH hbrSave;
-       if (m_hbrDither)
-         return TRUE;
-       hbmGray = (HBITMAP) CreateDitherBitmap();
-
-       if (hbmGray)
-       {
-               hbrSave = (HBRUSH) m_hbrDither;
-               m_hbrDither = (WXHBRUSH) CreatePatternBrush(hbmGray);
-               DeleteObject(hbmGray);
-               if (m_hbrDither)
-               {
-                       if (hbrSave)
-                       {
-                               DeleteObject(hbrSave);
-                       }
-                       return TRUE;
-               }
-               else
-               {
-                       m_hbrDither = (WXHBRUSH) hbrSave;
-               }
-       }
-
-       return FALSE;
-}
-
-bool wxToolBar::FreeDitherBrush(void)
-{
-    if (m_hbrDither)
-      DeleteObject((HBRUSH) m_hbrDither);
-    m_hbrDither = 0;
-    return TRUE;
-}
-
-typedef struct tagCOLORMAP2
-{
-    COLORREF bgrfrom;
-    COLORREF bgrto;
-    COLORREF sysColor;
-} COLORMAP2;
-
-// these are the default colors used to map the dib colors
-// to the current system colors
-
-#define BGR_BUTTONTEXT      (RGB(000,000,000))  // black
-#define BGR_BUTTONSHADOW    (RGB(128,128,128))  // dark grey
-#define BGR_BUTTONFACE      (RGB(192,192,192))  // bright grey
-#define BGR_BUTTONHILIGHT   (RGB(255,255,255))  // white
-#define BGR_BACKGROUNDSEL   (RGB(255,000,000))  // blue
-#define BGR_BACKGROUND      (RGB(255,000,255))  // magenta
-#define FlipColor(rgb)      (RGB(GetBValue(rgb), GetGValue(rgb), GetRValue(rgb)))
-
-WXHBITMAP wxToolBar::CreateMappedBitmap(WXHINSTANCE WXUNUSED(hInstance), void *info)
-{
-  LPBITMAPINFOHEADER lpBitmapInfo = (LPBITMAPINFOHEADER)info;
-  HDC                  hdc, hdcMem = NULL;
-
-  DWORD FAR            *p;
-  LPSTR                lpBits;
-  HBITMAP              hbm = NULL, hbmOld;
-  int numcolors, i;
-  int wid, hgt;
-  static COLORMAP2 ColorMap[] = {
-    {BGR_BUTTONTEXT,    BGR_BUTTONTEXT,    COLOR_BTNTEXT},     // black
-    {BGR_BUTTONSHADOW,  BGR_BUTTONSHADOW,  COLOR_BTNSHADOW},   // dark grey
-    {BGR_BUTTONFACE,    BGR_BUTTONFACE,    COLOR_BTNFACE},     // bright grey
-    {BGR_BUTTONHILIGHT, BGR_BUTTONHILIGHT, COLOR_BTNHIGHLIGHT},// white
-    {BGR_BACKGROUNDSEL, BGR_BACKGROUNDSEL, COLOR_HIGHLIGHT},   // blue
-    {BGR_BACKGROUND,    BGR_BACKGROUND,    COLOR_WINDOW}       // magenta
-  };
-
-  #define NUM_MAPS (sizeof(ColorMap)/sizeof(COLORMAP2))
-
-  if (!lpBitmapInfo)
-       return 0;
-
-  //
-  // So what are the new colors anyway ?
-  //
-  for (i=0; i < (int) NUM_MAPS; i++) {
-     ColorMap[i].bgrto = (long unsigned int) FlipColor(GetSysColor((int)ColorMap[i].sysColor));
-  }
-
-  p = (DWORD FAR *)(((LPSTR)lpBitmapInfo) + lpBitmapInfo->biSize);
-
-  /* Replace button-face and button-shadow colors with the current values
-   */
-  numcolors = 16;
-
-  while (numcolors-- > 0) {
-      for (i = 0; i < (int) NUM_MAPS; i++) {
-          if (*p == ColorMap[i].bgrfrom) {
-          *p = ColorMap[i].bgrto;
-             break;
-         }
-      }
-      p++;
-  }
-
-  /* First skip over the header structure */
-  lpBits = (LPSTR)(lpBitmapInfo + 1);
-
-  /* Skip the color table entries, if any */
-  lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
-
-  /* Create a color bitmap compatible with the display device */
-  i = wid = (int)lpBitmapInfo->biWidth;
-  hgt = (int)lpBitmapInfo->biHeight;
-  hdc = ::GetDC(NULL);
-
-  hdcMem = CreateCompatibleDC(hdc);
-  if (hdcMem) {
-//    hbm = CreateDiscardableBitmap(hdc, i, hgt);
-    hbm = CreateCompatibleBitmap(hdc, i, hgt);
-    if (hbm) {
-        hbmOld = (HBITMAP) SelectObject(hdcMem, hbm);
-
-        // set the main image
-        StretchDIBits(hdcMem, 0, 0, wid, hgt, 0, 0, wid, hgt, lpBits,
-                   (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS, SRCCOPY);
-
-        SelectObject(hdcMem, hbmOld);
-    }
-
-    DeleteObject(hdcMem);
-  }
-
-  ReleaseDC(NULL, hdc);
-
-  return (WXHBITMAP) hbm;
-}
-
-WXHBITMAP wxToolBar::CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap)
-{
-    HANDLE hDIB = wxDIB::ConvertFromBitmap((HBITMAP) hBitmap);
-    if ( !hDIB )
-        return 0;
-
-    WXHBITMAP newBitmap = CreateMappedBitmap(hInstance, GlobalPtr(hDIB));
-
-    GlobalFree(hDIB);
-
-    return newBitmap;
-}
-
-#endif // wxUSE_TOOLBAR
-
index fa977a9896b4b65792aae54326fb12e010ecaac7..f7c7cb3adae6e4f7143397ba7d28f71b7294449b 100644 (file)
@@ -199,9 +199,6 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
     EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo)
     EVT_UPDATE_UI(wxID_CLEAR, wxTextCtrl::OnUpdateDelete)
     EVT_UPDATE_UI(wxID_SELECTALL, wxTextCtrl::OnUpdateSelectAll)
     EVT_UPDATE_UI(wxID_REDO, wxTextCtrl::OnUpdateRedo)
     EVT_UPDATE_UI(wxID_CLEAR, wxTextCtrl::OnUpdateDelete)
     EVT_UPDATE_UI(wxID_SELECTALL, wxTextCtrl::OnUpdateSelectAll)
-#ifdef __WIN16__
-    EVT_ERASE_BACKGROUND(wxTextCtrl::OnEraseBackground)
-#endif
 
     EVT_SET_FOCUS(wxTextCtrl::OnSetFocus)
 END_EVENT_TABLE()
 
     EVT_SET_FOCUS(wxTextCtrl::OnSetFocus)
 END_EVENT_TABLE()
@@ -1194,7 +1191,6 @@ void wxTextCtrl::DoSetSelection(long from, long to, bool scrollCaret)
 {
     HWND hWnd = GetHwnd();
 
 {
     HWND hWnd = GetHwnd();
 
-#ifdef __WIN32__
 #if wxUSE_RICHEDIT
     if ( IsRich() )
     {
 #if wxUSE_RICHEDIT
     if ( IsRich() )
     {
@@ -1250,10 +1246,6 @@ void wxTextCtrl::DoSetSelection(long from, long to, bool scrollCaret)
         }
 #endif // wxUSE_RICHEDIT
     }
         }
 #endif // wxUSE_RICHEDIT
     }
-#else // Win16
-    // WPARAM is 0: selection is scrolled into view
-    SendMessage(hWnd, EM_SETSEL, (WPARAM)0, (LPARAM)MAKELONG(from, to));
-#endif // Win32/16
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -1867,40 +1859,8 @@ WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSE
     return (WXHBRUSH)brush->GetResourceHandle();
 }
 
     return (WXHBRUSH)brush->GetResourceHandle();
 }
 
-// In WIN16, need to override normal erasing because
-// Ctl3D doesn't use the wxWindows background colour.
-#ifdef __WIN16__
-void wxTextCtrl::OnEraseBackground(wxEraseEvent& event)
-{
-    wxColour col(m_backgroundColour);
-
-#if wxUSE_CTL3D
-    if (m_useCtl3D)
-        col = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
-#endif
-
-    RECT rect;
-    ::GetClientRect(GetHwnd(), &rect);
-
-    COLORREF ref = wxColourToRGB(col);
-    HBRUSH hBrush = ::CreateSolidBrush(ref);
-    if ( !hBrush )
-        wxLogLastError(wxT("CreateSolidBrush"));
-
-    HDC hdc = (HDC)event.GetDC()->GetHDC();
-
-    int mode = ::SetMapMode(hdc, MM_TEXT);
-
-    ::FillRect(hdc, &rect, hBrush);
-    ::DeleteObject(hBrush);
-    ::SetMapMode(hdc, mode);
-
-}
-#endif // Win16
-
 bool wxTextCtrl::AdjustSpaceLimit()
 {
 bool wxTextCtrl::AdjustSpaceLimit()
 {
-#ifndef __WIN16__
     unsigned int limit = ::SendMessage(GetHwnd(), EM_GETLIMITTEXT, 0, 0);
 
     // HACK: we try to automatically extend the limit for the amount of text
     unsigned int limit = ::SendMessage(GetHwnd(), EM_GETLIMITTEXT, 0, 0);
 
     // HACK: we try to automatically extend the limit for the amount of text
@@ -1942,7 +1902,6 @@ bool wxTextCtrl::AdjustSpaceLimit()
             ::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
         }
     }
             ::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
         }
     }
-#endif // !Win16
 
     // we changed the limit
     return TRUE;
 
     // we changed the limit
     return TRUE;
index 3c80ac8f540b58d8b9fb3a1aeefd7baaefeb3cc4..0296aac6ce94c317c3d1e6c7d6e95e3f63dfe874 100644 (file)
@@ -222,7 +222,6 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
 
     if ( exflags )
     {
 
     if ( exflags )
     {
-#if !defined(__WIN16__)
         if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) )
         {
             if ( style & wxFRAME_TOOL_WINDOW )
         if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) )
         {
             if ( style & wxFRAME_TOOL_WINDOW )
@@ -255,7 +254,6 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
 #endif
             //else: nothing to do [here]
         }
 #endif
             //else: nothing to do [here]
         }
-#endif // !Win16
 
         if ( style & wxSTAY_ON_TOP )
             *exflags |= WS_EX_TOPMOST;
 
         if ( style & wxSTAY_ON_TOP )
             *exflags |= WS_EX_TOPMOST;
index 3e3721f596195e36af07645a8e0b06833372593a..e56792a52de548ee510ab5aa077aa139fc0ee27b 100644 (file)
 static const wxChar WX_SECTION[] = wxT("wxWindows");
 static const wxChar eUSERNAME[]  = wxT("UserName");
 
 static const wxChar WX_SECTION[] = wxT("wxWindows");
 static const wxChar eUSERNAME[]  = wxT("UserName");
 
-// these are only used under Win16
-#if !defined(__WIN32__) && !defined(__WXMICROWIN__)
-static const wxChar eHOSTNAME[]  = wxT("HostName");
-static const wxChar eUSERID[]    = wxT("UserId");
-#endif // !Win32
-
 // ============================================================================
 // implementation
 // ============================================================================
 // ============================================================================
 // implementation
 // ============================================================================
@@ -238,7 +232,7 @@ bool wxGetUserId(wxChar *buf, int maxSize)
 {
 #if defined(__WXWINCE__)
     return FALSE;
 {
 #if defined(__WXWINCE__)
     return FALSE;
-#elif defined(__WIN32__) && !defined(__win32s__) && !defined(__WXMICROWIN__)
+#elif defined(__WIN32__) && !defined(__WXMICROWIN__)
     DWORD nSize = maxSize;
     if ( ::GetUserName(buf, &nSize) == 0 )
     {
     DWORD nSize = maxSize;
     if ( ::GetUserName(buf, &nSize) == 0 )
     {
@@ -252,7 +246,7 @@ bool wxGetUserId(wxChar *buf, int maxSize)
     }
 
     return TRUE;
     }
 
     return TRUE;
-#else   // Win16 or Win32s
+#else   // __WXMICROWIN__
     wxChar *user;
     const wxChar *default_id = wxT("anonymous");
 
     wxChar *user;
     const wxChar *default_id = wxT("anonymous");
 
@@ -469,23 +463,7 @@ bool wxDirExists(const wxString& dir)
 #elif defined(__WIN32__)
     DWORD attribs = GetFileAttributes(dir);
     return ((attribs != (DWORD)-1) && (attribs & FILE_ATTRIBUTE_DIRECTORY));
 #elif defined(__WIN32__)
     DWORD attribs = GetFileAttributes(dir);
     return ((attribs != (DWORD)-1) && (attribs & FILE_ATTRIBUTE_DIRECTORY));
-#else // Win16
-    #ifdef __BORLANDC__
-        struct ffblk fileInfo;
-    #else
-        struct find_t fileInfo;
-    #endif
-    // In Borland findfirst has a different argument
-    // ordering from _dos_findfirst. But _dos_findfirst
-    // _should_ be ok in both MS and Borland... why not?
-    #ifdef __BORLANDC__
-        return (findfirst(dir, &fileInfo, _A_SUBDIR) == 0 &&
-               (fileInfo.ff_attrib & _A_SUBDIR) != 0);
-    #else
-        return (_dos_findfirst(dir, _A_SUBDIR, &fileInfo) == 0) &&
-               ((fileInfo.attrib & _A_SUBDIR) != 0);
-    #endif
-#endif // Win32/16
+#endif // Win32/__WXMICROWIN__
 }
 
 bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
 }
 
 bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
@@ -604,17 +582,6 @@ bool wxGetEnv(const wxString& var, wxString *value)
 {
 #ifdef __WXWINCE__
     return FALSE;
 {
 #ifdef __WXWINCE__
     return FALSE;
-#elif defined(__WIN16__)
-    const wxChar* ret = wxGetenv(var);
-    if ( !ret )
-        return FALSE;
-
-    if ( value )
-    {
-        *value = ret;
-    }
-
-    return TRUE;
 #else // Win32
     // first get the size of the buffer
     DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
 #else // Win32
     // first get the size of the buffer
     DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
@@ -631,7 +598,7 @@ bool wxGetEnv(const wxString& var, wxString *value)
     }
 
     return TRUE;
     }
 
     return TRUE;
-#endif // Win16/32
+#endif // WinCE/32
 }
 
 bool wxSetEnv(const wxString& var, const wxChar *value)
 }
 
 bool wxSetEnv(const wxString& var, const wxChar *value)
@@ -930,8 +897,6 @@ bool wxShutdown(wxShutdownFlags wFlags)
     }
 
     return bOK;
     }
 
     return bOK;
-#else // Win16
-    return FALSE;
 #endif // Win32/16
 }
 
 #endif // Win32/16
 }
 
@@ -954,11 +919,7 @@ long wxGetFreeMemory()
 
 unsigned long wxGetProcessId()
 {
 
 unsigned long wxGetProcessId()
 {
-#ifdef __WIN32__
     return ::GetCurrentProcessId();
     return ::GetCurrentProcessId();
-#else
-    return 0;
-#endif
 }
 
 // Emit a beeeeeep
 }
 
 // Emit a beeeeeep
@@ -969,7 +930,6 @@ void wxBell()
 
 wxString wxGetOsDescription()
 {
 
 wxString wxGetOsDescription()
 {
-#ifdef __WIN32__
     wxString str;
 
     OSVERSIONINFO info;
     wxString str;
 
     OSVERSIONINFO info;
@@ -1012,9 +972,6 @@ wxString wxGetOsDescription()
     }
 
     return str;
     }
 
     return str;
-#else // Win16
-    return _("Windows 3.1");
-#endif // Win32/16
 }
 
 wxToolkitInfo& wxAppTraits::GetToolkitInfo()
 }
 
 wxToolkitInfo& wxAppTraits::GetToolkitInfo()
index b969c899bf8d9229c735a8c01522b6472c76cf6d..671d9e9083aaf7141449e3b810ef87cf76412353 100644 (file)
@@ -113,12 +113,10 @@ struct wxExecuteData
 public:
     ~wxExecuteData()
     {
 public:
     ~wxExecuteData()
     {
-#ifndef __WIN16__
         if ( !::CloseHandle(hProcess) )
         {
             wxLogLastError(wxT("CloseHandle(hProcess)"));
         }
         if ( !::CloseHandle(hProcess) )
         {
             wxLogLastError(wxT("CloseHandle(hProcess)"));
         }
-#endif
     }
 
     HWND       hWnd;          // window to send wxWM_PROC_TERMINATED to
     }
 
     HWND       hWnd;          // window to send wxWM_PROC_TERMINATED to
index 418aef7964fb3898296d042f704d954be7e8d131..fc8b08f12d115e6aef6a1f124bd7277e28d5acf9 100644 (file)
@@ -334,7 +334,7 @@ void wxDisplaySizeMM(int *width, int *height)
 
 void wxClientDisplayRect(int *x, int *y, int *width, int *height)
 {
 
 void wxClientDisplayRect(int *x, int *y, int *width, int *height)
 {
-#if defined(__WIN16__) || defined(__WXMICROWIN__)
+#if defined(__WXMICROWIN__)
     *x = 0; *y = 0;
     wxDisplaySize(width, height);
 #else
     *x = 0; *y = 0;
     wxDisplaySize(width, height);
 #else
@@ -400,11 +400,7 @@ wxString WXDLLEXPORT wxGetWindowClass(WXHWND hWnd)
 
 WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
 {
 
 WXWORD WXDLLEXPORT wxGetWindowId(WXHWND hWnd)
 {
-#ifndef __WIN32__
-    return (WXWORD)GetWindowWord((HWND)hWnd, GWW_ID);
-#else // Win32
     return (WXWORD)GetWindowLong((HWND)hWnd, GWL_ID);
     return (WXWORD)GetWindowLong((HWND)hWnd, GWL_ID);
-#endif // Win16/32
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
index 86074e2fd04f6951aa903ade7c05c1a642f78579..464dc6656ef988681d3d8a0b1278440c0961ffe1 100644 (file)
@@ -293,11 +293,6 @@ bool MyApp::OnInit()
   TheTex2RTFServer->Create(_T("TEX2RTF"));
 #endif
 
   TheTex2RTFServer->Create(_T("TEX2RTF"));
 #endif
 
-#if defined(__WXMSW__) && defined(__WIN16__)
-  // Limit to max Windows array size
-  if (BufSize > 64) BufSize = 64;
-#endif
-
   TexInitialize(BufSize);
   ResetContentsLevels(0);
 
   TexInitialize(BufSize);
   ResetContentsLevels(0);
 
@@ -865,13 +860,8 @@ void ChooseOutputFile(bool force)
     }
     case TEX_HTML:
     {
     }
     case TEX_HTML:
     {
-#if defined(__WXMSW__) && defined(__WIN16__)
-      wxStrcpy(extensionBuf, _T("htm"));
-      wxStrcat(wildBuf, _T("htm"));
-#else
       wxStrcpy(extensionBuf, _T("html"));
       wxStrcat(wildBuf, _T("html"));
       wxStrcpy(extensionBuf, _T("html"));
       wxStrcat(wildBuf, _T("html"));
-#endif
       break;
     }
   }
       break;
     }
   }