removed Win16 code (patch 905241), last version with remains of Win16 support tagged with BEFORE_WIN16_REMOVAL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-03-28 13:10:14 +00:00
parent c40f44babb
commit 3a5bcc4db0
77 changed files with 116 additions and 1883 deletions
-6
View File
@@ -28,9 +28,3 @@
#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
-7
View 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
#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)));
@@ -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)));
#endif
SetImageList(p_imageListNormal);
}
-7
View File
@@ -15,13 +15,6 @@
#include <wx/config.h>
#ifdef __WIN16__
#include <wx/fileconf.h>
#undef wxConfig
#define wxConfig wxFileConfig
#endif
class ScoreFile {
public:
ScoreFile(const wxString& appName);
-4
View File
@@ -9,10 +9,6 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __WIN16__
#error "Sorry, Life! will not work in 16-bit Windows"
#endif
// ==========================================================================
// headers, declarations, constants
// ==========================================================================
+1 -1
View 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
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
+1 -1
View 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
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
+1 -1
View File
@@ -969,7 +969,7 @@ directory doesn't exist).
\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.
-2
View 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.
You cannot compile the wxODBC classes under Win16 - sorry.
\normalbox{MORE TO COME}
{\it Under Unix}
+2 -6
View 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
// 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
@@ -320,12 +319,9 @@ private:
// ----------------------------------------------------------------------------
// 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
#ifdef __WIN32__
#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
-2
View File
@@ -596,7 +596,6 @@ public:
// ------------------
// 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,
@@ -645,7 +644,6 @@ public:
if (w) *w = ww;
if (h) *h = hh;
}
#endif // !Win16
protected:
// the pure virtual functions which should be implemented by wxDC
+3 -21
View 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. */
#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
@@ -566,14 +562,8 @@ enum
/* 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;
#endif /* Win16/!Win16 */
#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 __WIN16__
# ifdef __VISUALC__
# define WXFAR __far
# else
# define WXFAR _far
# endif
#else /* Win32 */
# ifndef WXFAR
#ifndef WXFAR
# define WXFAR
# endif
#endif /* Win16/32 */
#endif
/* Stand-ins for Windows types to avoid #including all of windows.h */
typedef void * WXHWND;
+16 -16
View File
@@ -8,32 +8,32 @@ class WXDLLEXPORT wxMemoryDC;
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__)
#include "wx/generic/dragimgg.h"
#define wxDragImage wxGenericDragImage
# include "wx/generic/dragimgg.h"
# define wxDragImage wxGenericDragImage
#elif defined(__WXGTK__)
#include "wx/generic/dragimgg.h"
#define wxDragImage wxGenericDragImage
# include "wx/generic/dragimgg.h"
# define wxDragImage wxGenericDragImage
#elif defined(__WXX11__)
#include "wx/generic/dragimgg.h"
#define wxDragImage wxGenericDragImage
# include "wx/generic/dragimgg.h"
# define wxDragImage wxGenericDragImage
#elif defined(__WXMAC__)
#include "wx/generic/dragimgg.h"
#define wxDragImage wxGenericDragImage
# include "wx/generic/dragimgg.h"
# define wxDragImage wxGenericDragImage
#elif defined(__WXPM__)
#include "wx/generic/dragimgg.h"
#define wxDragImage wxGenericDragImage
# include "wx/generic/dragimgg.h"
# define wxDragImage wxGenericDragImage
#endif
-4
View File
@@ -754,7 +754,6 @@ public:
*ypos = m_y;
}
#ifndef __WIN16__
void GetPosition(long *xpos, long *ypos) const
{
if (xpos)
@@ -762,7 +761,6 @@ public:
if (ypos)
*ypos = (long)m_y;
}
#endif
// 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;
}
#ifndef __WIN16__
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); }
-2
View File
@@ -39,8 +39,6 @@
#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__)
+2 -2
View File
@@ -86,7 +86,7 @@ private:
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.
@@ -104,7 +104,7 @@ public:
{
}
};
#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
#endif // !__WXMSW__ || __WXUNIVERSAL__
#endif // __IMAGELISTH_G__
+3 -3
View File
@@ -37,7 +37,7 @@ class WXDLLEXPORT wxDropTarget;
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
@@ -247,7 +247,7 @@ private:
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.
@@ -270,6 +270,6 @@ public:
{
}
};
#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
#endif // !__WXMSW__ || __WXUNIVERSAL__
#endif // __LISTCTRLH_G__
+2 -2
View File
@@ -495,7 +495,7 @@ private:
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.
@@ -518,7 +518,7 @@ public:
{
}
};
#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
#endif // !__WXMSW__ || __WXUNIVERSAL__
#endif // wxUSE_TREECTRL
+1 -8
View File
@@ -26,14 +26,7 @@
#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
+1 -1
View File
@@ -226,7 +226,7 @@
// 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
//
+2 -2
View File
@@ -20,7 +20,7 @@
#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
@@ -33,7 +33,7 @@
// 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__)
-2
View File
@@ -32,8 +32,6 @@
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
+2 -8
View File
@@ -299,14 +299,11 @@ inline bool wxIsCtrlDown()
inline RECT wxGetWindowRect(HWND hwnd)
{
RECT rect;
#ifdef __WIN16__
::GetWindowRect(hwnd, &rect);
#else // Win32
if ( !::GetWindowRect(hwnd, &rect) )
{
wxLogLastError(_T("GetWindowRect"));
}
#endif // Win16/32
return rect;
}
@@ -314,14 +311,11 @@ inline RECT wxGetWindowRect(HWND hwnd)
inline RECT wxGetClientRect(HWND hwnd)
{
RECT rect;
#ifdef __WIN16__
::GetClientRect(hwnd, &rect);
#else // Win32
if ( !::GetClientRect(hwnd, &rect) )
{
wxLogLastError(_T("GetClientRect"));
}
#endif // Win16/32
return rect;
}
-3
View File
@@ -74,9 +74,6 @@ public:
// -------------------------------
// implement base class virtuals
#ifdef __WIN16__
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
#endif // __WIN16__
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
protected:
+2 -2
View File
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// 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
@@ -25,7 +25,7 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxButtonBarNameStr;
class WXDLLEXPORT wxMemoryDC;
// ----------------------------------------------------------------------------
// wxToolBar for Win16
// wxToolBar for older Windowses
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxToolBar : public wxToolBarBase
-6
View File
@@ -147,12 +147,6 @@ public:
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);
+1 -1
View File
@@ -311,7 +311,7 @@
/* to be changed for Win64! */
# ifndef __WIN32__
# define __WIN16__
# error "__WIN32__ should be defined for Win32 and Win64, Win16 is not supported"
# endif
/*
+1 -3
View File
@@ -55,7 +55,7 @@ protected:
#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"
@@ -65,8 +65,6 @@ protected:
#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) \
-4
View File
@@ -10,11 +10,7 @@
#if defined(__WXUNIVERSAL__)
#include "wx/generic/treectlg.h"
#elif defined(__WXMSW__)
#ifdef __WIN16__
#include "wx/generic/treectlg.h"
#else
#include "wx/msw/treectrl.h"
#endif
#elif defined(__WXMOTIF__)
#include "wx/generic/treectlg.h"
#elif defined(__WXGTK__)
+1 -4
View File
@@ -22,10 +22,7 @@
/* 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
+3 -11
View File
@@ -45,17 +45,9 @@
#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
#endif
#endif // __WIN16__
#endif
#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);
#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) );
+1 -1
View 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
#if defined(__WIN16__) || defined(__WXMOTIF__)
#if defined(__WXMOTIF__)
int width, height;
frame->GetSize(& width, & height);
frame->SetSize(-1, -1, width, height);
-4
View File
@@ -390,10 +390,8 @@ void wxPrintData::ConvertToNative()
//// Collation
#ifndef __WIN16__
devMode->dmCollate = (m_printCollate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE);
devMode->dmFields |= DM_COLLATE;
#endif
//// Number of copies
@@ -516,7 +514,6 @@ void wxPrintData::ConvertFromNative()
//// Collation
#ifndef __WIN16__
if (devMode->dmFields & DM_COLLATE)
{
if (devMode->dmCollate == DMCOLLATE_TRUE)
@@ -524,7 +521,6 @@ void wxPrintData::ConvertFromNative()
else
m_printCollate = FALSE;
}
#endif
//// Number of copies
-4
View File
@@ -88,11 +88,7 @@ wxConfigBase *wxConfigBase::Create()
if ( ms_bAutoCreate && ms_pConfig == NULL ) {
ms_pConfig =
#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
#ifdef __WIN32__
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
+1 -7
View File
@@ -585,7 +585,7 @@ wxFileName::CreateTempFileName(const wxString& prefix, wxFile *fileTemp)
}
#elif defined(__WINDOWS__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__
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();
}
#else // Win16
if ( !::GetTempFileName(NULL, prefix, 0, wxStringBuffer(path, 1025)) )
{
path.clear();
}
#endif // Win32/16
#else // !Windows
if ( dir.empty() )
+2 -12
View File
@@ -721,12 +721,7 @@ static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz)
unsigned long wxSysErrorCode()
{
#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__
return ::GetLastError();
#else //WIN16
// TODO what to do on Windows 3.1?
return 0;
#endif //WIN16/32
#else //Unix
return errno;
#endif //Win/Unix
@@ -739,7 +734,6 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
nErrCode = wxSysErrorCode();
#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__
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;
#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);
@@ -783,7 +773,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
#else
return strerror((int)nErrCode);
#endif
#endif // Win/Unix
#endif // Win/Unix-WXMICROWIN
}
#endif // wxUSE_LOG
+5 -7
View File
@@ -168,7 +168,7 @@ bool wxGenericValidator::TransferToWindow(void)
}
} 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;
@@ -179,7 +179,7 @@ bool wxGenericValidator::TransferToWindow(void)
}
} else
#endif
#if wxUSE_SPINBTN && !defined(__WIN16__)
#if wxUSE_SPINBTN
if (m_validatorWindow->IsKindOf(CLASSINFO(wxSpinButton)) )
{
wxSpinButton* pControl = (wxSpinButton*) m_validatorWindow;
@@ -284,7 +284,7 @@ bool wxGenericValidator::TransferToWindow(void)
} 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)) )
{
@@ -398,7 +398,7 @@ bool wxGenericValidator::TransferFromWindow(void)
}
} 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;
@@ -409,7 +409,7 @@ bool wxGenericValidator::TransferFromWindow(void)
}
} else
#endif
#if wxUSE_SPINBTN && !defined(__WIN16__)
#if wxUSE_SPINBTN
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
#ifndef __WIN16__
// 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
#endif
#if wxUSE_LISTBOX
if (m_validatorWindow->IsKindOf(CLASSINFO(wxListBox)) )
{
-13
View File
@@ -713,18 +713,9 @@ bool wxVariantDataChar::Read(wxString& str)
* wxVariantDataString
*/
#if defined(__BORLANDC__) && defined(__WIN16__)
// Change name because of truncation
#define wxVariantDataString wxVariantStringData
#endif
class WXDLLIMPEXP_BASE wxVariantDataString: public wxVariantData
{
#if defined(__BORLANDC__) && defined(__WIN16__)
DECLARE_DYNAMIC_CLASS(wxVariantStringData)
#else
DECLARE_DYNAMIC_CLASS(wxVariantDataString)
#endif
public:
wxVariantDataString() { }
wxVariantDataString(const wxString& value) { m_value = value; }
@@ -816,11 +807,7 @@ bool wxVariantDataString::Read(wxString& str)
return TRUE;
}
#if defined(__BORLANDC__) && defined(__WIN16__)
IMPLEMENT_DYNAMIC_CLASS(wxVariantStringData, wxVariantData)
#else
IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
#endif
/*
* wxVariantDataVoidPtr
-4
View File
@@ -236,11 +236,7 @@ wxImage wxXPMDecoder::ReadFile(wxInputStream& stream)
*/
wxImage img = ReadData(xpm_lines);
#ifdef __WIN16__
delete[] (char**) xpm_lines;
#else
delete[] xpm_lines;
#endif
return img;
}
-4
View File
@@ -38,11 +38,7 @@
#endif
enum {
#ifdef __WIN16__
ZSTREAM_BUFFER_SIZE = 4096
#else
ZSTREAM_BUFFER_SIZE = 16384
#endif
};
//////////////////////
-4
View File
@@ -44,11 +44,7 @@
#include "wx/log.h"
#include "wx/intl.h"
#ifdef __WIN16__
#define wxUSE_IMAGE_IN_DRAGIMAGE 0
#else
#define wxUSE_IMAGE_IN_DRAGIMAGE 1
#endif
#if wxUSE_IMAGE_IN_DRAGIMAGE
#include "wx/image.h"
+1 -1
View File
@@ -29,7 +29,7 @@
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.
-6
View 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);
#ifndef __WIN16__
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);
#endif // !Win16
const wxString& message = messages.Last();
sizerAll->Add(CreateTextSizer(message), 1,
@@ -862,7 +860,6 @@ void wxLogDialog::CreateDetailsControls()
bool loadedIcons = TRUE;
#ifndef __WIN16__
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);
#endif // !Win16
// and fill it
wxString fmt = wxLog::GetTimestamp();
@@ -896,7 +892,6 @@ void wxLogDialog::CreateDetailsControls()
{
int image;
#ifndef __WIN16__
if ( loadedIcons )
{
switch ( m_severity[n] )
@@ -914,7 +909,6 @@ void wxLogDialog::CreateDetailsControls()
}
}
else // failed to load images
#endif // !Win16
{
image = -1;
}
+9 -45
View File
@@ -162,13 +162,10 @@ int wxNotebook::SetSelection(size_t nPage)
{
wxASSERT( IS_VALID_PAGE(nPage) );
#if defined (__WIN16__)
m_tabView->SetTabSelection(nPage);
#else
wxNotebookPage* pPage = GetPage(nPage);
m_tabView->SetTabSelection((int) (long) pPage);
#endif
// 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) );
#if defined (__WIN16__)
m_tabView->SetTabText(nPage, strText);
Refresh();
return TRUE;
#else
wxNotebookPage* page = GetPage(nPage);
if (page)
{
@@ -200,7 +193,7 @@ bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
Refresh();
return TRUE;
}
#endif
return FALSE;
}
@@ -208,15 +201,11 @@ wxString wxNotebook::GetPageText(size_t nPage) const
{
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;
#endif
}
int wxNotebook::GetPageImage(size_t nPage) const
@@ -269,11 +258,8 @@ bool wxNotebook::DeletePage(size_t nPage)
}
wxNotebookPage* pPage = GetPage(nPage);
#if defined (__WIN16__)
m_tabView->RemoveTab(nPage);
#else
m_tabView->RemoveTab((int) (long) pPage);
#endif
m_pages.Remove(pPage);
delete pPage;
@@ -286,11 +272,9 @@ bool wxNotebook::DeletePage(size_t nPage)
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);
#endif
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);
#if defined (__WIN16__)
m_tabView->RemoveTab(nPage);
#else
m_tabView->RemoveTab((int) (long) pPage);
#endif
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 );
// For 16 bit integers (tabs limited to 32768)
#if defined (__WIN16__)
m_tabView->AddTab(nPage, strText);
#else
m_tabView->AddTab((int) (long) pPage, strText);
#endif
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 defined (__WIN16__)
m_tabView->SetTabSelection(nPage, TRUE);
#else
m_tabView->SetTabSelection((int) (long) pPage, TRUE);
#endif
}
// 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());
#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;
@@ -701,7 +671,6 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId)
int activatePos = m_notebook->FindPagePosition(pActive);
int deactivatePos = m_notebook->FindPagePosition(pDeactive);
#endif
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());
#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;
@@ -729,7 +694,6 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId)
int activatePos = m_notebook->FindPagePosition(pActive);
int deactivatePos = m_notebook->FindPagePosition(pDeactive);
#endif
event.SetEventObject(m_notebook);
event.SetSelection(activatePos);
event.SetOldSelection(deactivatePos);
+2 -2
View File
@@ -46,7 +46,7 @@
#include "wx/statline.h"
#endif
#if !defined(__WIN16__) && wxUSE_SPINCTRL
#if wxUSE_SPINCTRL
#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 ) );
#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 );
-8
View File
@@ -670,19 +670,11 @@ void wxSashWindow::SizeWindows()
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);
#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)
+1 -1
View File
@@ -681,7 +681,7 @@ BEGIN_EVENT_TABLE(wxGenericTreeCtrl,wxScrolledWindow)
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.
-13
View File
@@ -59,10 +59,7 @@ wxAcceleratorRefData::~wxAcceleratorRefData()
{
if (m_hAccel)
{
// This function not available in WIN16
#if !defined(__WIN16__)
DestroyAcceleratorTable((HACCEL) m_hAccel);
#endif
}
m_hAccel = 0 ;
}
@@ -98,10 +95,8 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
// Create from an array
#if !defined(__WIN16__)
wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
{
// Not available in WIN16
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);
}
#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
{
-14
View File
@@ -276,13 +276,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
#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__
@@ -326,13 +319,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
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
-36
View File
@@ -275,13 +275,7 @@ bool wxBitmap::CopyFromCursor(const wxCursor& cursor)
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);
#endif // Win16
}
bool wxBitmap::CopyFromIcon(const wxIcon& icon)
@@ -291,37 +285,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
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);
#endif // Win16/Win32
}
#if wxUSE_WXDIB
+1 -7
View File
@@ -43,15 +43,9 @@
// 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))
#endif // Win16/32
// ===========================================================================
// implementation

Some files were not shown because too many files have changed in this diff Show More