diff --git a/docs/html/faqmsw.htm b/docs/html/faqmsw.htm
index 7cf90ae7ec..18584d9100 100644
--- a/docs/html/faqmsw.htm
+++ b/docs/html/faqmsw.htm
@@ -63,14 +63,13 @@ makefiles to see what other files have been left out.
16-bit compilation is supported under Visual C++ 1.5, and Borland BC++ 4 to 5.
-wxWindows 2 for Windows will also compile on Unix with gcc using TWIN32 from Willows,
-although TWIN32 is still in a preliminary state. The resulting executables are
-Unix binaries that work with the TWIN32 Windows API emulator.
+wxWindows 2 for Windows will also compile on Unix with gcc using Wine from WineHQ.
+The resulting executables are Unix binaries that work with the Wine Windows API emulator.
You can also compile wxWindows 2 for Windows on Unix with Cygwin or Mingw32, resulting
in executables that will run on Windows. So in theory you could write your applications
using wxGTK or wxMotif, then check/debug your wxWindows for Windows
-programs with TWIN32, and finally produce an ix86 Windows executable using Cygwin/Mingw32,
+programs with Wine, and finally produce an ix86 Windows executable using Cygwin/Mingw32,
without ever needing a copy of Microsoft Windows. See the Technical Note on the Web site detailing cross-compilation.
diff --git a/include/wx/mac/setup0.h b/include/wx/mac/setup0.h
index 23f662c3f9..0719c93098 100644
--- a/include/wx/mac/setup0.h
+++ b/include/wx/mac/setup0.h
@@ -975,7 +975,7 @@
//
// Recommended setting: 1, only set it to 0 if your compiler doesn't have
// or can't compile
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
#define wxUSE_RICHEDIT 1
// TODO: This should be ifdef'ed for any compilers that don't support
@@ -1086,16 +1086,6 @@
#define wxUSE_OWNER_DRAWN 0
#endif // __SALFORDC__
-#ifdef __TWIN32__
-
-#undef wxUSE_THREADS
-#define wxUSE_THREADS 0
-
-#undef wxUSE_ODBC
-#define wxUSE_ODBC 0
-
-#endif // __TWIN32__
-
// BC++/Win16 can't cope with the amount of data in resource.cpp
#if defined(__WIN16__) && defined(__BORLANDC__)
#undef wxUSE_WX_RESOURCES
diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h
index 3572eea40d..2e6ade4309 100644
--- a/include/wx/msw/setup0.h
+++ b/include/wx/msw/setup0.h
@@ -1012,7 +1012,7 @@
//
// Recommended setting: 1, only set it to 0 if your compiler doesn't have
// or can't compile
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
#define wxUSE_RICHEDIT 1
// TODO: This should be ifdef'ed for any compilers that don't support
@@ -1134,16 +1134,6 @@
#define wxUSE_OWNER_DRAWN 0
#endif // __SALFORDC__
-#ifdef __TWIN32__
-
-#undef wxUSE_THREADS
-#define wxUSE_THREADS 0
-
-#undef wxUSE_ODBC
-#define wxUSE_ODBC 0
-
-#endif // __TWIN32__
-
// BC++/Win16 can't cope with the amount of data in resource.cpp
#if defined(__WIN16__) && defined(__BORLANDC__)
#undef wxUSE_WX_RESOURCES
diff --git a/include/wx/msw/setup_microwin.h b/include/wx/msw/setup_microwin.h
index bec0f0507a..21ea52e5ea 100644
--- a/include/wx/msw/setup_microwin.h
+++ b/include/wx/msw/setup_microwin.h
@@ -975,7 +975,7 @@
//
// Recommended setting: 1, only set it to 0 if your compiler doesn't have
// or can't compile
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
#define wxUSE_RICHEDIT 1
// TODO: This should be ifdef'ed for any compilers that don't support
@@ -1091,16 +1091,6 @@
#define wxUSE_OWNER_DRAWN 0
#endif // __SALFORDC__
-#ifdef __TWIN32__
-
-#undef wxUSE_THREADS
-#define wxUSE_THREADS 0
-
-#undef wxUSE_ODBC
-#define wxUSE_ODBC 0
-
-#endif // __TWIN32__
-
// BC++/Win16 can't cope with the amount of data in resource.cpp
#if defined(__WIN16__) && defined(__BORLANDC__)
#undef wxUSE_WX_RESOURCES
diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h
index 602f01a784..39ab7f45d0 100644
--- a/include/wx/msw/wince/setup.h
+++ b/include/wx/msw/wince/setup.h
@@ -1011,7 +1011,7 @@
//
// Recommended setting: 1, only set it to 0 if your compiler doesn't have
// or can't compile
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
#define wxUSE_RICHEDIT 1
// TODO: This should be ifdef'ed for any compilers that don't support
@@ -1133,16 +1133,6 @@
#define wxUSE_OWNER_DRAWN 0
#endif // __SALFORDC__
-#ifdef __TWIN32__
-
-#undef wxUSE_THREADS
-#define wxUSE_THREADS 0
-
-#undef wxUSE_ODBC
-#define wxUSE_ODBC 0
-
-#endif // __TWIN32__
-
// BC++/Win16 can't cope with the amount of data in resource.cpp
#if defined(__WIN16__) && defined(__BORLANDC__)
#undef wxUSE_WX_RESOURCES
diff --git a/include/wx/platform.h b/include/wx/platform.h
index 24d8e5a99f..4cc8041dda 100644
--- a/include/wx/platform.h
+++ b/include/wx/platform.h
@@ -76,10 +76,6 @@
#endif
#endif /* WINE */
-#if defined(TWIN32) && !defined(__TWIN32__)
- #define __TWIN32__
-#endif /* Twin32 */
-
/*
Include wx/setup.h for the Unix platform defines generated by configure and
the library compilation options
diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h
index 9c7add4ab3..5d5d864f70 100644
--- a/include/wx/univ/setup0.h
+++ b/include/wx/univ/setup0.h
@@ -1112,7 +1112,7 @@
//
// Recommended setting: 1, only set it to 0 if your compiler doesn't have
// or can't compile
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
// TODO: This should be ifdef'ed for any compilers that don't support
// RichEdit 2.0 but do have RichEdit 1.0...
#define wxUSE_RICHEDIT 0 // currently not supported
@@ -1212,14 +1212,6 @@
#define wxUSE_OWNER_DRAWN 0
#endif // __SALFORDC__
-#ifdef __TWIN32__
- #undef wxUSE_THREADS
- #define wxUSE_THREADS 0
-
- #undef wxUSE_ODBC
- #define wxUSE_ODBC 0
-#endif // __TWIN32__
-
// BC++/Win16 can't cope with the amount of data in resource.cpp
#if defined(__WIN16__) && defined(__BORLANDC__)
#undef wxUSE_WX_RESOURCES
diff --git a/setup.h.in b/setup.h.in
index 38557e40bb..50fdb2a3be 100644
--- a/setup.h.in
+++ b/setup.h.in
@@ -136,7 +136,7 @@
#endif
/* enable rich edit under Win32 */
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
#define wxUSE_RICHEDIT 1
#else
#define wxUSE_RICHEDIT 0
diff --git a/setup.h_vms b/setup.h_vms
index e023e9b334..d9aea207ec 100644
--- a/setup.h_vms
+++ b/setup.h_vms
@@ -148,7 +148,7 @@
#endif
/* enable rich edit under Win32 */
-#if defined(__WIN95__) && !defined(__TWIN32__) && !defined(__GNUWIN32_OLD__)
+#if defined(__WIN95__) && !defined(__WINE__) && !defined(__GNUWIN32_OLD__)
#define wxUSE_RICHEDIT 1
#else
#define wxUSE_RICHEDIT 0
diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp
index f6d5b9d69f..8310ce87b9 100644
--- a/src/common/filefn.cpp
+++ b/src/common/filefn.cpp
@@ -131,10 +131,6 @@
#ifdef __CYGWIN__
#include
#endif
-
- #ifndef __TWIN32__
- #include
- #endif
#endif // __GNUWIN32__
#endif // __WINDOWS__
diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp
index 88351417c7..66414b01a4 100644
--- a/src/msw/accel.cpp
+++ b/src/msw/accel.cpp
@@ -58,7 +58,7 @@ wxAcceleratorRefData::~wxAcceleratorRefData()
if (m_hAccel)
{
// This function not available in WIN16
-#if !defined(__WIN16__) && !defined(__TWIN32__)
+#if !defined(__WIN16__)
DestroyAcceleratorTable((HACCEL) m_hAccel);
#endif
}
@@ -80,7 +80,7 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
m_refData = new wxAcceleratorRefData;
HACCEL hAccel =
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
#ifdef UNICODE
::LoadAcceleratorsW(wxGetInstance(), (const wxChar *)resource);
#else
@@ -96,7 +96,7 @@ wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
extern int wxCharCodeWXToMSW(int id, bool *isVirtual);
// Create from an array
-#if !defined(__WIN16__) && !defined(__TWIN32__)
+#if !defined(__WIN16__)
wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
{
// Not available in WIN16
diff --git a/src/msw/app.cpp b/src/msw/app.cpp
index 0cee8d9455..98e2814649 100644
--- a/src/msw/app.cpp
+++ b/src/msw/app.cpp
@@ -84,7 +84,7 @@
#include
#include
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__) || defined(__WXMICROWIN__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__WXMICROWIN__)) && !defined(__CYGWIN10__))
#include
#endif
@@ -1381,6 +1381,6 @@ void wxWakeUpIdle()
// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
// if in a separate file. So include it here to ensure it's linked.
-#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__WINE__) && !defined(__TWIN32__) && !defined(WXMAKINGDLL))
+#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__WINE__) && !defined(WXMAKINGDLL))
#include "main.cpp"
#endif
diff --git a/src/msw/control.cpp b/src/msw/control.cpp
index e05ee6476d..8be39b2fca 100644
--- a/src/msw/control.cpp
+++ b/src/msw/control.cpp
@@ -33,7 +33,7 @@
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp
index c5b16d9dc0..606abdac8b 100644
--- a/src/msw/dde.cpp
+++ b/src/msw/dde.cpp
@@ -46,7 +46,7 @@
#include
#include
-#if defined(__TWIN32__) || defined(__GNUWIN32_OLD__)
+#ifdef __GNUWIN32_OLD__
#include "wx/msw/gnuwin32/extra.h"
#endif
diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp
index ae349c83fd..a1dfb5b4b9 100644
--- a/src/msw/dragimag.cpp
+++ b/src/msw/dragimag.cpp
@@ -51,7 +51,7 @@
#include "wx/msw/dragimag.h"
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp
index 62d8593826..7df84ca373 100644
--- a/src/msw/gauge95.cpp
+++ b/src/msw/gauge95.cpp
@@ -37,7 +37,7 @@
#include "wx/msw/gauge95.h"
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp
index 09c344d1d9..d9526df4ed 100644
--- a/src/msw/imaglist.cpp
+++ b/src/msw/imaglist.cpp
@@ -46,7 +46,7 @@
#include "wx/msw/imaglist.h"
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
@@ -162,10 +162,6 @@ int wxImageList::Add(const wxBitmap& bitmap, const wxBitmap& mask)
// 'bitmap'.
int wxImageList::Add(const wxBitmap& bitmap, const wxColour& maskColour)
{
-#ifdef __TWIN32__
- wxFAIL_MSG(_T("ImageList_AddMasked not implemented in TWIN32"));
- return -1;
-#else
int index = ImageList_AddMasked(GetHImageList(),
GetHbitmapOf(bitmap),
wxColourToRGB(maskColour));
@@ -175,7 +171,6 @@ int wxImageList::Add(const wxBitmap& bitmap, const wxColour& maskColour)
}
return index;
-#endif
}
// Adds a bitmap and mask from an icon.
@@ -196,10 +191,6 @@ int wxImageList::Add(const wxIcon& icon)
bool wxImageList::Replace(int index,
const wxBitmap& bitmap, const wxBitmap& mask)
{
-#ifdef __TWIN32__
- wxFAIL_MSG(_T("ImageList_Replace not implemented in TWIN32"));
- return FALSE;
-#else
HBITMAP hbmpMask = GetMaskForImage(bitmap, mask);
bool ok = ImageList_Replace(GetHImageList(), index,
@@ -212,7 +203,6 @@ bool wxImageList::Replace(int index,
::DeleteObject(hbmpMask);
return ok;
-#endif
}
// Replaces a bitmap and mask from an icon.
@@ -230,10 +220,6 @@ bool wxImageList::Replace(int i, const wxIcon& icon)
// Removes the image at the given index.
bool wxImageList::Remove(int index)
{
-#ifdef __TWIN32__
- wxFAIL_MSG(_T("ImageList_Replace not implemented in TWIN32"));
- return FALSE;
-#else
bool ok = ImageList_Remove(GetHImageList(), index) != 0;
if ( !ok )
{
@@ -241,7 +227,6 @@ bool wxImageList::Remove(int index)
}
return ok;
-#endif
}
// Remove all images
@@ -269,10 +254,6 @@ bool wxImageList::Draw(int index,
int flags,
bool solidBackground)
{
-#ifdef __TWIN32__
- wxFAIL_MSG(_T("ImageList_Replace not implemented in TWIN32"));
- return FALSE;
-#else
HDC hDC = GetHdcOf(dc);
wxCHECK_MSG( hDC, FALSE, _T("invalid wxDC in wxImageList::Draw") );
@@ -305,7 +286,6 @@ bool wxImageList::Draw(int index,
}
return ok;
-#endif
}
// ----------------------------------------------------------------------------
diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp
index 0d0a0d0751..eb5ea63c87 100644
--- a/src/msw/joystick.cpp
+++ b/src/msw/joystick.cpp
@@ -32,14 +32,12 @@
typedef UINT MMRESULT;
#endif
-#ifndef __TWIN32__
#ifdef __GNUWIN32_OLD__
#include "wx/msw/gnuwin32/extra.h"
#endif
-#endif
// Why doesn't BC++ have joyGetPosEx?
-#if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__)
+#if !defined(__WIN32__) || defined(__BORLANDC__)
#define NO_JOYGETPOSEX
#endif
@@ -376,7 +374,7 @@ int wxJoystick::GetNumberButtons() const
int wxJoystick::GetNumberAxes() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -389,7 +387,7 @@ int wxJoystick::GetNumberAxes() const
int wxJoystick::GetMaxButtons() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -402,7 +400,7 @@ int wxJoystick::GetMaxButtons() const
int wxJoystick::GetMaxAxes() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -433,7 +431,7 @@ int wxJoystick::GetPollingMax() const
int wxJoystick::GetRudderMin() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -446,7 +444,7 @@ int wxJoystick::GetRudderMin() const
int wxJoystick::GetRudderMax() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -459,7 +457,7 @@ int wxJoystick::GetRudderMax() const
int wxJoystick::GetUMin() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -472,7 +470,7 @@ int wxJoystick::GetUMin() const
int wxJoystick::GetUMax() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -485,7 +483,7 @@ int wxJoystick::GetUMax() const
int wxJoystick::GetVMin() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -498,7 +496,7 @@ int wxJoystick::GetVMin() const
int wxJoystick::GetVMax() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return 0;
@@ -512,7 +510,7 @@ int wxJoystick::GetVMax() const
bool wxJoystick::HasRudder() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return FALSE;
@@ -525,7 +523,7 @@ bool wxJoystick::HasRudder() const
bool wxJoystick::HasZ() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return FALSE;
@@ -538,7 +536,7 @@ bool wxJoystick::HasZ() const
bool wxJoystick::HasU() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return FALSE;
@@ -551,7 +549,7 @@ bool wxJoystick::HasU() const
bool wxJoystick::HasV() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return FALSE;
@@ -564,7 +562,7 @@ bool wxJoystick::HasV() const
bool wxJoystick::HasPOV() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return FALSE;
@@ -577,7 +575,7 @@ bool wxJoystick::HasPOV() const
bool wxJoystick::HasPOV4Dir() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return FALSE;
@@ -590,7 +588,7 @@ bool wxJoystick::HasPOV4Dir() const
bool wxJoystick::HasPOVCTS() const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
JOYCAPS joyCaps;
if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR)
return FALSE;
diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp
index 6bcc8af1a8..4d31896890 100644
--- a/src/msw/listbox.cpp
+++ b/src/msw/listbox.cpp
@@ -43,10 +43,8 @@
#include "wx/ownerdrw.h"
#endif
-#ifndef __TWIN32__
- #ifdef __GNUWIN32_OLD__
- #include "wx/msw/gnuwin32/extra.h"
- #endif
+#ifdef __GNUWIN32_OLD__
+ #include "wx/msw/gnuwin32/extra.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp
index abfcab36db..02cbeb0947 100644
--- a/src/msw/listctrl.cpp
+++ b/src/msw/listctrl.cpp
@@ -45,7 +45,7 @@
#include "wx/msw/private.h"
-#if ((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
#include "wx/msw/gnuwin32/extra.h"
#else
#include
diff --git a/src/msw/main.cpp b/src/msw/main.cpp
index a2f18278cf..f09bc43588 100644
--- a/src/msw/main.cpp
+++ b/src/msw/main.cpp
@@ -72,7 +72,7 @@ HINSTANCE wxhInstance = 0;
#if !defined(_WINDLL)
-#if defined(__TWIN32__) || defined(__WXMICROWIN__)
+#if defined(__WXMICROWIN__)
#define HINSTANCE HANDLE
extern "C"
diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp
index 2b4e637099..542d99ff49 100644
--- a/src/msw/minifram.cpp
+++ b/src/msw/minifram.cpp
@@ -45,10 +45,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame)
#include "wx/minifram.h"
-#ifndef __TWIN32__
- #ifdef __GNUWIN32_OLD__
- #include "wx/msw/gnuwin32/extra.h"
- #endif
+#ifdef __GNUWIN32_OLD__
+ #include "wx/msw/gnuwin32/extra.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame)
diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp
index 5d251c9cc8..2abb33debe 100644
--- a/src/msw/nativdlg.cpp
+++ b/src/msw/nativdlg.cpp
@@ -34,7 +34,7 @@
#include "wx/wx.h"
#endif
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__)
#include "wx/spinbutt.h"
#endif
#include "wx/msw/private.h"
@@ -239,7 +239,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
{
win = new wxScrollBar;
}
-#if defined(__WIN95__) && !defined(__TWIN32__) && wxUSE_SPINBTN
+#if defined(__WIN95__) && wxUSE_SPINBTN
else if (str == wxT("MSCTLS_UPDOWN32"))
{
win = new wxSpinButton;
diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp
index 0cd903edfe..1a5c80b40d 100644
--- a/src/msw/notebook.cpp
+++ b/src/msw/notebook.cpp
@@ -42,13 +42,11 @@
#include // for SetWindowFont
-#ifndef __TWIN32__
- #ifdef __GNUWIN32_OLD__
- #include "wx/msw/gnuwin32/extra.h"
- #endif
+#ifdef __GNUWIN32_OLD__
+ #include "wx/msw/gnuwin32/extra.h"
#endif
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp
index f5ec84b453..615db17076 100644
--- a/src/msw/ownerdrw.cpp
+++ b/src/msw/ownerdrw.cpp
@@ -225,7 +225,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight)
// Win32 GDI functions and not wxWindows ones. Might help to whoever decides to
// port this code to X. (VZ)
-#if defined(__WIN32__) && !defined(__SYMANTEC__) && !defined(__TWIN32__)
+#if defined(__WIN32__) && !defined(__SYMANTEC__)
#define O_DRAW_NATIVE_API // comments below explain why I use it
#endif
diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp
index 4dcca6a04a..c0f5e6a304 100644
--- a/src/msw/registry.cpp
+++ b/src/msw/registry.cpp
@@ -313,7 +313,7 @@ bool wxRegKey::GetKeyInfo(size_t *pnSubKeys,
size_t *pnValues,
size_t *pnMaxValueLen) const
{
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
// old gcc headers incorrectly prototype RegQueryInfoKey()
#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)
@@ -680,14 +680,14 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
if ( !Open() )
return FALSE;
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue);
if ( m_dwLastError != ERROR_SUCCESS ) {
wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"),
szValue, GetName().c_str());
return FALSE;
}
- #else //WIN16
+#else //WIN16
// named registry values don't exist in Win16 world
wxASSERT( IsEmpty(szValue) );
@@ -698,7 +698,7 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
GetName().c_str());
return FALSE;
}
- #endif //WIN16/32
+#endif //WIN16/32
return TRUE;
}
@@ -788,10 +788,6 @@ wxRegKey::ValueType wxRegKey::GetValueType(const wxChar *szValue) const
#ifdef __WIN32__
bool wxRegKey::SetValue(const wxChar *szValue, long lValue)
{
-#ifdef __TWIN32__
- wxFAIL_MSG("RegSetValueEx not implemented by TWIN32");
- return FALSE;
-#else
if ( CONST_CAST Open() ) {
m_dwLastError = RegSetValueEx((HKEY) m_hKey, szValue, (DWORD) RESERVED, REG_DWORD,
(RegString)&lValue, sizeof(lValue));
@@ -802,7 +798,6 @@ bool wxRegKey::SetValue(const wxChar *szValue, long lValue)
wxLogSysError(m_dwLastError, _("Can't set value of '%s'"),
GetFullName(this, szValue));
return FALSE;
-#endif
}
bool wxRegKey::QueryValue(const wxChar *szValue, long *plValue) const
@@ -909,20 +904,20 @@ bool wxRegKey::QueryValue(const wxChar *szValue,
bool wxRegKey::SetValue(const wxChar *szValue, const wxString& strValue)
{
if ( CONST_CAST Open() ) {
-#if defined( __WIN32__) && !defined(__TWIN32__)
+#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;
- #else //WIN16
+#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
+#endif //WIN16/32
}
wxLogSysError(m_dwLastError, _("Can't set value of '%s'"),
@@ -960,7 +955,7 @@ bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
if ( lIndex == -1 )
return FALSE;
-#if defined( __WIN32__) && !defined(__TWIN32__)
+#if defined( __WIN32__)
wxChar szValueName[1024]; // @@ use RegQueryInfoKey...
DWORD dwValueLen = WXSIZEOF(szValueName);
@@ -985,13 +980,13 @@ bool wxRegKey::GetNextValue(wxString& strValueName, long& lIndex) const
}
strValueName = szValueName;
- #else //WIN16
+#else //WIN16
// only one unnamed value
wxASSERT( lIndex == 0 );
lIndex = -1;
strValueName.Empty();
- #endif
+#endif
return TRUE;
}
diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp
index ba25fe1687..da71dcdfda 100644
--- a/src/msw/slider95.cpp
+++ b/src/msw/slider95.cpp
@@ -33,7 +33,7 @@
#include "wx/msw/slider95.h"
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp
index f875c29fd9..3547df37d0 100644
--- a/src/msw/spinbutt.cpp
+++ b/src/msw/spinbutt.cpp
@@ -39,13 +39,11 @@
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-// Can't resolve reference to CreateUpDownControl in
-// TWIN32, but could probably use normal CreateWindow instead.
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__)
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp
index 2f3bdc7b11..406afce629 100644
--- a/src/msw/spinctrl.cpp
+++ b/src/msw/spinctrl.cpp
@@ -40,7 +40,7 @@
#include "wx/spinctrl.h"
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp
index cab0b401be..3205e84971 100644
--- a/src/msw/statbr95.cpp
+++ b/src/msw/statbr95.cpp
@@ -36,7 +36,7 @@
#include "wx/msw/private.h"
#include
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp
index 6e7bfdebc8..251e484a37 100644
--- a/src/msw/tabctrl.cpp
+++ b/src/msw/tabctrl.cpp
@@ -32,7 +32,7 @@
#include
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#else
#include "wx/msw/gnuwin32/extra.h"
diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp
index 199471c456..4c868c06a5 100644
--- a/src/msw/taskbar.cpp
+++ b/src/msw/taskbar.cpp
@@ -29,7 +29,7 @@
#include "wx/menu.h"
#endif
-#if defined(__WIN95__) && !defined(__TWIN32__)
+#if defined(__WIN95__)
#include
@@ -39,10 +39,8 @@
#include "wx/taskbar.h"
#include "wx/msw/private.h"
-#ifndef __TWIN32__
- #ifdef __GNUWIN32_OLD__
- #include "wx/msw/gnuwin32/extra.h"
- #endif
+#ifdef __GNUWIN32_OLD__
+ #include "wx/msw/gnuwin32/extra.h"
#endif
#ifdef __SALFORDC__
diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp
index 50b56666d4..3af9bfe8e8 100644
--- a/src/msw/tbar95.cpp
+++ b/src/msw/tbar95.cpp
@@ -49,16 +49,12 @@
#include "wx/msw/private.h"
-#ifndef __TWIN32__
-
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#else
#include "wx/msw/gnuwin32/extra.h"
#endif
-#endif // __TWIN32__
-
#include "wx/app.h" // for GetComCtl32Version
#if defined(__MWERKS__) && defined(__WXMSW__)
diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp
index f42840e457..8c50c9bd3e 100644
--- a/src/msw/tooltip.cpp
+++ b/src/msw/tooltip.cpp
@@ -32,7 +32,7 @@
#include "wx/tooltip.h"
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp
index d412e56ef7..bfe95ab1f7 100644
--- a/src/msw/treectrl.cpp
+++ b/src/msw/treectrl.cpp
@@ -59,7 +59,7 @@
#include "wx/msw/gnuwin32/extra.h"
#endif
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include
#endif
diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp
index b70c622689..0b2827e0e7 100644
--- a/src/msw/utils.cpp
+++ b/src/msw/utils.cpp
@@ -56,7 +56,7 @@
#endif
#endif //GNUWIN32
-#if defined(__CYGWIN__) && !defined(__TWIN32__)
+#if defined(__CYGWIN__)
#include
#include
#include // for cygwin_conv_to_full_win32_path()
@@ -147,7 +147,7 @@ static const wxChar eUSERID[] = wxT("UserId");
// Get hostname only (without domain name)
bool wxGetHostName(wxChar *buf, int maxSize)
{
-#if defined(__WIN32__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
DWORD nSize = maxSize;
if ( !::GetComputerName(buf, &nSize) )
{
@@ -173,7 +173,7 @@ bool wxGetHostName(wxChar *buf, int maxSize)
// get full hostname (with domain name if possible)
bool wxGetFullHostName(wxChar *buf, int maxSize)
{
-#if defined(__WIN32__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
+#if defined(__WIN32__) && !defined(__WXMICROWIN__) && ! (defined(__GNUWIN32__) && !defined(__MINGW32__))
// TODO should use GetComputerNameEx() when available
// the idea is that if someone had set wxUSE_SOCKETS to 0 the code
@@ -227,7 +227,7 @@ bool wxGetFullHostName(wxChar *buf, int maxSize)
// Get user ID e.g. jacs
bool wxGetUserId(wxChar *buf, int maxSize)
{
-#if defined(__WIN32__) && !defined(__win32s__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)
+#if defined(__WIN32__) && !defined(__win32s__) && !defined(__WXMICROWIN__)
DWORD nSize = maxSize;
if ( ::GetUserName(buf, &nSize) == 0 )
{
@@ -366,7 +366,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
{
wxString& strDir = *pstr;
- #if defined(__UNIX__) && !defined(__TWIN32__)
+ #if defined(__UNIX__)
const wxChar *szHome = wxGetenv("HOME");
if ( szHome == NULL ) {
// we're homeless...
@@ -934,7 +934,7 @@ bool wxShutdown(wxShutdownFlags wFlags)
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
long wxGetFreeMemory()
{
-#if defined(__WIN32__) && !defined(__BORLANDC__) && !defined(__TWIN32__)
+#if defined(__WIN32__) && !defined(__BORLANDC__)
MEMORYSTATUS memStatus;
memStatus.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&memStatus);
diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp
index 17eac58b19..79f509782d 100644
--- a/src/msw/utilsexc.cpp
+++ b/src/msw/utilsexc.cpp
@@ -54,7 +54,7 @@
#endif
#endif
-#if defined(__GNUWIN32__) && !defined(__TWIN32__)
+#if defined(__GNUWIN32__)
#include
#include
#endif
@@ -594,7 +594,7 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
command = cmd;
}
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
// the IO redirection is only supported with wxUSE_STREAMS
BOOL redirect = FALSE;
diff --git a/src/msw/wave.cpp b/src/msw/wave.cpp
index abb89060fb..d3ff52853b 100644
--- a/src/msw/wave.cpp
+++ b/src/msw/wave.cpp
@@ -70,7 +70,7 @@ bool wxWave::Create(const wxString& fileName, bool isResource)
m_isResource = TRUE;
HRSRC hresInfo;
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
#ifdef _UNICODE
hresInfo = ::FindResourceW((HMODULE) wxhInstance, fileName, wxT("WAVE"));
#else
diff --git a/src/msw/window.cpp b/src/msw/window.cpp
index 83a50202fa..ec90c5d2b7 100644
--- a/src/msw/window.cpp
+++ b/src/msw/window.cpp
@@ -104,14 +104,12 @@
#include
#endif
-#if (!defined(__GNUWIN32_OLD__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)) || defined(__CYGWIN10__)
+#if (!defined(__GNUWIN32_OLD__) && !defined(__WXMICROWIN__)) || defined(__CYGWIN10__)
#ifdef __WIN95__
#include
#endif
#elif !defined(__WXMICROWIN__) // broken compiler
- #ifndef __TWIN32__
- #include "wx/msw/gnuwin32/extra.h"
- #endif
+ #include "wx/msw/gnuwin32/extra.h"
#endif
// ----------------------------------------------------------------------------
@@ -4824,7 +4822,7 @@ void wxSetKeyboardHook(bool doIt)
wxTheKeyboardHookProc = MakeProcInstance((FARPROC) wxKeyboardHook, wxGetInstance());
wxTheKeyboardHook = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC) wxTheKeyboardHookProc, wxGetInstance(),
-#if defined(__WIN32__) && !defined(__TWIN32__)
+#if defined(__WIN32__)
GetCurrentThreadId()
// (DWORD)GetCurrentProcess()); // This is another possibility. Which is right?
#else