From 6244848856584171db8cd74a7ff227250e46cc54 Mon Sep 17 00:00:00 2001
From: Julian Smart <julian@anthemion.co.uk>
Date: Mon, 28 Dec 1998 12:35:49 +0000
Subject: [PATCH] Changes for 16-bit BC++ (not there yet), GnuWin32; typetest
 sample fixed; some documentation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/body.tex           | 176 +-----
 docs/latex/wx/document.tex       |   1 +
 docs/latex/wx/log.tex            |   1 +
 docs/latex/wx/manual.tex         |  37 +-
 docs/latex/wx/sckaddr.tex        |  12 +
 docs/latex/wx/socket.tex         |   1 +
 docs/latex/wx/tconfig.tex        |   1 +
 docs/latex/wx/tdnd.tex           |   2 +-
 docs/msw/install.txt             |  44 +-
 include/wx/defs.h                |   2 +-
 include/wx/event.h               |   7 +
 include/wx/filefn.h              |   6 +-
 include/wx/generic/dirdlgg.h     |   2 +-
 include/wx/generic/notebook.h    |  25 +
 include/wx/generic/treectrl.h    |  10 +-
 include/wx/list.h                |   2 +-
 include/wx/msw/filedlg.h         |   2 +-
 include/wx/msw/frame.h           |   3 +-
 include/wx/msw/private.h         |  12 +
 include/wx/msw/tbarmsw.h         |   2 +-
 include/wx/string.h              |   4 +-
 include/wx/tbarbase.h            |   4 +-
 include/wx/utils.h               |  22 +-
 samples/config/makefile.bcc      |  19 +
 samples/controls/makefile.bcc    |  19 +
 samples/dialogs/makefile.bcc     |  19 +
 samples/docview/makefile.bcc     |  68 +--
 samples/docvwmdi/makefile.bcc    |  19 +
 samples/dynamic/makefile.bcc     |  19 +
 samples/forty/makefile.bcc       |  19 +
 samples/grid/makefile.bcc        |  19 +
 samples/help/makefile.bcc        |  19 +
 samples/image/makefile.bcc       |  19 +
 samples/internat/makefile.bcc    |  64 +--
 samples/joytest/makefile.bcc     |  66 +--
 samples/layout/makefile.bcc      |  67 +--
 samples/listctrl/makefile.bcc    |  19 +
 samples/mdi/makefile.bcc         |  66 +--
 samples/memcheck/makefile.bcc    |  68 +--
 samples/minifram/makefile.bcc    |  19 +
 samples/minimal/makefile.bcc     |  19 +
 samples/nativdlg/makefile.bcc    |  65 +--
 samples/notebook/makefile.bcc    |  19 +
 samples/ownerdrw/makefile.bcc    |  19 +
 samples/png/makefile.bcc         |  19 +
 samples/printing/makefile.bcc    |  19 +
 samples/resource/makefile.bcc    |  65 +--
 samples/sashtest/makefile.bcc    |  19 +
 samples/splitter/makefile.bcc    |  19 +
 samples/tab/makefile.bcc         |  19 +
 samples/toolbar/makefile.bcc     |  19 +
 samples/treectrl/makefile.bcc    |  19 +
 samples/typetest/makefile.bcc    |  19 +
 samples/typetest/typetest.cpp    |  12 +-
 samples/typetest/typetest.def    |   1 -
 samples/validate/makefile.bcc    |  19 +
 samples/wxpoem/makefile.bcc      |  19 +
 src/common/dynlib.cpp            |   4 +
 src/common/image.cpp             |   3 +
 src/common/list.cpp              |   2 +-
 src/common/socket.cpp            |  25 +-
 src/common/string.cpp            |   3 +
 src/common/variant.cpp           |  13 +
 src/generic/notebook.cpp         |   5 +
 src/makebcc.env                  |  14 +-
 src/makeprog.bcc                 |  47 ++
 src/msw/app.cpp                  |   8 +-
 src/msw/data.cpp                 |   1 +
 src/msw/dibutils.cpp             |   6 +-
 src/msw/iniconf.cpp              |   6 +-
 src/msw/makefile.b32             |  29 +-
 src/msw/makefile.bcc             | 952 ++++++++++++++++++++-----------
 src/msw/makefile.g95             |   2 -
 src/msw/makefile.nt              |  12 +-
 src/msw/makefile.wat             |   9 +-
 src/msw/pnghand.cpp              |   8 +
 src/msw/treectrl.cpp             |   2 +-
 utils/dialoged/docs/dialoged.hpj |   2 +-
 utils/dialoged/docs/tex2rtf.ini  |   3 +-
 utils/wxprop/docs/body.tex       |  12 +-
 utils/wxprop/docs/changes.tex    |   7 +-
 utils/wxprop/docs/prop.tex       |  30 +-
 utils/wxprop/docs/tex2rtf.ini    |   2 +-
 utils/wxprop/docs/wxprop.hpj     |   2 +-
 utils/wxtree/src/makefile.b32    |   2 +-
 85 files changed, 1499 insertions(+), 1088 deletions(-)
 create mode 100644 samples/config/makefile.bcc
 create mode 100644 samples/controls/makefile.bcc
 create mode 100644 samples/dialogs/makefile.bcc
 create mode 100644 samples/docvwmdi/makefile.bcc
 create mode 100644 samples/dynamic/makefile.bcc
 create mode 100644 samples/forty/makefile.bcc
 create mode 100644 samples/grid/makefile.bcc
 create mode 100644 samples/help/makefile.bcc
 create mode 100644 samples/image/makefile.bcc
 create mode 100644 samples/listctrl/makefile.bcc
 create mode 100644 samples/minifram/makefile.bcc
 create mode 100644 samples/minimal/makefile.bcc
 create mode 100644 samples/notebook/makefile.bcc
 create mode 100644 samples/ownerdrw/makefile.bcc
 create mode 100644 samples/png/makefile.bcc
 create mode 100644 samples/printing/makefile.bcc
 create mode 100644 samples/sashtest/makefile.bcc
 create mode 100644 samples/splitter/makefile.bcc
 create mode 100644 samples/tab/makefile.bcc
 create mode 100644 samples/toolbar/makefile.bcc
 create mode 100644 samples/treectrl/makefile.bcc
 create mode 100644 samples/typetest/makefile.bcc
 create mode 100644 samples/validate/makefile.bcc
 create mode 100644 samples/wxpoem/makefile.bcc
 create mode 100644 src/makeprog.bcc

diff --git a/docs/latex/wx/body.tex b/docs/latex/wx/body.tex
index 741e1b61be..238551d945 100644
--- a/docs/latex/wx/body.tex
+++ b/docs/latex/wx/body.tex
@@ -7,7 +7,8 @@
 
 wxWindows is a C++ framework providing GUI (Graphical User
 Interface) and other facilities on more than one platform.  Version 2.0 currently
-supports subsets MS Windows (16-bit, Windows 95 and Windows NT) and GTK.
+supports subsets MS Windows (16-bit, Windows 95 and Windows NT) and GTK+, with Motif
+and Mac ports in an advanced state.
 
 wxWindows was originally developed at the Artificial Intelligence
 Applications Institute, University of Edinburgh, for internal use.
@@ -55,9 +56,6 @@ that are often indistinguishable from those produced using single-platform
 toolkits
 such as Motif and MFC.
 
-wxWindows 2.0 currently maps to two native APIs: GTK and
-MS Windows. Motif, Xt and Mac ports are also in preparation.
-
 The importance of using a platform-independent class library cannot be
 overstated, since GUI application development is very time-consuming,
 and sustained popularity of particular GUIs cannot be guaranteed.
@@ -85,17 +83,16 @@ here are some of the benefits:
 \item Constraint-based layout option.
 \item Print/preview and document/view architectures.
 \item Status line facility, toolbar
-\item Easy, object-oriented interprocess comms (DDE subset) under Unix and
-MS Windows.
 \item Encapsulated PostScript generation under Unix, normal MS Windows printing on the
 PC.
-\item MDI support under Windows and GTK.
-\item Can be used to create DLLs under Windows, dynamic libraries on the Sun.
+\item MDI (Multiple Document Interface) support.
+\item Can be used to create DLLs under Windows, dynamic libraries on Unix.
 \item Common dialogs for file browsing, printing, colour selection, etc.
 \item Under MS Windows, support for creating metafiles and copying
 them to the clipboard.
-\item Hypertext help facility, with an API for invocation from applications.
+\item An API for invoking help from applications.
 \item Dialog Editor for building dialogs.
+\item Socket support.
 \end{itemize}
 
 \section{Changes from version 1.xx}\label{versionchanges}
@@ -106,9 +103,8 @@ Removals:
 
 \begin{itemize}\itemsep=0pt
 \item XView is no longer supported;
-\item Mac is not yet supported;
 \item all controls (panel items) no longer have labels attached to them;
-\item wxForm removed;
+\item wxForm has been removed;
 \item wxCanvasDC, wxPanelDC removed (replaced by wxClientDC, wxWindowDC, wxPaintDC which
 can be used for any window);
 \item wxMultiText, wxTextWindow, wxText removed and replaced by wxTextCtrl;
@@ -179,7 +175,7 @@ following setups.
 
 \begin{enumerate}\itemsep=0pt
 \item Almost any C++ compiler, including GNU C++.
-\item Almost any Unix workstation, and GTK 1.0 or higher.
+\item Almost any Unix workstation, and one of: GTK+ 1.0, Motif 1.2 or higher, Lesstif.
 \item At least 60 MB of disk space.
 \end{enumerate}
 
@@ -189,14 +185,14 @@ wxWindows is currently available from the Artificial Intelligence
 Applications Institute by anonymous FTP and World Wide Web:
 
 \begin{verbatim}
-  ftp://ftp.aiai.ed.ac.uk/pub/packages/wxwin
-  http://web.ukonline.co.uk/julian.smart/wxwin
+  ftp://www.remstar.com/pub/wxwin
+  http://wxwin.home.ml.org
 \end{verbatim}
 
 \section{Acknowledgments}
 
 Thanks are due to AIAI for being willing to release the original version of
-wxWindows into the public domain, and to our patient wives Harriet, Tanja and others.
+wxWindows into the public domain, and to our patient partners.
 
 We would particularly like to thank the following for their contributions to wxWindows, and the many others who have been involved in
 the project over the years. Apologies for any unintentional omissions from this list. 
@@ -277,95 +273,33 @@ multi-megabyte .pch files.
 
 \section{Libraries}
 
-Please the wxGTK documentation for use of the Unix version of wxWindows.
+Please the wxGTK or wxMotif documentation for use of the Unix version of wxWindows.
 Under Windows, use the library wx.lib for stand-alone Windows
 applications, or wxdll.lib for creating DLLs.
 
 \section{Configuration}
 
-The following lists the options configurable in the file
-\rtfsp{\tt "wx/msw/setup.h"} and {\tt "wx/gtk/setup.h"} Some settings are a matter
+Options are configurable in the file
+\rtfsp{\tt "wx/XXX/setup.h"} where XXX is the required platform (such as msw, motif, gtk, mac). Some settings are a matter
 of taste, some help with platform-specific problems, and
-others can be set to minimize the size of the library.
-
-\subsection{General features}
-
-\begin{twocollist}\itemsep=0pt
-\twocolitem{USE\_CLIPBOARD}{If 1, clipboard code is compiled (Windows only).}
-\twocolitem{USE\_CONSTRAINTS}{If 1, the constaint-based window layout system is compiled.}
-\twocolitem{USE\_DOC\_VIEW\_ARCHITECTURE}{If 1, wxDocument, wxView and related classes are compiled.}
-\twocolitem{USE\_DYNAMIC\_CLASSES}{If 1, the run-time class macros and classes are compiled. Recommended,
-and necessary for the document/view framework.}
-\twocolitem{USE\_HELP}{If 1, interface to help system is compiled.}
-\twocolitem{USE\_GAUGE}{If 1, the wxGauge class compiled.}
-\twocolitem{USE\_GLOBAL\_MEMORY\_OPERATORS}{If 1, redefines global new and delete operators to be compatible
-with the extended arguments of the debugging wxObject new and delete operators. If this causes problems
-for your compiler, set to 0.}
-\twocolitem{USE\_IPC}{If 1, interprocess communication code is compiled.}
-\twocolitem{USE\_MEMORY\_TRACING}{If 1, enables debugging versions of wxObject::new and wxObject::delete
-if the value of DEBUG is defined to more than 0.}
-\twocolitem{USE\_METAFILE}{If 1, Windows Metafile code is compiled.}
-\twocolitem{USE\_POSTSCRIPT}{If 1, PostScript code is compiled.}
-\twocolitem{USE\_POSTSCRIPT\_ARCHITECTURE\_IN\_MSW}{Set to 1 to enable the printing architecture
-to make use of either native Windows printing facilities, or the wxPostScriptDC class depending
-on the wxApp::SetPrintMode setting.}
-\twocolitem{USE\_PRINTING\_ARCHITECTURE}{If 1, wxPrinter, wxPrintout and related classes are compiled
-for the print/preview framework.}
-\twocolitem{USE\_RESOURCES}{If 1, win.ini or .Xdefaults-style resource read/write code is compiled.}
-\twocolitem{USE\_WX\_RESOURCES}{If 1, wxWindows resource file (.WXR) code is compiled.}
-\end{twocollist}
-
-\subsection{Windows and NT features}
-
-\begin{twocollist}
-\twocolitem{CTL3D}{CTL3D should only be used for 16-bit Windows programs.
-On Windows 95 and NT, native 3D effects are used. If you want to
-use it and don't already have CTL3D installed, copy the files in
-contrib/ctl3d to appropriate places (ctl3dv2.lib/ctl3d32.lib into your compiler lib
-directory, ctl3d.h into an include directory, and ctl3dv2.dll into
-windows/system). You may need to find a compiler-specific version of ctl3dv2.lib
-or ctl3d32.lib. Define CTL3D to be 1 in wx\_setup.h and link your executables with ctl3dv2.lib
-or ctl3d32.lib.}
-\twocolitem{USE\_ODBC}{If 1, compiles wxDatabase and wxRecordSet classes for ODBC
-access. Requires sql.h, sqlext.h files if set to 1 (see topic on database support).}
-\end{twocollist}
+others can be set to minimize the size of the library. Please see the setup.h file
+and {\tt install.txt} files for details on configuration.
 
 \section{Makefiles}
 
 At the moment there is no attempt to make Unix makefiles and
 PC makefiles compatible, i.e. one makefile is required for
-each environment.
+each environment. wxGTK has its own configure system which can also
+be used with wxMotif, although wxMotif has a simple makefile system of its own.
 
 Sample makefiles for Unix (suffix .UNX), MS C++ (suffix .DOS and .NT), Borland
-C++ (.BCC) and Symantec C++ (.SC) are included for the library, demos
-and utilities. The NT, Borland and Symantec makefiles cannot be
-guaranteed to be up-to-date since the author does not have
-these compilers.
+C++ (.BCC and .B32) and Symantec C++ (.SC) are included for the library, demos
+and utilities.
 
 The controlling makefile for wxWindows is in the platform-specific
-directory, such as {\tt src/msw} or {\tt src/x}. This makefile will
-recursively execute the makefile in {\tt src/base}.
-
-\subsection{Windows makefiles}
-
-For Microsoft C++, normally it is only necessary to type {\tt nmake -f
-makefile.dos} (or an alias or batch file which does this). By default,
-binaries are made with debugging information, and no optimization. Use
-FINAL=1 on the command line to remove debugging information (this only
-really necessary at the link stage), and DLL=1 to make a DLL version of
-the library, if building a library.
-
-\subsection{Unix makefiles}
-
-TODO.
-
-Debugging information is included by default; you may add DEBUG= as an
-argument to make to compile without it, or use the Unix {\bf strip}
-command to remove debugging information from an executable.
+directory, such as {\tt src/msw} or {\tt src/motif}.
 
-\normalbox{{\it Important note:} Most compiler flags are kept centrally in
-src/make.env, which is included by all other makefiles. This is the
-file to edit to tailor wxWindows compilation to your environment.}
+Please see the platform-specific {\tt install.txt} file for further details.
 
 \section{Windows-specific files}
 
@@ -449,64 +383,9 @@ fine on some platforms, and then fail under Windows.
 One of the purposes of wxWindows is to reduce the need for conditional
 compilation in source code, which can be messy and confusing to follow.
 However, sometimes it is necessary to incorporate platform-specific
-features (such as metafile use under MS Windows). The following identifiers
-may be used for this purpose, along with any user-supplied ones:
-
-{\bf GUIs:}
-
-\begin{verbatim}
-__X__           any X, but not GTK
-__WXMOTIF__     Motif
-__WXGTK__       GTK
-__WXMSW__       Any Windows
-__MAC__         MacOS
-__UNIX__        any Unix
-__WIN95__       GUI for Windows 95 and above; NT 4.0 and above.
-__WIN32__       WIN32 API
-__NT__          Windows NT
-__CURSES__      CURSES
-\end{verbatim}
-
-{\bf OSes:}
-
-\begin{verbatim}
-__HPUX__
-__SVR4__
-__SYSV__
-__LINUX__
-__SGI__
-__ULTRIX__
-__BSD__
-__VMS__
-__SUN__         Any Sun
-__SUNOS__
-__SOLARIS__
-__ALPHA__
-__AIX__
-__DATA_GENERAL__
-__OSF__
-__FREEBSD__
-\end{verbatim}
-
-{\bf Compilers:}
-
-\begin{verbatim}
-__GNUWIN32__    Gnu-Win32 compiler
-__DJGPP__       DJGPP
-__GNUG__        Gnu C++ on any platform
-__BORLANDC__    Borland C++
-__WATCOMC__     Watcom C++
-__SYMANTECC__   Symantec C++
-__VISUALC__     VC++
-__SUNCC__
-\end{verbatim}
-
-{\bf wxWindows modes:}
-
-\begin{verbatim}
-__WXDEBUG__       usage: #ifdef __DEBUG__ (=> debug mode, else => release)
-\end{verbatim}
-
+features (such as metafile use under MS Windows). The symbols
+listed in the file {\tt symbols.txt} may be used for this purpose,
+along with any user-supplied ones.
 
 \section{C++ issues}
 
@@ -553,7 +432,7 @@ approach is to store filenames on their own, with no directory
 information.  The application searches through a number of locally
 defined directories to find the file. To support this, the class {\bf
 wxPathList} makes adding directories and searching for files easy, and
-the global function {\bf FileNameFromPath} allows the application to
+the global function {\bf wxFileNameFromPath} allows the application to
 strip off the filename from the path if the filename must be stored.
 This has undesirable ramifications for people who have documents of the
 same name in different directories.
@@ -573,6 +452,7 @@ dos2unix).
 See also the File Functions section of the reference manual for
 descriptions of miscellaneous file handling functions.
 
+\begin{comment}
 \chapter{Utilities supplied with wxWindows}\label{utilities}
 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
 \setfooter{\thepage}{}{}{}{}{\thepage}%
@@ -677,6 +557,7 @@ platform.
 \setfooter{\thepage}{}{}{}{}{\thepage}%
 
 To be written.
+\end{comment}
 
 \chapter{Programming strategies}\label{strategies}
 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
@@ -808,4 +689,3 @@ different happens. You may have an intuition why a change will make a difference
 otherwise, just try altering the order of code, comment lines out, anything
 to get over an impasse. Obviously, this is usually a last resort.
 
-
diff --git a/docs/latex/wx/document.tex b/docs/latex/wx/document.tex
index a5b7e6b077..f75183c293 100644
--- a/docs/latex/wx/document.tex
+++ b/docs/latex/wx/document.tex
@@ -329,3 +329,4 @@ the filename.
 \func{void}{UpdateAllViews}{\param{wxView* }{sender = NULL}}
 
 Updates all views. If {\it sender} is non-NULL, does not update this view.
+
diff --git a/docs/latex/wx/log.tex b/docs/latex/wx/log.tex
index ab0e451692..de29116f55 100644
--- a/docs/latex/wx/log.tex
+++ b/docs/latex/wx/log.tex
@@ -184,3 +184,4 @@ section for details.
 
 Returns the current trace mask, see \helpref{Customization}{wxlogcustomization} section
 for details.
+
diff --git a/docs/latex/wx/manual.tex b/docs/latex/wx/manual.tex
index 58365be971..c13f2a9cad 100644
--- a/docs/latex/wx/manual.tex
+++ b/docs/latex/wx/manual.tex
@@ -1,5 +1,5 @@
 \documentstyle[a4,11pt,makeidx,verbatim,texhelp,fancyheadings,palatino]{report}
-% JACS: doesn't make it through Tex2RTF, sorry.I'll put it into texhelp.sty
+% JACS: doesn't make it through Tex2RTF, sorry. I'll put it into texhelp.sty
 % since Tex2RTF doesn't parse it.
 % BTW, style MUST be report for it to work for Tex2RTF.
 %KB:
@@ -30,7 +30,7 @@
 %\winhelponly{\\$$\image{1cm;0cm}{wxwin.wmf}$$}
 }}
 \winhelpignore{\author{Julian Smart}
-\date{November 4th 1998}
+\date{December 27th 1998}
 }
 \makeindex
 \begin{document}
@@ -85,26 +85,13 @@
 \setfooter{\thepage}{}{}{}{}{\thepage}%
 
 \begin{center}
-Copyright (c) 1998 Julian Smart, Markus Holzem, Robert Roebling and other
+Copyright (c) 1998 Julian Smart, Robert Roebling and other
 members of the wxWindows team\\
 Portions (c) 1996 Artificial Intelligence Applications Institute\\
 \end{center}
 
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose is hereby granted without fee, provided that the
-above copyright notice, author statement and this permission notice appear in
-all copies of this software and related documentation.
-
-THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
-IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE
-UNIVERSITY OF EDINBURGH OR ANY MEMBERS OF THE WXWINDOWS TEAM BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF
-DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
+Please see the wxWindows licence files (preamble.txt, lgpl.txt, gpl.txt, licence.txt,
+licendoc.txt) for conditions of software and documentation use.
 
 \input{body.tex}
 \helpinput{classes.tex}
@@ -130,8 +117,20 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 \end{comment}
 
 \newpage
+% Note: In RTF, the \printindex must come before the
+% change of header/footer, since the \printindex inserts
+% the RTF \sect command which divides one chapter from
+% the next.
+\rtfonly{\printindex
 \addcontentsline{toc}{chapter}{Index}
 \setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
+\setfooter{\thepage}{}{}{}{}{\thepage}
+}
+% In Latex, it must be this way around (I think)
+\latexonly{\addcontentsline{toc}{chapter}{Index}
+\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
+\setfooter{\thepage}{}{}{}{}{\thepage}
 \printindex
+}
+
 \end{document}
diff --git a/docs/latex/wx/sckaddr.tex b/docs/latex/wx/sckaddr.tex
index 9c04a74b01..e2ace6b8e0 100644
--- a/docs/latex/wx/sckaddr.tex
+++ b/docs/latex/wx/sckaddr.tex
@@ -27,11 +27,13 @@
 %
 
 \membersection{wxSockAddress::wxSockAddress}
+
 \func{}{wxSockAddress}{\void}
 
 Default constructor.
 
 \membersection{wxSockAddress::\destruct{wxSockAddress}}
+
 \func{}{\destruct{wxSockAddress}}{\void}
 
 Default destructor.
@@ -48,6 +50,7 @@ Delete all informations about the address.
 % Build
 %
 \membersection{wxSockAddress::Build}
+
 \func{void}{Build}{\param{struct sockaddr *\&}{ addr}, \param{size\_t\&}{ len}}
 
 Build a coded socket address.
@@ -56,6 +59,7 @@ Build a coded socket address.
 % Disassemble
 %
 \membersection{wxSockAddress::Disassemble}
+
 \func{void}{Disassemble}{\param{struct sockaddr *}{addr}, \param{size\_t}{ len}}
 
 Decode a socket address. {\bf Actually, you don't have to use this
@@ -65,6 +69,7 @@ function: only wxSocketBase use it.}
 % SockAddrLen
 %
 \membersection{wxSockAddress::SockAddrLen}
+
 \func{int}{SockAddrLen}{\void};
 
 Returns the length of the socket address.
@@ -89,6 +94,7 @@ Returns the length of the socket address.
 %
 
 \membersection{wxIPV4address::Hostname}
+
 \func{bool}{Hostname}{\param{const wxString\&}{ hostname}}
 
 Use the specified {\it hostname} for the address.
@@ -102,6 +108,7 @@ Returns FALSE if something bad happens (invalid hostname, invalid IP address).
 %
 
 \membersection{wxIPV4address::Hostname}
+
 \func{wxString}{Hostname}{\void}
 
 Returns the hostname which matches the IP address.
@@ -111,6 +118,7 @@ Returns the hostname which matches the IP address.
 %
 
 \membersection{wxIPV4address::Service}
+
 \func{bool}{Service}{\param{const wxString\&}{ service}}
 
 Use the specified {\it service} string for the address.
@@ -124,6 +132,7 @@ Returns FALSE if something bad happens (invalid service).
 %
 
 \membersection{wxIPV4address::Service}
+
 \func{bool}{Service}{\param{unsigned short}{ service}}
 
 Use the specified {\it service} for the address.
@@ -137,6 +146,7 @@ Returns FALSE if something bad happens (invalid service).
 %
 
 \membersection{wxIPV4address::Service}
+
 \func{unsigned short}{Service}{\void}
 
 Returns the current service.
@@ -146,6 +156,7 @@ Returns the current service.
 %
 
 \membersection{wxIPV4address::LocalHost}
+
 \func{bool}{LocalHost}{\void}
 
 Initialize peer host to local host.
@@ -153,3 +164,4 @@ Initialize peer host to local host.
 \wxheading{Return value}
 
 Returns FALSE if something bad happens.
+
diff --git a/docs/latex/wx/socket.tex b/docs/latex/wx/socket.tex
index 7216280a3a..5fb23c57d0 100644
--- a/docs/latex/wx/socket.tex
+++ b/docs/latex/wx/socket.tex
@@ -689,6 +689,7 @@ Returns 0 if a timeout occured, else the number of events detected.
 \func{void}{YieldSock}{\void}
 
 Execute pending requests in all registered sockets.
+
 % ---------------------------------------------------------------------------
 % CLASS: wxSocketServer
 % ---------------------------------------------------------------------------
diff --git a/docs/latex/wx/tconfig.tex b/docs/latex/wx/tconfig.tex
index fa762b629d..8b6a4b1628 100644
--- a/docs/latex/wx/tconfig.tex
+++ b/docs/latex/wx/tconfig.tex
@@ -46,3 +46,4 @@ and subgroups. The path components are {\bf always} separated with a slash,
 even though some implementations use the backslash internally. The further
 details (including how to read/write these entries) may be found in
 \helpref{wxConfigBase}{wxconfigbase} documentation.
+
diff --git a/docs/latex/wx/tdnd.tex b/docs/latex/wx/tdnd.tex
index cbd0d8ea5a..e2a15e65d2 100644
--- a/docs/latex/wx/tdnd.tex
+++ b/docs/latex/wx/tdnd.tex
@@ -79,7 +79,7 @@ follow the instructions below:
 \begin{itemize}\itemsep=0pt
 \item {\bf Initialization:} For a window to be drop target, it needs to have
 an associated \helpref{wxDropTarget}{wxdroptarget} object. Normally, you will
-call wxWindow::\helpref{SetDropTarget}{wxwindowsetdroptarget} during window
+call \helpref{wxWindow::SetDropTarget}{wxwindowsetdroptarget} during window
 creation associating you drop target with it. You must derive a class from
 wxDropTarget and override its pure virtual methods. Alternatively, you may
 derive from \helpref{wxTextDropTarget}{wxtextdroptarget} or
diff --git a/docs/msw/install.txt b/docs/msw/install.txt
index 4a7872625a..1410c15c90 100644
--- a/docs/msw/install.txt
+++ b/docs/msw/install.txt
@@ -46,40 +46,59 @@ Using project files:
 
 Using makefiles:
 
-1. Change directory to wx\src\msw. Type 'nmake -f makefile.nt' to
+1. Make sure your WXWIN variable is set.
+2. Change directory to wx\src\msw. Type 'nmake -f makefile.nt' to
    make the wxWindows core library.
-2. Change directory to wx\samples and type 'nmake -f makefile.nt'
+3. Change directory to wx\samples and type 'nmake -f makefile.nt'
    to make all the samples. You can also make them individually.
 
 Visual C++ 1.5 compilation
 --------------------------
 
-1. Change directory to wx\src\msw. Type 'nmake -f makefile.dos' to
+1. Make sure your WXWIN variable is set, and uses the FAT (short
+   name) form.
+2. Change directory to wx\src\msw. Type 'nmake -f makefile.dos' to
    make the wxWindows core library.
-2. Change directory to a sample, such as wx\samples\minimal, and
+3. Change directory to a sample, such as wx\samples\minimal, and
    type 'nmake -f makefile.dos'.
 
 Borland C++ 4.5/5.0 compilation
 -------------------------------
 
-1. Change directory to wx\src\msw. Type 'make -f makefile.b32' to
-   make the wxWindows core library.
-2. Change directory to wx\samples and type 'make -f makefile.b32'
-   to make all the samples. You can also make them individually.
-   NOTE: only a few samples have up-to-date makefiles, e.g.
-   minimal, docview, mdi. The utils makefile does not yet work.
+1. Make sure your WXWIN variable is set, and uses the FAT (short
+   name) form if doing a 16-bit compile.
+2. Change directory to wx\src\msw. Type 'make -f makefile.b32' to
+   make the wxWindows core library. Ignore the warnings about
+   'XXX' not found in library.
+3. Change directory to a sample such as minimal, and type
+  'make -f makefile.b32'.
+
+Note: the wxWindows library compiles in 16-bit mode (using makefile.bcc),
+but the samples do not link because of the error:
+
+        Segment TEXT_RESOURCE exceeds 64K.
+
+There may or may not be anything we can do about this.
 
 Watcom C++ 10.6 compilation
 ---------------------------
 
 Currently under construction, but so far we have:
 
-1. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to
+1. Make sure your WXWIN variable is set, and uses the FAT (short
+   name) form.
+2. Change directory to wx\src\msw. Type 'wmake -f makefile.wat' to
    make the wxWindows core library.
-2. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat'
+3. Change directory to wx\samples\minimal and type 'wmake -f makefile.wat'
    to make this sample. There are a lot of link errors at this
    point, so can anyone help work out what I've done wrong?
 
+Metrowerks CodeWarrior compilation
+----------------------------------
+
+Support is currently being added for this compiler by Stefan
+Csomor.
+
 Gnu-Win32 b19/b20/Mingw32 compilation
 -------------------------------------
 
@@ -167,3 +186,4 @@ Notes
         http://ftp.digital.com/pub/micro/NT/WinSite/programr/dbwin32.zip
 
   and it's also on the wxWindows CD-ROM under Packages.
+
diff --git a/include/wx/defs.h b/include/wx/defs.h
index d3ba9b0e0e..e68ab2cc01 100644
--- a/include/wx/defs.h
+++ b/include/wx/defs.h
@@ -129,7 +129,7 @@
     typedef unsigned char bool;
 #endif
 
-#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__)
+#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__))
     #define byte unsigned char
 #endif
 
diff --git a/include/wx/event.h b/include/wx/event.h
index 05bc779236..60b90eedcb 100644
--- a/include/wx/event.h
+++ b/include/wx/event.h
@@ -187,8 +187,15 @@ const wxEventType wxEVT_COMMAND_LIST_ITEM_ACTIVATED =       wxEVT_FIRST + 715;
  /* Tab and notebook control event types */
 const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED =           wxEVT_FIRST + 800;
 const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGING =          wxEVT_FIRST + 801;
+
+#if defined(__BORLANDC__) && defined(__WIN16__)
+// For 16-bit BC++, these 2 are identical (truncated)
+const wxEventType wxEVT_COMMAND_NB_PAGE_CHANGED =     wxEVT_FIRST + 802;
+const wxEventType wxEVT_COMMAND_NB_PAGE_CHANGING =    wxEVT_FIRST + 803;
+#else
 const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED =     wxEVT_FIRST + 802;
 const wxEventType wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING =    wxEVT_FIRST + 803;
+#endif
 
 const wxEventType wxEVT_USER_FIRST =                        wxEVT_FIRST + 2000;
 
diff --git a/include/wx/filefn.h b/include/wx/filefn.h
index c9c7cd721c..8131e55c3f 100644
--- a/include/wx/filefn.h
+++ b/include/wx/filefn.h
@@ -29,6 +29,10 @@
   #define   off_t       _off_t
 #endif
 
+#if defined(__BORLANDC__) && defined(__WIN16__)
+typedef long off_t;
+#endif
+
 const off_t wxInvalidOffset = (off_t)-1;
 
 typedef enum {
@@ -85,7 +89,7 @@ WXDLLEXPORT char* wxExpandPath(char *dest, const char *path);
 // and make (if under the home tree) relative to home
 // [caller must copy-- volatile]
 WXDLLEXPORT char* wxContractPath (const wxString& filename,
-   const wxString& envname = "", const wxString& user = "");
+   const wxString& envname = wxEmptyString, const wxString& user = wxEmptyString);
 
 // Destructive removal of /./ and /../ stuff
 WXDLLEXPORT char* wxRealPath(char *path);
diff --git a/include/wx/generic/dirdlgg.h b/include/wx/generic/dirdlgg.h
index 10fefdce31..dbefc430d5 100644
--- a/include/wx/generic/dirdlgg.h
+++ b/include/wx/generic/dirdlgg.h
@@ -82,7 +82,7 @@ class WXDLLEXPORT wxDirDialog: public wxDialog
  public:
     wxDirDialog(wxWindow *parent, 
 		const wxString& message = wxFileSelectorPromptStr,
-		const wxString& defaultPath = "",
+		const wxString& defaultPath = wxEmptyString,
 		long style = 0, const wxPoint& pos = wxDefaultPosition);
     inline void SetMessage(const wxString& message) { m_message = message; }
     inline void SetPath(const wxString& path) { m_path = path; }
diff --git a/include/wx/generic/notebook.h b/include/wx/generic/notebook.h
index df4e960314..99fb13d1ad 100644
--- a/include/wx/generic/notebook.h
+++ b/include/wx/generic/notebook.h
@@ -226,6 +226,29 @@ protected:
 // ----------------------------------------------------------------------------
 typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
 
+// Because of name truncation!
+#if defined(__BORLANDC__) && defined(__WIN16__)
+
+#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn)                                   \
+  {                                                                         \
+    wxEVT_COMMAND_NB_PAGE_CHANGED,                                    \
+    id,                                                                     \
+    -1,                                                                     \
+    (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn,  \
+    NULL                                                                    \
+  },
+
+#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn)                                  \
+  {                                                                         \
+    wxEVT_COMMAND_NB_PAGE_CHANGING, \                                 \
+    id,                                                                     \
+    -1,                                                                     \
+    (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn,  \
+    NULL                                                                    \
+  },
+
+#else
+
 #define EVT_NOTEBOOK_PAGE_CHANGED(id, fn)                                   \
   {                                                                         \
     wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,                                    \
@@ -244,4 +267,6 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
     NULL                                                                    \
   },
 
+#endif
+
 #endif // _WX_NOTEBOOK_H_
diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h
index b862bbfb52..08baa48c8a 100644
--- a/include/wx/generic/treectrl.h
+++ b/include/wx/generic/treectrl.h
@@ -16,6 +16,12 @@
     #pragma interface "treectrl.h"
 #endif
 
+#ifdef __WXMSW__
+WXDLLEXPORT_DATA(extern const char*) wxTreeCtrlNameStr;
+#else
+#define wxTreeCtrlNameStr "wxTreeCtrl"
+#endif
+
 #include "wx/defs.h"
 #include "wx/string.h"
 #include "wx/object.h"
@@ -201,7 +207,7 @@ public:
                const wxSize& size = wxDefaultSize,
                long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
 	       const wxValidator &validator = wxDefaultValidator,
-               const wxString& name = "wxTreeCtrl")
+               const wxString& name = wxTreeCtrlNameStr)
     {
         Create(parent, id, pos, size, style, validator, name);
     }
@@ -213,7 +219,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
 	        const wxValidator &validator = wxDefaultValidator,
-                const wxString& name = "wxTreeCtrl");
+                const wxString& name = wxTreeCtrlNameStr);
 
     // accessors
     // ---------
diff --git a/include/wx/list.h b/include/wx/list.h
index 75c3c01cbb..6e8cda5940 100644
--- a/include/wx/list.h
+++ b/include/wx/list.h
@@ -289,7 +289,7 @@ protected:
 private:
     // helpers
         // common part of all ctors
-    void Init(wxKeyType keyType);
+    void Init(wxKeyType keyType = wxKEY_NONE);
         // common part of copy ctor and assignment operator
     void DoCopy(const wxListBase& list);
         // common part of all Append()s
diff --git a/include/wx/msw/filedlg.h b/include/wx/msw/filedlg.h
index 58869bdb74..45b040e6c7 100644
--- a/include/wx/msw/filedlg.h
+++ b/include/wx/msw/filedlg.h
@@ -39,7 +39,7 @@ protected:
     int         m_filterIndex;
 public:
     wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
-        const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+        const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
         long style = 0, const wxPoint& pos = wxDefaultPosition);
 
     inline void SetMessage(const wxString& message) { m_message = message; }
diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h
index 1c191305d8..9038a6e60b 100644
--- a/include/wx/msw/frame.h
+++ b/include/wx/msw/frame.h
@@ -22,6 +22,7 @@
 
 WXDLLEXPORT_DATA(extern const char*) wxFrameNameStr;
 WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr;
+WXDLLEXPORT_DATA(extern const char*) wxStatusLineNameStr;
 
 class WXDLLEXPORT wxMenuBar;
 class WXDLLEXPORT wxStatusBar;
@@ -102,7 +103,7 @@ public:
 
   // Create status line
   virtual wxStatusBar* CreateStatusBar(int number=1, long style = wxST_SIZEGRIP, wxWindowID id = 0,
-    const wxString& name = "statusBar");
+    const wxString& name = wxStatusLineNameStr);
   inline wxStatusBar *GetStatusBar() const { return m_frameStatusBar; }
   inline void SetStatusBar(wxStatusBar *statusBar) { m_frameStatusBar = statusBar; }
   virtual void PositionStatusBar(void);
diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h
index 8a64ec8796..54d0d96e88 100644
--- a/include/wx/msw/private.h
+++ b/include/wx/msw/private.h
@@ -41,14 +41,26 @@ WXDLLEXPORT wxFont wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNe
 #  define CASTWNDPROC (long unsigned)
 #else
 #  ifdef __BORLANDC__
+
+#  ifdef __WIN32__
 #    define CASTWNDPROC
+#  else
+       typedef int (pascal * WndProcCast) ();
+#      define CASTWNDPROC (WndProcCast)
+#  endif
+
 #  else
 #    if defined (__WIN32__) && defined(STRICT)
        typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long);
 #      define CASTWNDPROC (WndProcCast)
 #    elif defined(__WIN16__)
+#    ifdef __BORLANDC__
+       typedef int (pascal * WndProcCast) ();
+#      define CASTWNDPROC (WndProcCast)
+#    else
        typedef int (PASCAL * WndProcCast) ();
 #      define CASTWNDPROC (WndProcCast)
+#    endif
 #    else
 #      define CASTWNDPROC
 #    endif
diff --git a/include/wx/msw/tbarmsw.h b/include/wx/msw/tbarmsw.h
index 96477a8d4e..5ce62ea20d 100644
--- a/include/wx/msw/tbarmsw.h
+++ b/include/wx/msw/tbarmsw.h
@@ -54,7 +54,7 @@ public:
   // If toggle is TRUE, the button toggles between the two states.
   wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
                bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
-               const wxString& helpString1 = "", const wxString& helpString2 = "");
+               const wxString& helpString1 = wxEmptyString, const wxString& helpString2 = wxEmptyString);
 
   void DrawTool(wxDC& dc, wxMemoryDC& memDc, wxToolBarTool *tool);
 
diff --git a/include/wx/string.h b/include/wx/string.h
index 94964e5a6a..ea62d6781b 100644
--- a/include/wx/string.h
+++ b/include/wx/string.h
@@ -708,9 +708,11 @@ public:
           /// find first n characters of sz
           size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const;
 #endif
+          // Gives a duplicate symbol (presumably a case-insensitivity problem)
+#if !defined(__BORLANDC__)
           /// find the first occurence of character ch after nStart
           size_t find(char ch, size_t nStart = 0) const;
-
+#endif
           // wxWin compatibility
           inline bool Contains(const wxString& str) const { return Find(str) != -1; }
 
diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h
index 260b2526a0..d23a8c2158 100644
--- a/include/wx/tbarbase.h
+++ b/include/wx/tbarbase.h
@@ -36,7 +36,7 @@ class WXDLLEXPORT wxToolBarTool: public wxObject
  public:
   wxToolBarTool(int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
                 bool toggle = FALSE, long xPos = -1, long yPos = -1,
-                const wxString& shortHelpString = "", const wxString& longHelpString = "");
+                const wxString& shortHelpString = wxEmptyString, const wxString& longHelpString = wxEmptyString);
   ~wxToolBarTool ();
   inline void SetSize( long w, long h ) { m_width = w; m_height = h; }
   inline long GetWidth () const { return m_width; }
@@ -86,7 +86,7 @@ class WXDLLEXPORT wxToolBarBase : public wxControl
   // If toggle is TRUE, the button toggles between the two states.
   virtual wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
                bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
-               const wxString& helpString1 = "", const wxString& helpString2 = "");
+               const wxString& helpString1 = wxEmptyString, const wxString& helpString2 = wxEmptyString);
   virtual void AddSeparator(void);
   virtual void ClearTools(void);
 
diff --git a/include/wx/utils.h b/include/wx/utils.h
index 1be20a24b7..10fc015dd7 100644
--- a/include/wx/utils.h
+++ b/include/wx/utils.h
@@ -112,7 +112,7 @@ WXDLLEXPORT int wxKill(long pid, int sig=wxSIGTERM);
 
 // Execute a command in an interactive shell window
 // If no command then just the shell
-WXDLLEXPORT bool wxShell(const wxString& command = "");
+WXDLLEXPORT bool wxShell(const wxString& command = wxEmptyString);
 
 // Sleep for nSecs seconds under UNIX, do nothing under Windows
 WXDLLEXPORT void wxSleep(int nSecs);
@@ -243,15 +243,15 @@ WXDLLEXPORT void wxFatalError(const wxString& msg, const wxString& title = wxFat
 
 // Reading and writing resources (eg WIN.INI, .Xdefaults)
 #if wxUSE_RESOURCES
-WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file = "");
-WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file = "");
-WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file = "");
-WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file = "");
-
-WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file = "");
-WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file = "");
-WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file = "");
-WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file = "");
+WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file = wxEmptyString);
+WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file = wxEmptyString);
+WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file = wxEmptyString);
+WXDLLEXPORT bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file = wxEmptyString);
+
+WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file = wxEmptyString);
+WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file = wxEmptyString);
+WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file = wxEmptyString);
+WXDLLEXPORT bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file = wxEmptyString);
 #endif // wxUSE_RESOURCES
 
 // Get current Home dir and copy to dest (returns pstr->c_str())
@@ -259,7 +259,7 @@ WXDLLEXPORT const char* wxGetHomeDir(wxString *pstr);
 
 // Get the user's home dir (caller must copy--- volatile)
 // returns NULL is no HOME dir is known
-WXDLLEXPORT char* wxGetUserHome(const wxString& user = "");
+WXDLLEXPORT char* wxGetUserHome(const wxString& user = wxEmptyString);
 
 // Check whether this window wants to process messages, e.g. Stop button
 // in long calculations.
diff --git a/samples/config/makefile.bcc b/samples/config/makefile.bcc
new file mode 100644
index 0000000000..965ba0dd46
--- /dev/null
+++ b/samples/config/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=conftest
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/controls/makefile.bcc b/samples/controls/makefile.bcc
new file mode 100644
index 0000000000..400c6539d2
--- /dev/null
+++ b/samples/controls/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=controls
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/dialogs/makefile.bcc b/samples/dialogs/makefile.bcc
new file mode 100644
index 0000000000..08e7d45590
--- /dev/null
+++ b/samples/dialogs/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=dialogs
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/docview/makefile.bcc b/samples/docview/makefile.bcc
index 186bee0653..6efb0aa0d2 100644
--- a/samples/docview/makefile.bcc
+++ b/samples/docview/makefile.bcc
@@ -1,77 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds docview example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
-!ifndef FINAL
-FINAL=0
-!endif
-
 WXDIR = $(WXWIN)
-!include $(WXDIR)\src\makebcc.env
-
-THISDIR = $(WXDIR)\samples\docview
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS =
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-OBJECTS = docview.obj doc.obj view.obj
-
-docview:    docview.exe
-
-all:    docview.exe
-
-docview.exe:      $(WXLIB) $(OBJECTS) docview.def docview.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj $(OBJECTS)
-docview
-nul
-$(LIBS)
-docview.def
-!
-        rc -30 -K docview.res
-
-.$(SRCSUFF).obj:
-	bcc $(CPPFLAGS) -c {$< }
-
-docview.obj:      docview.$(SRCSUFF)
-
-doc.obj:      doc.$(SRCSUFF)
 
-view.obj:      view.$(SRCSUFF)
+TARGET=docview
+OBJECTS=$(TARGET).obj
 
-docview.res :      docview.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa docview
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/docvwmdi/makefile.bcc b/samples/docvwmdi/makefile.bcc
new file mode 100644
index 0000000000..6efb0aa0d2
--- /dev/null
+++ b/samples/docvwmdi/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=docview
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/dynamic/makefile.bcc b/samples/dynamic/makefile.bcc
new file mode 100644
index 0000000000..23a865ee63
--- /dev/null
+++ b/samples/dynamic/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=dynamic
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/forty/makefile.bcc b/samples/forty/makefile.bcc
new file mode 100644
index 0000000000..53fdb7bf91
--- /dev/null
+++ b/samples/forty/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=forty
+OBJECTS=$(TARGET).obj canvas.obj card.obj game.obj pile.obj playerdg.obj scoredg.obj scorefil.obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/grid/makefile.bcc b/samples/grid/makefile.bcc
new file mode 100644
index 0000000000..669f01905a
--- /dev/null
+++ b/samples/grid/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=test
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/help/makefile.bcc b/samples/help/makefile.bcc
new file mode 100644
index 0000000000..92098318df
--- /dev/null
+++ b/samples/help/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=demo
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/image/makefile.bcc b/samples/image/makefile.bcc
new file mode 100644
index 0000000000..22a8ab529d
--- /dev/null
+++ b/samples/image/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=image
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/internat/makefile.bcc b/samples/internat/makefile.bcc
index a8a68ccbe4..612d7cf5b0 100644
--- a/samples/internat/makefile.bcc
+++ b/samples/internat/makefile.bcc
@@ -1,73 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds internat example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
 WXDIR = $(WXWIN)
-!include $(WXDIR)\src\makebcc.env
-
-THISDIR = $(WXDIR)\samples\internat
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS=
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-OBJECTS = internat.obj
-
-internat:    internat.exe
-
-all:    internat.exe
-
-internat.exe:    $(WXLIB) internat.obj internat.def internat.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj internat.obj
-internat
-nul
-$(LIBS)
-internat.def
-!
-        rc -31 -K internat.res
-
-.$(SRCSUFF).obj:
-	bcc $(CPPFLAGS) -c {$< }
 
-internat.obj:      internat.$(SRCSUFF)
+TARGET=internat
+OBJECTS=$(TARGET).obj
 
-internat.res :      internat.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa internat
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/joytest/makefile.bcc b/samples/joytest/makefile.bcc
index 230ea4abbe..d84ed49281 100644
--- a/samples/joytest/makefile.bcc
+++ b/samples/joytest/makefile.bcc
@@ -1,75 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds joytest example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
-!ifndef FINAL
-FINAL=0
-!endif
-
 WXDIR = $(WXWIN)
-!include $(WXDIR)\src\makebcc.env
-
-THISDIR = $(WXDIR)\samples\joytest
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS =
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-HEADERS = joytest.h
-SOURCES = joytest.$(SRCSUFF)
-OBJECTS = joytest.obj
-
-joytest:    joytest.exe
-
-all:    joytest.exe
-
-joytest.exe:      $(WXLIB) joytest.obj joytest.def joytest.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj joytest.obj
-joytest
-nul
-$(LIBS)
-joytest.def
-!
-        rc -30 -K joytest.res
-
-.$(SRCSUFF).obj:
-	bcc $(CPPFLAGS) -c {$< }
 
-joytest.obj:      joytest.$(SRCSUFF)
+TARGET=joytest
+OBJECTS=$(TARGET).obj
 
-joytest.res :      joytest.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa joytest
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/layout/makefile.bcc b/samples/layout/makefile.bcc
index 1538f447dd..6d0313558a 100644
--- a/samples/layout/makefile.bcc
+++ b/samples/layout/makefile.bcc
@@ -1,76 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds layout example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
 WXDIR = $(WXWIN)
-!include $(WXDIR)\src\makebcc.env
-
-THISDIR = $(WXDIR)\samples\layout
-WXLIB = $(WXDIR)\lib\wx.lib
-
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS =
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-HEADERS = layout.h
-SOURCES = layout.$(SRCSUFF)
-OBJECTS = layout.obj
-
-layout:    layout.exe
-
-all:    layout.exe
-
-layout.exe:      $(WXLIB) layout.obj layout.def layout.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj layout.obj
-layout
-nul
-$(LIBS)
-layout.def
-!
-        rc -30 -K layout.res
-
-.$(SRCSUFF).obj:
-	bcc $(CPPFLAGS) -c {$< }
 
-layout.obj:      layout.$(SRCSUFF)
+TARGET=layout
+OBJECTS=$(TARGET).obj
 
-layout.res :      layout.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa layout
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/listctrl/makefile.bcc b/samples/listctrl/makefile.bcc
new file mode 100644
index 0000000000..85fa0c0573
--- /dev/null
+++ b/samples/listctrl/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=listtest
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/mdi/makefile.bcc b/samples/mdi/makefile.bcc
index 47a053f24b..12e9f59eb6 100644
--- a/samples/mdi/makefile.bcc
+++ b/samples/mdi/makefile.bcc
@@ -1,75 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds mdi example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
-!ifndef FINAL
-FINAL=0
-!endif
-
 WXDIR = $(WXWIN)
-!include $(WXDIR)\src\makebcc.env
-
-THISDIR = $(WXDIR)\samples\mdi
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS =
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-HEADERS = mdi.h
-SOURCES = mdi.$(SRCSUFF)
-OBJECTS = mdi.obj
-
-mdi:    mdi.exe
-
-all:    mdi.exe
-
-mdi.exe:      $(WXLIB) mdi.obj mdi.def mdi.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj mdi.obj
-mdi
-nul
-$(LIBS)
-mdi.def
-!
-        rc -30 -K mdi.res
-
-.$(SRCSUFF).obj:
-	bcc $(CPPFLAGS) -c {$< }
 
-mdi.obj:      mdi.$(SRCSUFF)
+TARGET=mdi
+OBJECTS=$(TARGET).obj
 
-mdi.res :      mdi.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa mdi
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/memcheck/makefile.bcc b/samples/memcheck/makefile.bcc
index bd2517826c..11fd5bc632 100644
--- a/samples/memcheck/makefile.bcc
+++ b/samples/memcheck/makefile.bcc
@@ -1,77 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds memcheck example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
 WXDIR = $(WXWIN)
-!include $(WXDIR)\src\makebcc.env
-
-THISDIR = $(WXDIR)\samples\memcheck
-WXLIB = $(WXDIR)\lib\wx.lib
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-!ifndef DEBUG
-DEBUG=0
-!endif
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v -DDEBUG=$(DEBUG)
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS= -DDEBUG=$(DEBUG)
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-OBJECTS = memcheck.obj
-
-memcheck:    memcheck.exe
-
-all:    memcheck.exe
-
-memcheck.exe:    $(WXLIB) memcheck.obj memcheck.def memcheck.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj memcheck.obj
-memcheck
-nul
-$(LIBS)
-memcheck.def
-!
-        rc -31 -K memcheck.res
-
-.$(SRCSUFF).obj:
-	bcc $(CPPFLAGS) -c {$< }
 
-memcheck.obj:      memcheck.$(SRCSUFF)
+TARGET=memcheck
+OBJECTS=$(TARGET).obj
 
-memcheck.res :      memcheck.rc $(WXDIR)\include\wx\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\wx memcheck
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/minifram/makefile.bcc b/samples/minifram/makefile.bcc
new file mode 100644
index 0000000000..669f01905a
--- /dev/null
+++ b/samples/minifram/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=test
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/minimal/makefile.bcc b/samples/minimal/makefile.bcc
new file mode 100644
index 0000000000..705fc065bc
--- /dev/null
+++ b/samples/minimal/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=minimal
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/nativdlg/makefile.bcc b/samples/nativdlg/makefile.bcc
index 19ad9c2a44..94226015db 100644
--- a/samples/nativdlg/makefile.bcc
+++ b/samples/nativdlg/makefile.bcc
@@ -1,74 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds resource example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
 WXDIR = $(WXWIN)
-THISDIR = $(WXDIR)\samples\resource
-WXLIB = $(WXDIR)\lib\wx.lib
-
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS =
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-HEADERS = resource.h
-SOURCES = resource.cc
-OBJECTS = resource.obj
-
-resource:    resource.exe
-
-all:    resource.exe
-
-resource.exe:      $(WXLIB) resource.obj resource.def resource.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj resource.obj
-resource
-nul
-$(LIBS)
-resource.def
-!
-        rc -30 -K resource.res
-
-.cc.obj:
-	bcc $(CPPFLAGS) -c {$< }
 
-resource.obj:      resource.cc
+TARGET=nativdlg
+OBJECTS=$(TARGET).obj
 
-resource.res :      resource.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/notebook/makefile.bcc b/samples/notebook/makefile.bcc
new file mode 100644
index 0000000000..669f01905a
--- /dev/null
+++ b/samples/notebook/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=test
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/ownerdrw/makefile.bcc b/samples/ownerdrw/makefile.bcc
new file mode 100644
index 0000000000..8073c232d5
--- /dev/null
+++ b/samples/ownerdrw/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=ownerdrw
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/png/makefile.bcc b/samples/png/makefile.bcc
new file mode 100644
index 0000000000..408a17b466
--- /dev/null
+++ b/samples/png/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=pngdemo
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/printing/makefile.bcc b/samples/printing/makefile.bcc
new file mode 100644
index 0000000000..d2037e9b35
--- /dev/null
+++ b/samples/printing/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=printing
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/resource/makefile.bcc b/samples/resource/makefile.bcc
index 19ad9c2a44..c69508d16d 100644
--- a/samples/resource/makefile.bcc
+++ b/samples/resource/makefile.bcc
@@ -1,74 +1,19 @@
 #
 # File:		makefile.bcc
 # Author:	Julian Smart
-# Created:	1993
+# Created:	1998
 # Updated:	
-# Copyright:	(c) 1993, AIAI, University of Edinburgh
 #
-# "%W% %G%"
-#
-# Makefile : Builds resource example (DOS).
-
-!if "$(BCCDIR)" == ""
-!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
-!endif
+# Builds a BC++ 16-bit sample
 
 !if "$(WXWIN)" == ""
 !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
 !endif
 
 WXDIR = $(WXWIN)
-THISDIR = $(WXDIR)\samples\resource
-WXLIB = $(WXDIR)\lib\wx.lib
-
-LIBS=$(WXLIB) mathwl cwl import
-INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw
-CFG=$(WXDIR)\src\wxwin.cfg
-
-!ifndef FINAL
-FINAL=0
-!endif
-
-!if "$(FINAL)" == "0"
-LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -Od
-DEBUG_FLAGS= -v
-!else
-LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
-OPT = -O2
-DEBUG_FLAGS =
-!endif
-CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
-
-HEADERS = resource.h
-SOURCES = resource.cc
-OBJECTS = resource.obj
-
-resource:    resource.exe
-
-all:    resource.exe
-
-resource.exe:      $(WXLIB) resource.obj resource.def resource.res
-        tlink $(LINKFLAGS) @&&!
-c0wl.obj resource.obj
-resource
-nul
-$(LIBS)
-resource.def
-!
-        rc -30 -K resource.res
-
-.cc.obj:
-	bcc $(CPPFLAGS) -c {$< }
 
-resource.obj:      resource.cc
+TARGET=resource
+OBJECTS=$(TARGET).obj
 
-resource.res :      resource.rc $(WXDIR)\include\msw\wx.rc
-    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource
+!include $(WXDIR)\src\makeprog.bcc
 
-clean:
-        -erase *.obj
-        -erase *.exe
-        -erase *.res
-        -erase *.map
-        -erase *.rws
diff --git a/samples/sashtest/makefile.bcc b/samples/sashtest/makefile.bcc
new file mode 100644
index 0000000000..cb03e4dede
--- /dev/null
+++ b/samples/sashtest/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=sashtest
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/splitter/makefile.bcc b/samples/splitter/makefile.bcc
new file mode 100644
index 0000000000..669f01905a
--- /dev/null
+++ b/samples/splitter/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=test
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/tab/makefile.bcc b/samples/tab/makefile.bcc
new file mode 100644
index 0000000000..669f01905a
--- /dev/null
+++ b/samples/tab/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=test
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/toolbar/makefile.bcc b/samples/toolbar/makefile.bcc
new file mode 100644
index 0000000000..669f01905a
--- /dev/null
+++ b/samples/toolbar/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=test
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/treectrl/makefile.bcc b/samples/treectrl/makefile.bcc
new file mode 100644
index 0000000000..6956ffe0d3
--- /dev/null
+++ b/samples/treectrl/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=treetest
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/typetest/makefile.bcc b/samples/typetest/makefile.bcc
new file mode 100644
index 0000000000..0d0fee1bbc
--- /dev/null
+++ b/samples/typetest/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=typetest
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/typetest/typetest.cpp b/samples/typetest/typetest.cpp
index 427402e6e7..f16da8366c 100644
--- a/samples/typetest/typetest.cpp
+++ b/samples/typetest/typetest.cpp
@@ -235,10 +235,10 @@ void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
     wxTextCtrl& textCtrl = * GetTextCtrl();
 
     wxVariant var1 = "String value";
-    textCtrl << "var1 = " << (wxString) var1 << "\n";
+    textCtrl << "var1 = " << var1.MakeString() << "\n";
 
-    // Implicit conversion
-    wxString str = var1;
+    // Conversion
+    wxString str = var1.MakeString();
 
     var1 = 123.456;
     textCtrl << "var1 = " << var1.GetReal() << "\n";
@@ -255,20 +255,20 @@ void MyApp::DoVariantDemo(wxCommandEvent& WXUNUSED(event) )
     wxStringList stringList;
     stringList.Add("one"); stringList.Add("two"); stringList.Add("three");
     var1 = stringList;
-    textCtrl << "var1 = " << (wxString) var1 << "\n";
+    textCtrl << "var1 = " << var1.MakeString() << "\n";
 
     var1.ClearList();
     var1.Append(wxVariant(1.2345));
     var1.Append(wxVariant("hello"));
     var1.Append(wxVariant(54321L));
 
-    textCtrl << "var1 = " << (wxString) var1 << "\n";
+    textCtrl << "var1 = " << var1.MakeString() << "\n";
 
     size_t n = var1.GetCount();
     size_t i;
     for (i = (size_t) 0; i < n; i++)
     {
-        textCtrl << "var1[" << (int) i << "] (type " << var1[i].GetType() << ") = " << (wxString) var1[i] << "\n";
+        textCtrl << "var1[" << (int) i << "] (type " << var1[i].GetType() << ") = " << var1[i].MakeString() << "\n";
     }
 }
 
diff --git a/samples/typetest/typetest.def b/samples/typetest/typetest.def
index ece630c311..7df8973dbe 100644
--- a/samples/typetest/typetest.def
+++ b/samples/typetest/typetest.def
@@ -1,4 +1,3 @@
-      *   Last change:  JS   11 Sep 98    1:22 pm
 NAME         Typetest
 DESCRIPTION  'Typetest wxWindows application'
 EXETYPE      WINDOWS
diff --git a/samples/validate/makefile.bcc b/samples/validate/makefile.bcc
new file mode 100644
index 0000000000..781d93b453
--- /dev/null
+++ b/samples/validate/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=validate
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/samples/wxpoem/makefile.bcc b/samples/wxpoem/makefile.bcc
new file mode 100644
index 0000000000..263704432f
--- /dev/null
+++ b/samples/wxpoem/makefile.bcc
@@ -0,0 +1,19 @@
+#
+# File:		makefile.bcc
+# Author:	Julian Smart
+# Created:	1998
+# Updated:	
+#
+# Builds a BC++ 16-bit sample
+
+!if "$(WXWIN)" == ""
+!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
+!endif
+
+WXDIR = $(WXWIN)
+
+TARGET=wxpoem
+OBJECTS=$(TARGET).obj
+
+!include $(WXDIR)\src\makeprog.bcc
+
diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp
index 91f3c16577..cab20994b9 100644
--- a/src/common/dynlib.cpp
+++ b/src/common/dynlib.cpp
@@ -175,8 +175,12 @@ wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
 
 #ifdef UNICODE
   HMODULE handle = LoadLibraryW(lib_name);
+#else
+#ifdef __WIN16__
+  HMODULE handle = ::LoadLibrary(lib_name);
 #else
   HMODULE handle = LoadLibraryA(lib_name);
+#endif
 #endif
   if (!handle)
     return NULL;
diff --git a/src/common/image.cpp b/src/common/image.cpp
index 142eed198a..148059fb99 100644
--- a/src/common/image.cpp
+++ b/src/common/image.cpp
@@ -688,6 +688,9 @@ bool wxBMPHandler::LoadFile( wxImage *image, const wxString& name )
 #define BI_RGB       0
 #define BI_RLE8      1
 #define BI_RLE4      2
+#endif
+
+#ifndef BI_BITFIELDS
 #define BI_BITFIELDS 3
 #endif
 
diff --git a/src/common/list.cpp b/src/common/list.cpp
index c4c2e2078a..f15ace4def 100644
--- a/src/common/list.cpp
+++ b/src/common/list.cpp
@@ -145,7 +145,7 @@ int wxNodeBase::IndexOf() const
 // wxListBase
 // -----------------------------------------------------------------------------
 
-void wxListBase::Init(wxKeyType keyType = wxKEY_NONE)
+void wxListBase::Init(wxKeyType keyType)
 {
   m_nodeFirst =
   m_nodeLast = (wxNodeBase *) NULL;
diff --git a/src/common/socket.cpp b/src/common/socket.cpp
index 9f9851482a..7faaef5d31 100644
--- a/src/common/socket.cpp
+++ b/src/common/socket.cpp
@@ -469,12 +469,22 @@ void wxSocketBase::Discard()
 bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const
 {
   struct sockaddr my_addr;
+#ifdef __WXMSW__
+  int len_addr = sizeof(my_addr);
+#else
   size_t len_addr = sizeof(my_addr);
+#endif
 
   if (m_fd < 0)
     return FALSE;
 
-  if (getpeername(m_fd, (struct sockaddr *)&my_addr, (socklen_t *)&len_addr) < 0)
+  if (getpeername(m_fd, (struct sockaddr *)&my_addr,
+#ifdef __WXMSW__
+    &len_addr)
+#else
+    (socklen_t *)&len_addr)
+#endif
+     < 0)
     return FALSE;
 
   addr_man.Disassemble(&my_addr, len_addr);
@@ -484,12 +494,23 @@ bool wxSocketBase::GetPeer(wxSockAddress& addr_man) const
 bool wxSocketBase::GetLocal(wxSockAddress& addr_man) const
 {
   struct sockaddr my_addr;
+#ifdef __WXMSW__
+  int len_addr = sizeof(my_addr);
+#else
   size_t len_addr = sizeof(my_addr);
+#endif
 
   if (m_fd < 0)
     return FALSE;
 
-  if (getsockname(m_fd, (struct sockaddr *)&my_addr, (socklen_t *)&len_addr) < 0)
+  if (getsockname(m_fd, (struct sockaddr *)&my_addr,
+#ifdef __WXMSW__
+    &len_addr)
+#else
+    (socklen_t *)&len_addr)
+#endif
+     < 0)
+
     return FALSE;
 
   addr_man.Disassemble(&my_addr, len_addr);
diff --git a/src/common/string.cpp b/src/common/string.cpp
index 77026933c0..dcd371e0d2 100644
--- a/src/common/string.cpp
+++ b/src/common/string.cpp
@@ -1116,6 +1116,8 @@ size_t wxString::find(const char* sz, size_t nStart, size_t n) const
 }
 #endif
 
+// Gives a duplicate symbol (presumably a case-insensitivity problem)
+#if !defined(__BORLANDC__)
 size_t wxString::find(char ch, size_t nStart) const
 {
   wxASSERT( nStart <= Len() );
@@ -1124,6 +1126,7 @@ size_t wxString::find(char ch, size_t nStart) const
 
   return p == NULL ? npos : p - c_str();
 }
+#endif
 
 size_t wxString::rfind(const wxString& str, size_t nStart) const
 {
diff --git a/src/common/variant.cpp b/src/common/variant.cpp
index 86d5c83175..9deabaa9c6 100644
--- a/src/common/variant.cpp
+++ b/src/common/variant.cpp
@@ -627,9 +627,18 @@ bool wxVariantDataChar::Read(wxString& str)
  * wxVariantDataString
  */
 
+#if defined(__BORLANDC__) && defined(__WIN16__)
+// Change name because of truncation
+#define wxVariantDataString wxVariantStringData
+#endif
+
 class WXDLLEXPORT 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; }
@@ -705,7 +714,11 @@ bool wxVariantDataString::Read(wxString& str)
     return TRUE;
 }
 
+#if defined(__BORLANDC__) && defined(__WIN16__)
+IMPLEMENT_DYNAMIC_CLASS(wxVariantStringData, wxVariantData)
+#else
 IMPLEMENT_DYNAMIC_CLASS(wxVariantDataString, wxVariantData)
+#endif
 
 /*
  * wxVariantDataTime
diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp
index 10b0ce683e..3be3cd9634 100644
--- a/src/generic/notebook.cpp
+++ b/src/generic/notebook.cpp
@@ -626,7 +626,12 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId)
   if (!m_notebook)
     return;
 
+// Because of name truncation!
+#if defined(__BORLANDC__) && defined(__WIN16__)
+  wxNotebookEvent event(wxEVT_COMMAND_NB_PAGE_CHANGED, m_notebook->GetId());
+#else
   wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId());
+#endif
 
   // Translate from wxTabView's ids (which aren't position-dependent)
   // to wxNotebook's (which are).
diff --git a/src/makebcc.env b/src/makebcc.env
index 70b5f43388..1bbebd6249 100644
--- a/src/makebcc.env
+++ b/src/makebcc.env
@@ -2,10 +2,9 @@
 
 WXDIR = $(WXWIN)
 
-CFG = $(WXDIR)\src\wxwin.cfg
-WXLIB = $(WXDIR)\lib
-WXINC = $(WXDIR)\include\msw
-WXBASEINC = $(WXDIR)\include\base
+CFG = $(WXDIR)\src\msw\wxwin.cfg
+WXLIBDIR = $(WXDIR)\lib
+WXINC = $(WXDIR)\include
 
 !ifndef FINAL
 FINAL=0
@@ -14,7 +13,7 @@ FINAL=0
 !if "$(FINAL)" == "0"
 LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
 OPT = -Od
-DEBUG_FLAGS= -v -D__WXDEBUG__ -DWXDEBUG=1
+DEBUG_FLAGS= -v -D__WXDEBUG__
 !else
 LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
 OPT = -O2
@@ -24,10 +23,13 @@ CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
 
 CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
 
-LIBTARGET= $(WXLIB)\wx.lib
+WXLIB= $(WXLIBDIR)\wx.lib
 
 SRCSUFF = cpp
 OBJSUFF = obj
 
 .$(SRCSUFF).obj:
         bcc $(CPPFLAGS) -c {$< }
+
+.c.obj:
+	bcc $(CPPFLAGS) -DUSE_DEFINE -P- -c {$< }
diff --git a/src/makeprog.bcc b/src/makeprog.bcc
new file mode 100644
index 0000000000..1600f23c22
--- /dev/null
+++ b/src/makeprog.bcc
@@ -0,0 +1,47 @@
+# makeprog.bcc
+# Incude file for samples
+
+!include $(WXDIR)\src\makebcc.env
+
+WXLIB = $(WXDIR)\lib\wx.lib
+LIBS=$(WXLIB) mathwl cwl import
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+!if "$(FINAL)" == "0"
+LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -Od
+DEBUG_FLAGS= -v
+!else
+LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
+OPT = -O2
+DEBUG_FLAGS =
+!endif
+CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
+
+all:    $(TARGET).exe
+
+$(TARGET).exe:      $(WXLIB) $(OBJECTS) $(TARGET).def $(TARGET).res
+        tlink $(LINKFLAGS) @&&!
+c0wl.obj $(OBJECTS)
+$(TARGET)
+nul
+$(LIBS)
+$(TARGET).def
+!
+        rc -K $(TARGET).res
+
+.$(SRCSUFF).obj:
+	bcc $(CPPFLAGS) -c {$< }
+
+$(TARGET).res :      $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
+    rc -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)
+
+clean:
+        -erase *.obj
+        -erase *.exe
+        -erase *.res
+        -erase *.map
+        -erase *.rws
diff --git a/src/msw/app.cpp b/src/msw/app.cpp
index 22e1baf8df..aa041848e8 100644
--- a/src/msw/app.cpp
+++ b/src/msw/app.cpp
@@ -43,9 +43,15 @@
   #include "wx/resource.h"
 #endif
 
-#if wxUSE_DRAG_AND_DROP
+// To UG: there's no point in putting this #if here
+// if you don't do the same for the Ole calls further down.
+// Also, OLE is used not just for drag and drop (it's used by automatn.cpp).
+// #if wxUSE_DRAG_AND_DROP
+#ifndef __GNUWIN32__
 #include <ole2.h>
 #endif
+// #endif
+
 #include <string.h>
 #include <ctype.h>
 
diff --git a/src/msw/data.cpp b/src/msw/data.cpp
index 8999733aef..5660f98402 100644
--- a/src/msw/data.cpp
+++ b/src/msw/data.cpp
@@ -144,6 +144,7 @@ const char *wxFileSelectorPromptStr = "Select a file";
 const char *wxFileSelectorDefaultWildcardStr = "*.*";
 const char *wxInternalErrorStr = "wxWindows Internal Error";
 const char *wxFatalErrorStr = "wxWindows Fatal Error";
+const char *wxTreeCtrlNameStr = "treeCtrl";
 
 // See wx/utils.h
 const char *wxFloatToStringStr = "%.2f";
diff --git a/src/msw/dibutils.cpp b/src/msw/dibutils.cpp
index 30dca59100..b337129663 100644
--- a/src/msw/dibutils.cpp
+++ b/src/msw/dibutils.cpp
@@ -173,9 +173,13 @@ PDIB DibOpenFile(LPSTR szFile)
 		  HRSRC h;
 
           // TODO: Unicode version
+#ifdef __WIN16__
+		  h = FindResource(GetCurrentInstance(), szFile, RT_BITMAP);
+#else
 		  h = FindResourceA(GetCurrentInstance(), szFile, RT_BITMAP);
+#endif
 
-#if defined(WIN32) || defined(_WIN32)
+#if defined(__WIN32__)
 		  //!!! can we call GlobalFree() on this? is it the right format.
 		  //!!! can we write to this resource?
 		  if (h)
diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp
index b49e6d9348..ff65d00f8a 100644
--- a/src/msw/iniconf.cpp
+++ b/src/msw/iniconf.cpp
@@ -141,7 +141,7 @@ void wxIniConfig::SetPath(const wxString& strPath)
   // other functions assume that all this is true, i.e. there are no trailing
   // underscores at the end except if the group is the root one
   wxASSERT( (m_strPath.IsEmpty() || m_strPath.Last() != PATH_SEP_REPLACE) &&
-            (m_strGroup == PATH_SEP_REPLACE ||
+            (m_strGroup == wxString(PATH_SEP_REPLACE) ||
              m_strGroup.Last() != PATH_SEP_REPLACE) );
 }
 
@@ -152,7 +152,7 @@ const wxString& wxIniConfig::GetPath() const
   // always return abs path
   s_str = wxCONFIG_PATH_SEPARATOR;
 
-  if ( m_strGroup == PATH_SEP_REPLACE ) {
+  if ( m_strGroup == (const char*) PATH_SEP_REPLACE ) {
     // we're at the root level, nothing to do
   }
   else {
@@ -183,7 +183,7 @@ wxString wxIniConfig::GetKeyName(const wxString& szKey) const
 {
   wxString strKey;
 
-  if ( m_strGroup != PATH_SEP_REPLACE )
+  if ( m_strGroup != wxString(PATH_SEP_REPLACE) )
     strKey << m_strGroup << PATH_SEP_REPLACE;
   if ( !m_strPath.IsEmpty() )
     strKey << m_strPath << PATH_SEP_REPLACE;
diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32
index a095362bdc..341ce0bf04 100644
--- a/src/msw/makefile.b32
+++ b/src/msw/makefile.b32
@@ -72,22 +72,27 @@ DOCDIR = $(WXDIR)\docs
 
 GENERICOBJS= \
   $(MSWDIR)\choicdgg.obj \
-  $(MSWDIR)\colrdlgg.obj \
-  $(MSWDIR)\fontdlgg.obj \
   $(MSWDIR)\gridg.obj \
-  $(MSWDIR)\helpxlp.obj \
+  $(MSWDIR)\imaglist.obj \
   $(MSWDIR)\laywin.obj \
-  $(MSWDIR)\msgdlgg.obj \
   $(MSWDIR)\panelg.obj \
   $(MSWDIR)\sashwin.obj \
   $(MSWDIR)\scrolwin.obj \
   $(MSWDIR)\splitter.obj \
   $(MSWDIR)\statusbr.obj \
   $(MSWDIR)\tabg.obj \
-  $(MSWDIR)\textdlgg.obj
+  $(MSWDIR)\textdlgg.obj \
 
+# Not needed:
+#  $(MSWDIR)\colrdlgg.obj \
+#  $(MSWDIR)\fontdlgg.obj \
+#  $(MSWDIR)\helpxlp.obj \
+#  $(MSWDIR)\msgdlgg.obj \
 #  $(MSWDIR)\printps.obj \
 #  $(MSWDIR)\prntdlgg.obj \
+#  $(MSWDIR)\listctrl.obj \
+#  $(MSWDIR)\notebook.obj \
+#  $(MSWDIR)\treectrl.obj
 
 COMMONOBJS = \
   $(MSWDIR)\config.obj \
@@ -220,16 +225,16 @@ MSWOBJS = \
   $(MSWDIR)\spinbutt.obj \
   $(MSWDIR)\statbmp.obj \
   $(MSWDIR)\statbox.obj \
-  $(MSWDIR)\statbr95.obj \
   $(MSWDIR)\stattext.obj \
+  $(MSWDIR)\statbr95.obj \
   $(MSWDIR)\tabctrl.obj \
-  $(MSWDIR)\taskbar.obj \
-  $(MSWDIR)\tbar95.obj \
   $(MSWDIR)\tbarmsw.obj \
   $(MSWDIR)\textctrl.obj \
   $(MSWDIR)\thread.obj \
   $(MSWDIR)\timer.obj \
   $(MSWDIR)\treectrl.obj \
+  $(MSWDIR)\taskbar.obj \
+  $(MSWDIR)\tbar95.obj \
   $(MSWDIR)\utils.obj \
   $(MSWDIR)\utilsexc.obj \
   $(MSWDIR)\wave.obj \
@@ -253,15 +258,15 @@ all:	all_libs all_execs
 
 !if "$(DLL)" == "0"
 
-$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(BASEOBJECTS)
+$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
         erase $(LIBTARGET)
 	tlib $(LIBTARGET) /P512 @&&!
--+$(OBJECTS:.obj =.obj -+) -+$(BASEOBJECTS:.obj =.obj -+) -+$(PERIPH_LIBS:.lib =.lib -+)
+-+$(OBJECTS:.obj =.obj -+) -+$(PERIPH_LIBS:.lib =.lib -+)
 !
 
 !else
 
-$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(BASEOBJECTS)
+$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
 	erase $(LIBTARGET)
 	erase $(WXLIBDIR)\wx.dll
         tlink32 $(LINK_FLAGS) /v @&&!
@@ -648,7 +653,7 @@ ctl3d:  $(CFG)
         cd $(WXDIR)\src\msw
 
 wxxpm:	$(CFG)
-	cd $(WXDIR)\src\common\wxxpm
+	cd $(WXDIR)\src\xpm
 	make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
 	cd $(WXDIR)\src\msw
 
diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc
index 8270dc47cc..105a2077a7 100644
--- a/src/msw/makefile.bcc
+++ b/src/msw/makefile.bcc
@@ -31,377 +31,685 @@ WXDIR = $(WXWIN)
 !include $(WXDIR)\src\makebcc.env
 
 THISDIR = $(WXDIR)\src\msw
-WXLIB = $(WXDIR)\lib
-WXINC = $(WXDIR)\include\msw
-WXBASESRC = $(WXDIR)\src\base
-WXBASEINC = $(WXDIR)\include\base
 
 # Please set these according to the settings in wx_setup.h, so we can include
 # the appropriate libraries in wx.lib
 USE_CTL3D=1
-USE_ITSYBITS=1
-USE_GAUGE=1
-USE_IMAGE_LOADING_IN_MSW=1
 USE_XPM_IN_MSW=0
-USE_WX_RESOURCES=1
-USE_RESOURCE_LOADING_IN_MSW=1
-USE_GNU_WXSTRING=1
 
 PERIPH_LIBS=
 PERIPH_TARGET=
 PERIPH_CLEAN_TARGET=
 
 !if "$(USE_CTL3D)" == "1"
-PERIPH_LIBS=$(WXDIR)\lib\ctl3dv2.lib $(PERIPH_LIBS)
-PERIPH_TARGET=ctl3d $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_ctl3d $(PERIPH_CLEAN_TARGET)
-!endif
-
-!if "$(USE_ITSYBITS)" == "1"
-PERIPH_LIBS=$(WXDIR)\contrib\itsybits\itsy.lib $(PERIPH_LIBS)
-PERIPH_TARGET=itsy $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_itsy $(PERIPH_CLEAN_TARGET)
-!endif
-
-!if "$(USE_GAUGE)" == "1"
-PERIPH_LIBS=$(WXDIR)\contrib\gauge\gauge.lib $(PERIPH_LIBS)
-PERIPH_TARGET=gauge $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_gauge $(PERIPH_CLEAN_TARGET)
+PERIPH_LIBS=$(BCCDIR)\lib\ctl3dv2.lib $(PERIPH_LIBS)
 !endif
 
 !if "$(USE_XPM_IN_MSW)" == "1"
-PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS)
+PERIPH_LIBS=$(WXDIR)\xpm.lib $(PERIPH_LIBS)
 PERIPH_TARGET=xpm $(PERIPH_TARGET)
 PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET)
 !endif
 
-!if "$(USE_IMAGE_LOADING_IN_MSW)" == "1"
-PERIPH_LIBS=$(WXDIR)\utils\dib\dib.lib $(PERIPH_LIBS)
-PERIPH_TARGET=dib $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_dib $(PERIPH_CLEAN_TARGET)
-!endif
-
-!if "$(USE_WX_RESOURCES)" == "1"
-PERIPH_LIBS=$(WXDIR)\utils\prologio\lib\prologio.lib $(PERIPH_LIBS)
-PERIPH_TARGET=prologio $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_proio $(PERIPH_CLEAN_TARGET)
-!endif
-
-!if "$(USE_RESOURCE_LOADING_IN_MSW)" == "1"
-PERIPH_LIBS=$(WXDIR)\utils\rcparser\lib\rcparser.lib $(PERIPH_LIBS)
-PERIPH_TARGET=rcparser $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_rcp $(PERIPH_CLEAN_TARGET)
-!endif
-
-WXSTRINGOBJ=..\base\wxstring.obj
-
-!if "$(USE_GNU_WXSTRING)" == "1"
-PERIPH_LIBS=$(WXDIR)\contrib\wxstring\wxstring.lib $(PERIPH_LIBS)
-PERIPH_TARGET=wxstring $(PERIPH_TARGET)
-PERIPH_CLEAN_TARGET=clean_wxstring $(PERIPH_CLEAN_TARGET)
-WXSTRINGOBJ=
-!endif
+# TODO: add these libraries
+# PERIPH_LIBS=$(WXDIR)\lib\zlib.lib $(WXDIR)\lib\winpng.lib $(PERIPH_LIBS)
+# PERIPH_TARGET=zlib png $(PERIPH_TARGET)
+# PERIPH_CLEAN_TARGET=clean_zlib clean_png $(PERIPH_CLEAN_TARGET)
 
 CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
 
-LIBTARGET= $(WXLIB)\wx.lib
+LIBTARGET= $(WXLIBDIR)\wx.lib
 DUMMY=dummy
 
-BASEHEADERS = $(WXBASEINC)\wx_defs.h \
-  $(WXBASEINC)\wb_buttn.h \
-  $(WXBASEINC)\wb_canvs.h \
-  $(WXBASEINC)\wb_check.h \
-  $(WXBASEINC)\wb_choic.h \
-  $(WXBASEINC)\wb_dc.h \
-  $(WXBASEINC)\wb_dccan.h \
-  $(WXBASEINC)\wb_dcmem.h \
-  $(WXBASEINC)\wb_dialg.h \
-  $(WXBASEINC)\wb_frame.h \
-  $(WXBASEINC)\wb_gdi.h \
-  $(WXBASEINC)\wb_ipc.h \
-  $(WXBASEINC)\wb_ipcob.h \
-  $(WXBASEINC)\wb_item.h \
-  $(WXBASEINC)\wb_lbox.h \
-  $(WXBASEINC)\wb_main.h \
-  $(WXBASEINC)\wb_menu.h \
-  $(WXBASEINC)\wb_messg.h \
-  $(WXBASEINC)\wb_mf.h \
-  $(WXBASEINC)\wb_mnuit.h \
-  $(WXBASEINC)\wb_mtxt.h \
-  $(WXBASEINC)\wb_panel.h \
-  $(WXBASEINC)\wb_slidr.h \
-  $(WXBASEINC)\wb_text.h \
-  $(WXBASEINC)\wb_timer.h \
-  $(WXBASEINC)\wb_txt.h \
-  $(WXBASEINC)\wb_win.h \
-  $(WXBASEINC)\wx_dcps.h \
-  $(WXBASEINC)\wx_form.h \
-  $(WXBASEINC)\wx_hash.h \
-  $(WXBASEINC)\wx_help.h \
-  $(WXBASEINC)\wx_list.h \
-  $(WXBASEINC)\wxstring.h \
-  $(WXBASEINC)\wx_mgstr.h \
-  $(WXBASEINC)\wx_obj.h \
-  $(WXBASEINC)\wx_stdev.h \
-  $(WXBASEINC)\wx_sysev.h \
-  $(WXBASEINC)\wx_types.h \
-  $(WXBASEINC)\wx_utils.h
-
-LOCALHEADERS = \
-  $(WXINC)\wx_buttn.h \
-  $(WXINC)\wx_canvs.h \
-  $(WXINC)\wx_check.h \
-  $(WXINC)\wx_choic.h \
-  $(WXINC)\wx_combo.h \
-  $(WXINC)\wx_dc.h \
-  $(WXINC)\wx_dccan.h \
-  $(WXINC)\wx_dcmem.h \
-  $(WXINC)\wx_dialg.h \
-  $(WXINC)\wx_frame.h \
-  $(WXINC)\wx_gdi.h \
-  $(WXINC)\wx_ipc.h \
-  $(WXINC)\wx_ipcob.h \
-  $(WXINC)\wx_item.h \
-  $(WXINC)\wx_lbox.h \
-  $(WXINC)\wx_main.h \
-  $(WXINC)\wx_menu.h \
-  $(WXINC)\wx_messg.h \
-  $(WXINC)\wx_mf.h \
-  $(WXINC)\wx_mnuit.h \
-  $(WXINC)\wx_mtxt.h \
-  $(WXINC)\wx_panel.h \
-  $(WXINC)\wx_privt.h \
-  $(WXINC)\wx_slidr.h \
-  $(WXINC)\wx_text.h \
-  $(WXINC)\wx_timer.h \
-  $(WXINC)\wx_txt.h \
-  $(WXINC)\wx_win.h
-
-OBJECTS1 = wx_win.obj wx_frame.obj wx_panel.obj wx_utils.obj wx_main.obj\
-  wx_item.obj
-
-OBJECTS2 = wx_text.obj wx_gdi.obj wx_dialg.obj wx_canvs.obj wx_dc.obj wx_mf.obj
-
-OBJECTS3 = wx_ipc.obj wx_timer.obj wx_clipb.obj wx_stat.obj wx_scrol.obj wx_vlbox.obj
-
-OBJECTS4 = wx_buttn.obj wx_messg.obj wx_check.obj wx_choic.obj wx_rbox.obj wx_lbox.obj \
- wx_group.obj wx_gauge.obj wx_txt.obj wx_mtxt.obj wx_slidr.obj wx_menu.obj wx_db.obj\
- wx_cmdlg.obj wx_combo.obj
-
-OBJECTS = $(OBJECTS1) $(OBJECTS2) $(OBJECTS3) $(OBJECTS4)
-
-BASEOBJECTS1 = ..\base\wb_data.obj ..\base\wb_win.obj ..\base\wb_frame.obj ..\base\wb_panel.obj\
-  ..\base\wb_utils.obj ..\base\wb_main.obj ..\base\wb_res.obj
-
-BASEOBJECTS2 = ..\base\wb_item.obj ..\base\wb_list.obj ..\base\wb_obj.obj\
-  ..\base\wb_ps.obj ..\base\wx_doc.obj ..\base\wx_tbar.obj ..\base\wx_bbar.obj
-
-BASEOBJECTS3 = ..\base\wb_text.obj ..\base\wb_gdi.obj ..\base\wb_dialg.obj\
-  ..\base\wb_canvs.obj ..\base\wx_date.obj ..\base\wx_time.obj ..\base\wx_frac.obj
-
-BASEOBJECTS4 = ..\base\wb_dc.obj ..\base\wb_mf.obj ..\base\wb_hash.obj\
-  ..\base\wb_ipc.obj ..\base\wx_lay.obj ..\base\wx_mem.obj ..\base\wb_cmdlg.obj
-
-BASEOBJECTS5 = ..\base\wb_form.obj ..\base\wb_timer.obj ..\base\wb_help.obj\
-  ..\base\wb_vlbox.obj ..\base\wb_scrol.obj ..\base\wb_stat.obj
-
-BASEOBJECTS6 = ..\base\wb_sysev.obj ..\base\wb_stdev.obj ..\base\wb_types.obj\
-  ..\base\wb_mgstr.obj ..\base\wb_print.obj $(WXSTRINGOBJ)
-
-BASEOBJECTS = $(BASEOBJECTS1) $(BASEOBJECTS2) $(BASEOBJECTS3)\
-  $(BASEOBJECTS4) $(BASEOBJECTS5) $(BASEOBJECTS6)
-
-
-all:    $(CFG) $(DUMMY).obj base $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
-
-base:
-	cd $(WXBASESRC)
-	make -f makefile.bcc -DCFG=$(CFG) -DWXDIR=$(WXDIR) DEBUG=$(DEBUG) -DDEBUG_FLAGS=$(DEBUG_FLAGS) -DOPT=$(OPT) -DFINAL=$(FINAL)
-	cd $(THISDIR)
-
-$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(BASEOBJECTS) $(PERIPH_LIBS)
+GENDIR=..\generic
+COMMDIR=..\common
+OLEDIR=.\ole
+MSWDIR=.
+
+DOCDIR = $(WXDIR)\docs
+
+GENERICOBJS= \
+  $(MSWDIR)\choicdgg.obj \
+  $(MSWDIR)\colrdlgg.obj \
+  $(MSWDIR)\fontdlgg.obj \
+  $(MSWDIR)\gridg.obj \
+  $(MSWDIR)\imaglist.obj \
+  $(MSWDIR)\helpxlp.obj \
+  $(MSWDIR)\laywin.obj \
+  $(MSWDIR)\listctrl.obj \
+  $(MSWDIR)\msgdlgg.obj \
+  $(MSWDIR)\notebook.obj \
+  $(MSWDIR)\panelg.obj \
+  $(MSWDIR)\sashwin.obj \
+  $(MSWDIR)\scrolwin.obj \
+  $(MSWDIR)\splitter.obj \
+  $(MSWDIR)\statusbr.obj \
+  $(MSWDIR)\tabg.obj \
+  $(MSWDIR)\textdlgg.obj \
+  $(MSWDIR)\treectrl.obj
+
+#  $(MSWDIR)\printps.obj \
+#  $(MSWDIR)\prntdlgg.obj \
+
+COMMONOBJS = \
+  $(MSWDIR)\config.obj \
+  $(MSWDIR)\cmndata.obj \
+  $(MSWDIR)\docview.obj \
+  $(MSWDIR)\docmdi.obj \
+  $(MSWDIR)\dynarray.obj \
+  $(MSWDIR)\event.obj \
+  $(MSWDIR)\file.obj \
+  $(MSWDIR)\fileconf.obj \
+  $(MSWDIR)\filefn.obj \
+  $(MSWDIR)\framecmn.obj \
+  $(MSWDIR)\gdicmn.obj \
+  $(MSWDIR)\helpbase.obj \
+  $(MSWDIR)\image.obj \
+  $(MSWDIR)\intl.obj \
+  $(MSWDIR)\ipcbase.obj \
+  $(MSWDIR)\log.obj \
+  $(MSWDIR)\layout.obj \
+  $(MSWDIR)\memory.obj \
+  $(MSWDIR)\module.obj \
+  $(MSWDIR)\object.obj \
+  $(MSWDIR)\postscrp.obj \
+  $(MSWDIR)\prntbase.obj \
+  $(MSWDIR)\resource.obj \
+  $(MSWDIR)\tbarbase.obj \
+  $(MSWDIR)\tbarsmpl.obj \
+  $(MSWDIR)\textfile.obj \
+  $(MSWDIR)\timercmn.obj \
+  $(MSWDIR)\utilscmn.obj \
+  $(MSWDIR)\validate.obj \
+  $(MSWDIR)\valtext.obj \
+  $(MSWDIR)\variant.obj \
+  $(MSWDIR)\date.obj \
+  $(MSWDIR)\hash.obj \
+  $(MSWDIR)\list.obj \
+  $(MSWDIR)\string.obj \
+  $(MSWDIR)\time.obj \
+  $(MSWDIR)\wxexpr.obj \
+  $(MSWDIR)\y_tab.obj \
+  $(MSWDIR)\stream.obj \
+  $(MSWDIR)\wfstream.obj \
+  $(MSWDIR)\mstream.obj \
+  $(MSWDIR)\zstream.obj \
+  $(MSWDIR)\datstrm.obj \
+  $(MSWDIR)\sckstrm.obj \
+  $(MSWDIR)\extended.obj \
+  $(MSWDIR)\wincmn.obj \
+  $(MSWDIR)\objstrm.obj \
+  $(MSWDIR)\dynlib.obj \
+  $(MSWDIR)\tokenzr.obj
+
+#  $(MSWDIR)\socket.obj \
+#  $(MSWDIR)\sckaddr.obj \
+#  $(MSWDIR)\protocol.obj \
+#  $(MSWDIR)\url.obj \
+#  $(MSWDIR)\http.obj \
+#  $(MSWDIR)\ftp.obj \
+#  $(MSWDIR)\sckfile.obj \
+#  $(MSWDIR)\sckipc.obj \
+#  $(MSWDIR)\odbc.obj \
+
+MSWOBJS = \
+  $(MSWDIR)\accel.obj \
+  $(MSWDIR)\app.obj \
+  $(MSWDIR)\bitmap.obj \
+  $(MSWDIR)\bmpbuttn.obj \
+  $(MSWDIR)\brush.obj \
+  $(MSWDIR)\button.obj \
+  $(MSWDIR)\checkbox.obj \
+  $(MSWDIR)\checklst.obj \
+  $(MSWDIR)\choice.obj \
+  $(MSWDIR)\clipbrd.obj \
+  $(MSWDIR)\colordlg.obj \
+  $(MSWDIR)\colour.obj \
+  $(MSWDIR)\combobox.obj \
+  $(MSWDIR)\control.obj \
+  $(MSWDIR)\curico.obj \
+  $(MSWDIR)\cursor.obj \
+  $(MSWDIR)\data.obj \
+  $(MSWDIR)\dc.obj \
+  $(MSWDIR)\dcmemory.obj \
+  $(MSWDIR)\dcclient.obj \
+  $(MSWDIR)\dcprint.obj \
+  $(MSWDIR)\dcscreen.obj \
+  $(MSWDIR)\dde.obj \
+  $(MSWDIR)\dialog.obj \
+  $(MSWDIR)\dib.obj \
+  $(MSWDIR)\dibutils.obj \
+  $(MSWDIR)\dirdlg.obj \
+  $(MSWDIR)\filedlg.obj \
+  $(MSWDIR)\font.obj \
+  $(MSWDIR)\fontdlg.obj \
+  $(MSWDIR)\frame.obj \
+  $(MSWDIR)\gaugemsw.obj \
+  $(MSWDIR)\gdiobj.obj \
+  $(MSWDIR)\helpwin.obj \
+  $(MSWDIR)\icon.obj \
+  $(MSWDIR)\imaglist.obj \
+  $(MSWDIR)\iniconf.obj \
+  $(MSWDIR)\joystick.obj \
+  $(MSWDIR)\listbox.obj \
+  $(MSWDIR)\main.obj \
+  $(MSWDIR)\mdi.obj \
+  $(MSWDIR)\menu.obj \
+  $(MSWDIR)\menuitem.obj \
+  $(MSWDIR)\metafile.obj \
+  $(MSWDIR)\minifram.obj \
+  $(MSWDIR)\msgdlg.obj \
+  $(MSWDIR)\nativdlg.obj \
+  $(MSWDIR)\ownerdrw.obj \
+  $(MSWDIR)\palette.obj \
+  $(MSWDIR)\pen.obj \
+  $(MSWDIR)\penwin.obj \
+  $(MSWDIR)\pnghand.obj \
+  $(MSWDIR)\printdlg.obj \
+  $(MSWDIR)\printwin.obj \
+  $(MSWDIR)\radiobox.obj \
+  $(MSWDIR)\radiobut.obj \
+  $(MSWDIR)\region.obj \
+  $(MSWDIR)\scrolbar.obj \
+  $(MSWDIR)\settings.obj \
+  $(MSWDIR)\slidrmsw.obj \
+  $(MSWDIR)\spinbutt.obj \
+  $(MSWDIR)\statbmp.obj \
+  $(MSWDIR)\statbox.obj \
+  $(MSWDIR)\stattext.obj \
+  $(MSWDIR)\tbarmsw.obj \
+  $(MSWDIR)\textctrl.obj \
+  $(MSWDIR)\timer.obj \
+  $(MSWDIR)\utils.obj \
+  $(MSWDIR)\utilsexc.obj \
+  $(MSWDIR)\wave.obj \
+  $(MSWDIR)\window.obj \
+
+# Unfortunately this causes a crash when the oleauto sample starts.
+#  $(MSWDIR)\automtn.obj
+
+# Not used for 16-bit compilation
+#  $(MSWDIR)\gauge95.obj \
+#  $(MSWDIR)\treectrl.obj \
+#  $(MSWDIR)\oleutils.obj \
+#  $(MSWDIR)\dataobj.obj \
+#  $(MSWDIR)\uuid.obj
+#  $(MSWDIR)\droptgt.obj \
+#  $(MSWDIR)\dropsrc.obj \
+#  $(MSWDIR)\notebook.obj \
+#  $(MSWDIR)\listctrl.obj \
+#  $(MSWDIR)\tabctrl.obj \
+#  $(MSWDIR)\taskbar.obj \
+#  $(MSWDIR)\tbar95.obj \
+#  $(MSWDIR)\thread.obj \
+#  $(MSWDIR)\slider95.obj \
+#  $(MSWDIR)\statbr95.obj \
+#  $(MSWDIR)\registry.obj \
+#  $(MSWDIR)\regconf.obj \
+
+OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
+
+default:	wx
+
+wx:    $(CFG) $(DUMMY).obj $(OBJECTS) $(PERIPH_TARGET) $(LIBTARGET)
+
+$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
 	erase $(LIBTARGET)
-	tlib $(WXLIB)\wx.lib /P512 @&&!
-+$(OBJECTS:.obj =.obj +) +$(BASEOBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
+	tlib $(LIBTARGET) /P1024 @&&!
++$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
 !
 
-dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\base\wx.h
-	
-
-dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\base\wx.h
-
-wx_obj.obj:     $(WXBASEINC)\wx_obj.h
-
-wx_win.obj:     $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h \
-  $(WXBASEINC)\wx_utils.h wx_win.$(SRCSUFF) $(WXINC)\wx_gdi.h $(WXINC)\wx_privt.h
-
-wx_main.obj:   $(WXBASEINC)\wx_defs.h $(WXBASEINC)\wx_obj.h $(WXINC)\wx_frame.h $(WXBASEINC)\wx_utils.h \
-  $(WXINC)\wx_main.h wx_main.$(SRCSUFF) $(WXINC)\wx_privt.h
-
-wx_frame.obj:   $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h wx_frame.$(SRCSUFF)\
-		$(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h
-
-wx_panel.obj:   $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_panel.h\
-		wx_panel.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h
-
-wx_text.obj:    $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_text.h\
-		wx_text.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h
-
-wx_canvs.obj:    $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_canvs.h\
-		 wx_canvs.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_gdi.h\
-		 $(WXINC)\wx_dc.h $(WXINC)\wx_privt.h
-
-wx_dc.obj:    $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_canvs.h\
-		 wx_dc.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_gdi.h $(WXINC)\wx_dc.h\
-	$(WXINC)\wx_dccan.h $(WXINC)\wx_dcmem.h
-
-wx_mf.obj:    $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h\
-		 wx_mf.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_gdi.h $(WXINC)\wx_mf.h
-	
-wx_item.obj:    $(WXBASEINC)\wx_defs.h $(WXINC)\wx_win.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_frame.h $(WXINC)\wx_item.h\
-		wx_item.$(SRCSUFF) $(WXBASEINC)\wx_stdev.h $(WXINC)\wx_privt.h
-	
-wx_utils.obj:   $(WXBASEINC)\wx_defs.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h wx_utils.$(SRCSUFF)
-	
-wx_ipc.obj:   $(WXBASEINC)\wx_defs.h $(WXBASEINC)\wx_obj.h $(WXBASEINC)\wx_utils.h $(WXINC)\wx_ipc.h wx_ipc.$(SRCSUFF)
-	
-wx_gdi.obj:   $(WXBASEINC)\wx_defs.h $(WXINC)\wx_gdi.h $(WXBASEINC)\wx_utils.h wx_gdi.$(SRCSUFF)
-	
-wx_dialg.obj:   $(WXBASEINC)\wx_defs.h wx_dialg.$(SRCSUFF) $(WXINC)\wx_dialg.h $(WXINC)\wx_win.h\
-  $(WXBASEINC)\wx_utils.h $(WXINC)\wx_panel.h $(WXINC)\wx_privt.h
-	
-wx_timer.obj:   $(WXBASEINC)\wx_defs.h wx_timer.$(SRCSUFF) $(WXINC)\wx_timer.h
-	
-wx_clipb.obj:   $(WXBASEINC)\wx_defs.h wx_clipb.$(SRCSUFF) $(WXINC)\wx_clipb.h
-
-wx_stat.obj:   $(WXBASEINC)\wx_defs.h wx_stat.$(SRCSUFF)
-wx_vlbox.obj:   $(WXBASEINC)\wx_defs.h wx_vlbox.$(SRCSUFF)
-wx_messg.obj:   $(WXBASEINC)\wx_defs.h wx_messg.$(SRCSUFF) $(WXINC)\wx_messg.h
-wx_buttn.obj:   $(WXBASEINC)\wx_defs.h wx_buttn.$(SRCSUFF) $(WXINC)\wx_buttn.h
-wx_check.obj:   $(WXBASEINC)\wx_defs.h wx_check.$(SRCSUFF) $(WXINC)\wx_check.h
-wx_choic.obj:   $(WXBASEINC)\wx_defs.h wx_choic.$(SRCSUFF) $(WXINC)\wx_choic.h
-wx_combo.obj:   $(WXBASEINC)\wx_defs.h wx_combo.$(SRCSUFF) $(WXINC)\wx_combo.h
-wx_group.obj:   $(WXBASEINC)\wx_defs.h wx_group.$(SRCSUFF) $(WXINC)\wx_group.h
-wx_gauge.obj:   $(WXBASEINC)\wx_defs.h wx_gauge.$(SRCSUFF) $(WXINC)\wx_gauge.h
-wx_lbox.obj:   $(WXBASEINC)\wx_defs.h wx_lbox.$(SRCSUFF) $(WXINC)\wx_lbox.h
-wx_rbox.obj:   $(WXBASEINC)\wx_defs.h wx_rbox.$(SRCSUFF) $(WXINC)\wx_rbox.h
-wx_menu.obj:   $(WXBASEINC)\wx_defs.h wx_menu.$(SRCSUFF) $(WXINC)\wx_menu.h
-wx_txt.obj:   $(WXBASEINC)\wx_defs.h wx_txt.$(SRCSUFF) $(WXINC)\wx_txt.h
-wx_mtxt.obj:   $(WXBASEINC)\wx_defs.h wx_mtxt.$(SRCSUFF) $(WXINC)\wx_mtxt.h
-wx_slidr.obj:   $(WXBASEINC)\wx_defs.h wx_slidr.$(SRCSUFF) $(WXINC)\wx_slidr.h
-wx_db.obj:   $(WXBASEINC)\wx_defs.h wx_db.$(SRCSUFF) $(WXINC)\wx_db.h
-wx_cmdlg.obj:   $(WXBASEINC)\wx_defs.h wx_cmdlg.$(SRCSUFF) $(WXINC)\wx_cmdlg.h
-
-$(WXINC)\wx_win.h:  $(WXBASEINC)\wb_win.h
-$(WXINC)\wx_main.h:  $(WXBASEINC)\wb_main.h
-$(WXINC)\wx_frame.h:  $(WXBASEINC)\wb_frame.h
-$(WXINC)\wx_panel.h:  $(WXBASEINC)\wb_panel.h
-$(WXINC)\wx_text.h:  $(WXBASEINC)\wb_text.h
-$(WXINC)\wx_dialg.h:  $(WXBASEINC)\wb_dialg.h
-$(WXINC)\wx_ipc.h:  $(WXBASEINC)\wb_ipc.h
-$(WXINC)\wx_gdi.h:  $(WXBASEINC)\wb_gdi.h
-$(WXINC)\wx_event.h:  $(WXBASEINC)\wb_event.h
-$(WXINC)\wx_canvs.h:  $(WXBASEINC)\wb_canvs.h
-$(WXINC)\wx_mf.h:  $(WXBASEINC)\wb_mf.h
-$(WXINC)\wx_item.h:  $(WXBASEINC)\wb_item.h
-$(WXINC)\wx_buttn.h:  $(WXBASEINC)\wb_buttn.h
-$(WXINC)\wx_messg.h:  $(WXBASEINC)\wb_messg.h
-$(WXINC)\wx_choic.h:  $(WXBASEINC)\wb_choic.h
-$(WXINC)\wx_combo.h:  $(WXBASEINC)\wb_combo.h
-$(WXINC)\wx_check.h:  $(WXBASEINC)\wb_check.h
-$(WXINC)\wx_lbox.h:  $(WXBASEINC)\wb_lbox.h
-$(WXINC)\wx_txt.h:  $(WXBASEINC)\wb_txt.h
-$(WXINC)\wx_mtxt.h:  $(WXBASEINC)\wb_mtxt.h
-$(WXINC)\wx_slidr.h:  $(WXBASEINC)\wb_slidr.h
-$(WXINC)\wx_menu.h:  $(WXBASEINC)\wb_menu.h
-
-# Peripheral components
-
-ctl3d:
-    cd $(WXDIR)\contrib\ctl3d\borland
-    make -f makefile.bcc DEBUG=$(DEBUG) 
-    cd $(WXDIR)\src\msw
+dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
+dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
 
-clean_ctl3d:
-    cd $(WXDIR)\contrib\ctl3d\borland
-    make -f makefile.bcc clean
-    cd $(WXDIR)\src\msw
+$(MSWDIR)\y_tab.obj:     $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
 
-itsy:
-    cd $(WXDIR)\contrib\itsybits
-    make -f makefile.bcc DEBUG=$(DEBUG) 
-    cd $(WXDIR)\src\msw
+#        cl @<<
+#$(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
+#<<
 
-clean_itsy:
-    cd $(WXDIR)\contrib\itsybits
-    make -f makefile.bcc clean
-    cd $(WXDIR)\src\msw
+$(COMMDIR)\y_tab.c:     $(COMMDIR)\dosyacc.c
+        copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
 
-gauge:
-    cd $(WXDIR)\contrib\gauge
-    make -f makefile.bcc DEBUG=$(DEBUG) 
-    cd $(WXDIR)\src\msw
+$(COMMDIR)\lex_yy.c:    $(COMMDIR)\doslex.c
+    copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
 
-clean_gauge:
-    cd $(WXDIR)\contrib\gauge
-    make -f makefile.bcc clean
-    cd $(WXDIR)\src\msw
+#$(OBJECTS):	$(WXDIR)\include\wx\setup.h
 
-xpm:
-    cd $(WXDIR)\contrib\wxxpm
-    make -f makefile.bcc DEBUG=$(DEBUG) 
-    cd $(WXDIR)\src\msw
+$(MSWDIR)\accel.obj:     $(MSWDIR)\accel.$(SRCSUFF)
 
-clean_xpm:
-    cd $(WXDIR)\contrib\wxxpm
-    make -f makefile.bcc clean
-    cd $(WXDIR)\src\msw
+$(MSWDIR)\app.obj:     $(MSWDIR)\app.$(SRCSUFF)
 
-dib:
-    cd $(WXDIR)\utils\dib
-    make -f makefile.bcc DEBUG=$(DEBUG) 
-    cd $(WXDIR)\src\msw
+$(MSWDIR)\bitmap.obj:     $(MSWDIR)\bitmap.$(SRCSUFF)
 
-clean_dib:
-    cd $(WXDIR)\utils\dib
-    make -f makefile.bcc clean
-    cd $(WXDIR)\src\msw
+$(MSWDIR)\bmpbuttn.obj:     $(MSWDIR)\bmpbuttn.$(SRCSUFF)
 
-prologio:
-    cd $(WXDIR)\utils\prologio\src
-    make -f makefile.bcc DEBUG=$(DEBUG) 
-    cd $(WXDIR)\src\msw
+$(MSWDIR)\brush.obj:     $(MSWDIR)\brush.$(SRCSUFF)
+
+$(MSWDIR)\button.obj:     $(MSWDIR)\button.$(SRCSUFF)
+
+$(MSWDIR)\choice.obj:     $(MSWDIR)\choice.$(SRCSUFF)
+
+$(MSWDIR)\checkbox.obj:     $(MSWDIR)\checkbox.$(SRCSUFF)
+
+$(MSWDIR)\checklst.obj:     $(MSWDIR)\checklst.$(SRCSUFF)
+
+$(MSWDIR)\clipbrd.obj:     $(MSWDIR)\clipbrd.$(SRCSUFF)
+
+$(MSWDIR)\colordlg.obj:     $(MSWDIR)\colordlg.$(SRCSUFF)
+
+$(MSWDIR)\colour.obj:     $(MSWDIR)\colour.$(SRCSUFF)
+
+$(MSWDIR)\combobox.obj:     $(MSWDIR)\combobox.$(SRCSUFF)
+
+$(MSWDIR)\control.obj:     $(MSWDIR)\control.$(SRCSUFF)
+
+$(MSWDIR)\curico.obj:     $(MSWDIR)\curico.$(SRCSUFF)
+
+$(MSWDIR)\cursor.obj:     $(MSWDIR)\cursor.$(SRCSUFF)
+
+$(MSWDIR)\data.obj:     $(MSWDIR)\data.$(SRCSUFF)
+
+$(MSWDIR)\dde.obj:     $(MSWDIR)\dde.$(SRCSUFF)
+
+$(MSWDIR)\dc.obj:     $(MSWDIR)\dc.$(SRCSUFF)
+
+$(MSWDIR)\dcmemory.obj:     $(MSWDIR)\dcmemory.$(SRCSUFF)
+
+$(MSWDIR)\dcclient.obj:     $(MSWDIR)\dcclient.$(SRCSUFF)
+
+$(MSWDIR)\dcprint.obj:     $(MSWDIR)\dcprint.$(SRCSUFF)
+
+$(MSWDIR)\dcscreen.obj:     $(MSWDIR)\dcscreen.$(SRCSUFF)
+
+$(MSWDIR)\dialog.obj:     $(MSWDIR)\dialog.$(SRCSUFF)
+
+$(MSWDIR)\dib.obj:     $(MSWDIR)\dib.$(SRCSUFF)
+
+$(MSWDIR)\dirdlg.obj:     $(MSWDIR)\dirdlg.$(SRCSUFF)
+
+$(MSWDIR)\filedlg.obj:     $(MSWDIR)\filedlg.$(SRCSUFF)
+
+$(MSWDIR)\font.obj:     $(MSWDIR)\font.$(SRCSUFF)
+
+$(MSWDIR)\fontdlg.obj:     $(MSWDIR)\fontdlg.$(SRCSUFF)
+
+$(MSWDIR)\frame.obj:     $(MSWDIR)\frame.$(SRCSUFF)
+
+$(MSWDIR)\gaugemsw.obj:     $(MSWDIR)\gaugemsw.$(SRCSUFF)
+
+$(MSWDIR)\gauge95.obj:     $(MSWDIR)\gauge95.$(SRCSUFF)
+
+$(MSWDIR)\gdiobj.obj:     $(MSWDIR)\gdiobj.$(SRCSUFF)
+
+$(MSWDIR)\icon.obj:     $(MSWDIR)\icon.$(SRCSUFF)
+
+$(MSWDIR)\imaglist.obj:     $(MSWDIR)\imaglist.$(SRCSUFF)
+
+$(MSWDIR)\joystick.obj:     $(MSWDIR)\joystick.$(SRCSUFF)
+
+$(MSWDIR)\listbox.obj:     $(MSWDIR)\listbox.$(SRCSUFF)
+
+$(MSWDIR)\listctrl.obj:     $(MSWDIR)\listctrl.$(SRCSUFF)
+
+$(MSWDIR)\main.obj:     $(MSWDIR)\main.$(SRCSUFF)
+
+$(MSWDIR)\mdi.obj:     $(MSWDIR)\mdi.$(SRCSUFF)
+
+$(MSWDIR)\menu.obj:     $(MSWDIR)\menu.$(SRCSUFF)
+
+$(MSWDIR)\menuitem.obj:     $(MSWDIR)\menu.$(SRCSUFF)
+
+$(MSWDIR)\metafile.obj:     $(MSWDIR)\metafile.$(SRCSUFF)
+
+$(MSWDIR)\minifram.obj:     $(MSWDIR)\minifram.$(SRCSUFF)
+
+$(MSWDIR)\msgdlg.obj:     $(MSWDIR)\msgdlg.$(SRCSUFF)
+
+$(MSWDIR)\nativdlg.obj:     $(MSWDIR)\nativdlg.$(SRCSUFF)
+
+# $(MSWDIR)\notebook.obj:     $(MSWDIR)\notebook.$(SRCSUFF)
+
+$(MSWDIR)\ownerdrw.obj:     $(MSWDIR)\ownerdrw.$(SRCSUFF)
+
+$(MSWDIR)\palette.obj:     $(MSWDIR)\palette.$(SRCSUFF)
+
+$(MSWDIR)\pen.obj:     $(MSWDIR)\pen.$(SRCSUFF)
+
+$(MSWDIR)\penwin.obj:     $(MSWDIR)\penwin.$(SRCSUFF)
+
+$(MSWDIR)\printdlg.obj:     $(MSWDIR)\printdlg.$(SRCSUFF)
+
+$(MSWDIR)\printwin.obj:     $(MSWDIR)\printwin.$(SRCSUFF)
+
+$(MSWDIR)\radiobox.obj:     $(MSWDIR)\radiobox.$(SRCSUFF)
+
+$(MSWDIR)\radiobut.obj:     $(MSWDIR)\radiobut.$(SRCSUFF)
+
+$(MSWDIR)\region.obj:     $(MSWDIR)\region.$(SRCSUFF)
+
+$(MSWDIR)\registry.obj:     $(MSWDIR)\registry.$(SRCSUFF)
+
+$(MSWDIR)\regconf.obj:     $(MSWDIR)\regconf.$(SRCSUFF)
+
+$(MSWDIR)\scrolbar.obj:     $(MSWDIR)\scrolbar.$(SRCSUFF)
+
+$(MSWDIR)\settings.obj:     $(MSWDIR)\settings.$(SRCSUFF)
+
+$(MSWDIR)\slidrmsw.obj:     $(MSWDIR)\slidrmsw.$(SRCSUFF)
+
+$(MSWDIR)\slider95.obj:     $(MSWDIR)\slider95.$(SRCSUFF)
+
+$(MSWDIR)\spinbutt.obj:     $(MSWDIR)\spinbutt.$(SRCSUFF)
+
+$(MSWDIR)\statbmp.obj:     $(MSWDIR)\statbmp.$(SRCSUFF)
+
+$(MSWDIR)\statbox.obj:     $(MSWDIR)\statbox.$(SRCSUFF)
+
+$(MSWDIR)\statbr95.obj:     $(MSWDIR)\statbr95.$(SRCSUFF)
+
+$(MSWDIR)\stattext.obj:     $(MSWDIR)\stattext.$(SRCSUFF)
+
+$(MSWDIR)\tabctrl.obj:     $(MSWDIR)\tabctrl.$(SRCSUFF)
+
+$(MSWDIR)\taskbar.obj:     $(MSWDIR)\taskbar.$(SRCSUFF)
+
+$(MSWDIR)\tbar95.obj:     $(MSWDIR)\tbar95.$(SRCSUFF)
+
+$(MSWDIR)\tbarmsw.obj:     $(MSWDIR)\tbarmsw.$(SRCSUFF)
+
+$(MSWDIR)\textctrl.obj:     $(MSWDIR)\textctrl.$(SRCSUFF)
+
+$(MSWDIR)\thread.obj:     $(MSWDIR)\thread.$(SRCSUFF)
+
+$(MSWDIR)\timer.obj:     $(MSWDIR)\timer.$(SRCSUFF)
+
+$(MSWDIR)\treectrl.obj:     $(MSWDIR)\treectrl.$(SRCSUFF)
+
+$(MSWDIR)\utils.obj:     $(MSWDIR)\utils.$(SRCSUFF)
+
+$(MSWDIR)\utilsexc.obj:	$(MSWDIR)\utilsexc.$(SRCSUFF)
 
-clean_proio:
-    cd $(WXDIR)\utils\prologio\src
-    make -f makefile.bcc clean
+$(MSWDIR)\wave.obj:     $(MSWDIR)\wave.$(SRCSUFF)
+
+$(MSWDIR)\window.obj:     $(MSWDIR)\window.$(SRCSUFF)
+
+$(MSWDIR)\droptgt.obj:     $(OLEDIR)\droptgt.$(SRCSUFF)
+
+$(MSWDIR)\dropsrc.obj:     $(OLEDIR)\dropsrc.$(SRCSUFF)
+
+$(MSWDIR)\dataobj.obj:     $(OLEDIR)\dataobj.$(SRCSUFF)
+
+$(MSWDIR)\oleutils.obj:     $(OLEDIR)\oleutils.$(SRCSUFF)
+
+$(MSWDIR)\uuid.obj:     $(OLEDIR)\uuid.$(SRCSUFF)
+
+$(MSWDIR)\automtn.obj:     $(OLEDIR)\automtn.$(SRCSUFF)
+
+########################################################
+# Common objects (always compiled)
+
+$(MSWDIR)\config.obj:     $(COMMDIR)\config.$(SRCSUFF)
+
+$(MSWDIR)\cmndata.obj:     $(COMMDIR)\cmndata.$(SRCSUFF)
+
+$(MSWDIR)\docview.obj:     $(COMMDIR)\docview.$(SRCSUFF)
+
+$(MSWDIR)\docmdi.obj:     $(COMMDIR)\docmdi.$(SRCSUFF)
+
+$(MSWDIR)\dynarray.obj:     $(COMMDIR)\dynarray.$(SRCSUFF)
+
+$(MSWDIR)\dynlib.obj:   $(COMMDIR)\dynlib.$(SRCSUFF)
+
+$(MSWDIR)\event.obj:     $(COMMDIR)\event.$(SRCSUFF)
+
+$(MSWDIR)\file.obj:     $(COMMDIR)\file.$(SRCSUFF)
+
+$(MSWDIR)\fileconf.obj:     $(COMMDIR)\fileconf.$(SRCSUFF)
+
+$(MSWDIR)\filefn.obj:     $(COMMDIR)\filefn.$(SRCSUFF)
+
+$(MSWDIR)\framecmn.obj:     $(COMMDIR)\framecmn.$(SRCSUFF)
+
+$(MSWDIR)\gdicmn.obj:     $(COMMDIR)\gdicmn.$(SRCSUFF)
+
+$(MSWDIR)\image.obj:     $(COMMDIR)\image.$(SRCSUFF)
+
+$(MSWDIR)\intl.obj:     $(COMMDIR)\intl.$(SRCSUFF)
+
+$(MSWDIR)\ipcbase.obj:     $(COMMDIR)\ipcbase.$(SRCSUFF)
+
+$(MSWDIR)\helpbase.obj:     $(COMMDIR)\helpbase.$(SRCSUFF)
+
+$(MSWDIR)\layout.obj:     $(COMMDIR)\layout.$(SRCSUFF)
+
+$(MSWDIR)\log.obj:     $(COMMDIR)\log.$(SRCSUFF)
+
+$(MSWDIR)\memory.obj:     $(COMMDIR)\memory.$(SRCSUFF)
+
+$(MSWDIR)\module.obj:     $(COMMDIR)\module.$(SRCSUFF)
+
+$(MSWDIR)\object.obj:     $(COMMDIR)\object.$(SRCSUFF)
+
+$(MSWDIR)\odbc.obj:     $(COMMDIR)\odbc.$(SRCSUFF)
+
+$(MSWDIR)\postscrp.obj:     $(COMMDIR)\postscrp.$(SRCSUFF)
+
+$(MSWDIR)\prntbase.obj:     $(COMMDIR)\prntbase.$(SRCSUFF)
+
+$(MSWDIR)\resource.obj:     $(COMMDIR)\resource.$(SRCSUFF)
+
+$(MSWDIR)\tbarbase.obj:     $(COMMDIR)\tbarbase.$(SRCSUFF)
+
+$(MSWDIR)\tbarsmpl.obj:     $(COMMDIR)\tbarsmpl.$(SRCSUFF)
+
+$(MSWDIR)\textfile.obj:     $(COMMDIR)\textfile.$(SRCSUFF)
+
+$(MSWDIR)\timercmn.obj:     $(COMMDIR)\timercmn.$(SRCSUFF)
+
+$(MSWDIR)\utilscmn.obj:     $(COMMDIR)\utilscmn.$(SRCSUFF)
+
+$(MSWDIR)\validate.obj:     $(COMMDIR)\validate.$(SRCSUFF)
+
+$(MSWDIR)\valtext.obj:     $(COMMDIR)\valtext.$(SRCSUFF)
+
+$(MSWDIR)\date.obj:     $(COMMDIR)\date.$(SRCSUFF)
+
+$(MSWDIR)\wxexpr.obj:     $(COMMDIR)\wxexpr.$(SRCSUFF)
+
+$(MSWDIR)\hash.obj:     $(COMMDIR)\hash.$(SRCSUFF)
+
+$(MSWDIR)\list.obj:     $(COMMDIR)\list.$(SRCSUFF)
+
+$(MSWDIR)\string.obj:     $(COMMDIR)\string.$(SRCSUFF)
+
+$(MSWDIR)\variant.obj:     $(COMMDIR)\variant.$(SRCSUFF)
+
+$(MSWDIR)\matrix.obj:     $(COMMDIR)\matrix.$(SRCSUFF)
+
+$(MSWDIR)\time.obj:     $(COMMDIR)\time.$(SRCSUFF)
+
+$(MSWDIR)\datstrm.obj:	$(COMMDIR)\datstrm.$(SRCSUFF)
+
+$(MSWDIR)\sckstrm.obj:  $(COMMDIR)\sckstrm.$(SRCSUFF)
+
+$(MSWDIR)\mstream.obj:	$(COMMDIR)\mstream.$(SRCSUFF)
+
+$(MSWDIR)\zstream.obj:	$(COMMDIR)\zstream.$(SRCSUFF)
+
+$(MSWDIR)\wfstream.obj:	$(COMMDIR)\wfstream.$(SRCSUFF)
+
+$(MSWDIR)\stream.obj:	$(COMMDIR)\stream.$(SRCSUFF)
+
+$(MSWDIR)\objstrm.obj:  $(COMMDIR)\objstrm.$(SRCSUFF)
+
+$(MSWDIR)\wincmn.obj:	$(COMMDIR)\wincmn.$(SRCSUFF)
+
+$(MSWDIR)\extended.obj:	$(COMMDIR)\extended.c
+
+$(MSWDIR)\tokenzr.obj:	$(COMMDIR)\tokenzr.$(SRCSUFF)
+
+$(MSWDIR)\socket.obj:	$(COMMDIR)\socket.$(SRCSUFF)
+
+$(MSWDIR)\sckaddr.obj:	$(COMMDIR)\sckaddr.$(SRCSUFF)
+
+$(MSWDIR)\protocol.obj: $(COMMDIR)\protocol.$(SRCSUFF)
+
+$(MSWDIR)\url.obj:	$(COMMDIR)\url.$(SRCSUFF)
+
+$(MSWDIR)\http.obj:	$(COMMDIR)\http.$(SRCSUFF)
+
+$(MSWDIR)\ftp.obj:	$(COMMDIR)\ftp.$(SRCSUFF)
+
+$(MSWDIR)\sckfile.obj:	$(COMMDIR)\sckfile.$(SRCSUFF)
+
+$(MSWDIR)\sckipc.obj:	$(COMMDIR)\sckipc.$(SRCSUFF)
+
+########################################################
+# Generic objects (not always compiled, depending on
+# whether platforms have native implementations)
+
+$(MSWDIR)\choicdgg.obj:     $(GENDIR)\choicdgg.$(SRCSUFF)
+
+$(MSWDIR)\colrdlgg.obj:     $(GENDIR)\colrdlgg.$(SRCSUFF)
+
+$(MSWDIR)\fontdlgg.obj:     $(GENDIR)\fontdlgg.$(SRCSUFF)
+
+$(MSWDIR)\gridg.obj:     $(GENDIR)\gridg.$(SRCSUFF)
+
+$(MSWDIR)\helpxlp.obj:     $(GENDIR)\helpxlp.$(SRCSUFF)
+
+$(MSWDIR)\laywin.obj:     $(GENDIR)\laywin.$(SRCSUFF)
+
+$(MSWDIR)\msgdlgg.obj:     $(GENDIR)\msgdlgg.$(SRCSUFF)
+
+$(MSWDIR)\panelg.obj:     $(GENDIR)\panelg.$(SRCSUFF)
+
+$(MSWDIR)\printps.obj:     $(GENDIR)\printps.$(SRCSUFF)
+
+$(MSWDIR)\prntdlgg.obj:     $(GENDIR)\prntdlgg.$(SRCSUFF)
+
+$(MSWDIR)\sashwin.obj:     $(GENDIR)\sashwin.$(SRCSUFF)
+
+$(MSWDIR)\scrolwin.obj:     $(GENDIR)\scrolwin.$(SRCSUFF)
+
+$(MSWDIR)\splitter.obj:     $(GENDIR)\splitter.$(SRCSUFF)
+
+$(MSWDIR)\statusbr.obj:     $(GENDIR)\statusbr.$(SRCSUFF)
+
+$(MSWDIR)\textdlgg.obj:     $(GENDIR)\textdlgg.$(SRCSUFF)
+
+$(MSWDIR)\tabg.obj:     $(GENDIR)\tabg.$(SRCSUFF)
+
+$(MSWDIR)\treectrl.obj:     $(GENDIR)\treectrl.$(SRCSUFF)
+
+$(MSWDIR)\listctrl.obj:     $(GENDIR)\listctrl.$(SRCSUFF)
+
+$(MSWDIR)\imaglist.obj:     $(GENDIR)\imaglist.$(SRCSUFF)
+
+$(MSWDIR)\notebook.obj:     $(GENDIR)\notebook.$(SRCSUFF)
+
+all_utils:
+    cd $(WXDIR)\utils
+    make -f makefile.b32
     cd $(WXDIR)\src\msw
 
-rcparser:
-    cd $(WXDIR)\utils\rcparser\src
-    make -f makefile.bcc DEBUG=$(DEBUG) 
+all_samples:
+    cd $(WXDIR)\samples
+    make -f makefile.b32
     cd $(WXDIR)\src\msw
 
-wxstring:
-    cd $(WXDIR)\contrib\wxstring
-    make -f makefile.bcc OPTIONS="$(OPTIONS)" DEBUG="$(DEBUG)"
+all_execs:
+    cd $(WXDIR)\utils
+    make -f makefile.b32 all_execs
     cd $(WXDIR)\src\msw
 
-clean_wxstring:
-    cd $(WXDIR)\contrib\wxstring
-    make -f makefile.bcc clean
+all_libs:
     cd $(WXDIR)\src\msw
+    make -f makefile.b32 ctl3d dib fafa gauge hytext itsy prologio rcparser wx wxgraph\
+          wxstring wxtree mfutils # wxxpm
 
-clean_rcp:
-    cd $(WXDIR)\utils\rcparser\src
-    make -f makefile.bcc clean
+all_contribs:
     cd $(WXDIR)\src\msw
+    make -f makefile.b32 ctl3d fafa wxstring itsy gauge # wxxpm
+
+# CONTRIB
+ctl3d:  $(CFG)
+        cd $(WXDIR)\src\msw\ctl3d\borland
+        make -f makefile.b32 -DCFG=$(CFG)
+        cd $(WXDIR)\src\msw
+
+wxxpm:	$(CFG)
+	cd $(WXDIR)\src\xpm
+	make -f makefile.b32 -DCFG=$(CFG) -DFINAL=$(FINAL) -DWXWIN=$(WXDIR) -DDEBUG=$(DEBUG)
+	cd $(WXDIR)\src\msw
+
+png:    $(CFG)
+        cd $(WXDIR)\src\png
+        make -f makefile.b32 
+        cd $(WXDIR)\src\msw
+
+clean_png:
+        cd $(WXDIR)\src\png
+        make -f makefile.b32 clean
+        cd $(WXDIR)\src\msw
+
+zlib:   $(CFG)
+        cd $(WXDIR)\src\zlib
+        make -f makefile.b32 lib
+        cd $(WXDIR)\src\msw
+
+clean_zlib:
+        cd $(WXDIR)\src\zlib
+        make -f makefile.b32 clean
+        cd $(WXDIR)\src\msw
+
+$(CFG): makefile.bcc
+	copy &&!
+-H=$(WXDIR)\src\msw\borland.pch
+-2
+-P
+-d
+-w-hid
+-w-par
+-w-pia
+-w-aus
+-w-rch
+-ml
+-Od
+-WE
+-Fs-
+-Vf
+-Ff=4
+-I$(WXINC);$(BCCDIR)\include;$(WXDIR)/src/png;$(WXDIR)/src/zlib
+-I$(WXDIR)\include\wx\msw\gnuwin32
+-L$(BCCDIR)\lib
+-D__WXWIN__
+-D__WXMSW__
+-D__WINDOWS__
+-D__WIN16__
+! $(CFG)
+!if "$(BOR_VER)" == "3.1"
+	echo -Ff=4 >>$(CFG)
+!elif "$(BOR_VER)" == "4"
+	echo -Ff=512 >>$(CFG)
+	echo -dc >>$(CFG)
+!else
+	echo -Ff=512 >>$(CFG)
+	echo -dc >>$(CFG)
+!endif
+
+# -O was: -Oxt
 
 clean: $(PERIPH_CLEAN_TARGET)
     erase $(LIBTARGET)
-    cd $(WXDIR)\src\base
-    erase *.obj
-    cd $(WXDIR)\src\msw
     erase *.obj
+    erase *.pch
+    erase *.csm
+    erase *.cfg
+	erase ..\common\y_tab.c
+    erase ..\common\lex_yy.c
 
 cleanall: clean
+
+
diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95
index 4b79738e86..5c61e0ad84 100644
--- a/src/msw/makefile.g95
+++ b/src/msw/makefile.g95
@@ -29,8 +29,6 @@ include $(WXDIR)/src/makeg95.env
 #               USE_GAUGE should be 1
 #   xpm:      XPM pixmap support
 #               USE_XPM_IN_X should be 1
-#   image:    GIF, BMP image reading
-#               USE_IMAGE_LOADING_IN_X should be 1
 #   wxstring: string class
 #               USE_GNU_WXSTRING should be 1
 #
diff --git a/src/msw/makefile.nt b/src/msw/makefile.nt
index 63acc309b4..54908e24d3 100644
--- a/src/msw/makefile.nt
+++ b/src/msw/makefile.nt
@@ -1376,7 +1376,8 @@ clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib
 cleanall: clean
 
 # Making documents
-docs:   hlp
+docs:   allhlp allhtml allpdfrtf
+alldocs: docs
 hlp:    wxhlp portinghlp # faqhlp
 wxhlp:  $(DOCDIR)/winhelp/wx.hlp
 faqhlp: $(DOCDIR)/winhelp/faq.hlp
@@ -1400,8 +1401,6 @@ portinghlp: $(DOCDIR)/winhelp/porting.hlp
 portingpdfrtf: $(DOCDIR)/pdf/porting.rtf
 portingps:	$(WXDIR)\docs\ps\porting.ps
 
-alldocs: allhlp allhtml allpdfrtf # allps # TeX can't cope with references!
-
 allhlp: wxhlp portinghlp # faqhlp
         cd $(WXDIR)\utils\wxprop\src
         nmake -f makefile.nt hlp
@@ -1678,3 +1677,10 @@ $(WXDIR)\docs\ps\faq.ps:	$(WXDIR)\docs\latex\faq\faq.dvi
 # In order to force document reprocessing
 touchmanual:
     -touch $(WXDIR)\docs\latex\wx\manual.tex
+
+updatedocs: touchmanual alldocs
+
+# Start Word, running the GeneratePDF macro. MakeManual.dot should be in the
+# Office StartUp folder, and PDFMaker should be installed.
+updatepdf:  # touchmanual pdfrtf
+    start /w "winword d:\wx2\wxWindows\docs\latex\pdf\wx.rtf /mGeneratePDF"
diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat
index 663f291445..9f95b89490 100644
--- a/src/msw/makefile.wat
+++ b/src/msw/makefile.wat
@@ -14,7 +14,7 @@ WXLIB = $(WXDIR)\lib
 
 LIBTARGET   = $(WXLIB)\wx.lib
 DUMMY=dummydll
-ODBCLIB     = ..\..\contrib\odbc\odbc32.lib
+# ODBCLIB     = ..\..\contrib\odbc\odbc32.lib
 
 EXTRATARGETS = # wxxpm
 EXTRATARGETSCLEAN = # clean_wxxpm
@@ -68,7 +68,6 @@ COMMONOBJS = cmndata.obj &
   log.obj &
   memory.obj &
   module.obj &
-  odbc.obj &
   object.obj &
   prntbase.obj &
   resource.obj &
@@ -106,7 +105,8 @@ COMMONOBJS = cmndata.obj &
   variant.obj &
   wincmn.obj
 
-# Can't compile this yet under Watcom C++
+# Can't compile these yet under Watcom C++
+#  odbc.obj &
 #  db.obj &
 #  dbtable.obj &
 
@@ -227,8 +227,9 @@ $(LIBTARGET) : $(OBJECTS)
 	
 clean:   .SYMBOLIC
     -erase *.obj
-    -erase $(LIBLARGET)
+    -erase $(LIBTARGET)
     -erase *.pch
+    -erase *.err
 
 cleanall:   clean
 
diff --git a/src/msw/pnghand.cpp b/src/msw/pnghand.cpp
index bea92c6138..cd5a4d5307 100644
--- a/src/msw/pnghand.cpp
+++ b/src/msw/pnghand.cpp
@@ -122,7 +122,11 @@ wxPNGReader::Create(int width, int height, int depth, int colortype)
   ColorType = (colortype>=0) ? colortype: ((Depth>8) ? COLORTYPE_COLOR: 0);
 
   if (lpbi)  {
+#ifdef __WIN16__
+	 GlobalFreePtr((unsigned int) lpbi);
+#else
 	 GlobalFreePtr(lpbi);
+#endif
 //	 delete Palette;
   }
   RawImage = 0;
@@ -137,7 +141,11 @@ wxPNGReader::Create(int width, int height, int depth, int colortype)
 wxPNGReader::~wxPNGReader ( )
 {
   if (lpbi)  {
+#ifdef __WIN16__
+	 GlobalFreePtr((unsigned int) lpbi);
+#else
 	 GlobalFreePtr(lpbi);
+#endif
 	 delete Palette;
   }
 }
diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp
index 02f7e0ad92..929193aa7d 100644
--- a/src/msw/treectrl.cpp
+++ b/src/msw/treectrl.cpp
@@ -813,7 +813,7 @@ void wxTreeCtrl::SortChildren(const wxTreeItemId& item)
     }
     else
     {
-        TVSORTCB tvSort;
+        TV_SORTCB tvSort;
         tvSort.hParent = (HTREEITEM)(WXHTREEITEM)item;
         tvSort.lpfnCompare = (PFNTVCOMPARE)TreeView_CompareCallback;
         tvSort.lParam = (LPARAM)this;
diff --git a/utils/dialoged/docs/dialoged.hpj b/utils/dialoged/docs/dialoged.hpj
index a212f12137..2d3f20ac08 100644
--- a/utils/dialoged/docs/dialoged.hpj
+++ b/utils/dialoged/docs/dialoged.hpj
@@ -1,5 +1,5 @@
 [OPTIONS]
-BMROOT=d:\wx2\utils\dialoged\docs ; Assume that bitmaps are where the source is
+BMROOT=. ; Assume that bitmaps are where the source is
 TITLE=Dialog Editor Manual
 CONTENTS=Contents
 COMPRESS=HIGH
diff --git a/utils/dialoged/docs/tex2rtf.ini b/utils/dialoged/docs/tex2rtf.ini
index 254296494c..89ea473d0c 100644
--- a/utils/dialoged/docs/tex2rtf.ini
+++ b/utils/dialoged/docs/tex2rtf.ini
@@ -1,3 +1,4 @@
+;    Last change:  JS   24 Dec 98    7:55 pm
 runTwice = yes
 titleFontSize = 12
 authorFontSize = 10
@@ -8,7 +9,7 @@ headerRule = yes
 footerRule = yes
 useHeadingStyles = yes
 listItemIndent=40
-generateHPJ = yes
+generateHPJ = no
 htmlBrowseButtons = bitmap
 winHelpVersion = 3
 winHelpContents = yes
diff --git a/utils/wxprop/docs/body.tex b/utils/wxprop/docs/body.tex
index 1a03a2533e..41ff42a71f 100644
--- a/utils/wxprop/docs/body.tex
+++ b/utils/wxprop/docs/body.tex
@@ -97,10 +97,10 @@ $$\image{8cm;0cm}{prop2.eps}$$
 The property class library comprises the following files:
 
 \begin{itemize}\itemsep=0pt
-\item wx\_prop.h: base property class header
-\item wx\_plist.h: wxPropertyListView and associated classes
-\item wx\_pform.h: wxPropertyListView and associated classes
-\item wx\_prop.cc: base property class implementation
-\item wx\_plist.cc: wxPropertyListView and associated class implementions
-\item wx\_pform.cc: wxPropertyFormView and associated class implementions
+\item prop.h: base property class header
+\item proplist.h: wxPropertyListView and associated classes
+\item propform.h: wxPropertyListView and associated classes
+\item prop.cpp: base property class implementation
+\item proplist.cpp: wxPropertyListView and associated class implementions
+\item propform.cpp: wxPropertyFormView and associated class implementions
 \end{itemize}
diff --git a/utils/wxprop/docs/changes.tex b/utils/wxprop/docs/changes.tex
index 83c0a81188..d3513d14fa 100644
--- a/utils/wxprop/docs/changes.tex
+++ b/utils/wxprop/docs/changes.tex
@@ -1,8 +1,13 @@
 \chapter{Change log}\label{changes}
-\pagenumbering{arabic}%
 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
 \setfooter{\thepage}{}{}{}{}{\thepage}%
 
+January - December 1998, Version 2.0
+
+\begin{itemize}\itemsep=0pt
+\item Conversion to wxWindows 2.0.
+\end{itemize}
+
 November 26th 1995, Version 1.1
 
 \begin{itemize}\itemsep=0pt
diff --git a/utils/wxprop/docs/prop.tex b/utils/wxprop/docs/prop.tex
index 89f12f7713..cb1a4a25a9 100644
--- a/utils/wxprop/docs/prop.tex
+++ b/utils/wxprop/docs/prop.tex
@@ -7,7 +7,7 @@
 \title{User Manual for wxWindows Property Sheet Classes Version 2.0}
 \winhelponly{\author{by Julian Smart, Anthemion Software\\$$\image{}{prop1}$$}}
 \winhelpignore{\author{Julian Smart, Anthemion Software}
-\date{October 1997}
+\date{December 1998}
 }
 \makeindex
 \begin{document}
@@ -24,32 +24,24 @@
 \setfooter{\thepage}{}{}{}{}{\thepage}%
 
 \begin{center}
-Copyright (c) 1997 Julian Smart, Anthemion Software
+Copyright (c) 1998 Julian Smart, Anthemion Software
 \end{center}
 
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose is hereby granted without fee, provided that the
-above copyright notice, author statement and this permission notice appear in
-all copies of this software and related documentation.
-
-THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
-IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-IN NO EVENT SHALL JULIAN SMART OR ANTHEMION SOFTWARE BE LIABLE FOR ANY SPECIAL,
-INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED
-OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+Please see the wxWindows licence for conditions of use.
 
 \input{body.tex}
 \input{classes.tex}
 \input{changes.tex}
 
-\newpage
-
+%\newpage
+%
+% Note: In RTF, the \printindex must come before the
+% change of header/footer, since the \printindex inserts
+% the RTF \sect command which divides one chapter from
+% the next.
+\rtfonly{\printindex
 \addcontentsline{toc}{chapter}{Index}
 \setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
 \setfooter{\thepage}{}{}{}{}{\thepage}%
-\printindex
+}
 \end{document}
diff --git a/utils/wxprop/docs/tex2rtf.ini b/utils/wxprop/docs/tex2rtf.ini
index 90c6676d9c..d3cacc5dd6 100644
--- a/utils/wxprop/docs/tex2rtf.ini
+++ b/utils/wxprop/docs/tex2rtf.ini
@@ -9,7 +9,7 @@ footerRule = yes
 useHeadingStyles = yes
 contentsDepth = 2
 listItemIndent=40
-generateHPJ = yes
+generateHPJ = no
 htmlBrowseButtons = bitmap
 winHelpVersion = 3
 winHelpContents = yes
diff --git a/utils/wxprop/docs/wxprop.hpj b/utils/wxprop/docs/wxprop.hpj
index 5492173d51..d03da3049f 100644
--- a/utils/wxprop/docs/wxprop.hpj
+++ b/utils/wxprop/docs/wxprop.hpj
@@ -1,5 +1,5 @@
 [OPTIONS]
-BMROOT=d:\wx2\wxwind~1\utils\wxprop\docs ; Assume that bitmaps are where the source is
+BMROOT=d:\wx2\wxWind~1\utils\wxprop\docs ; Assume that bitmaps are where the source is
 TITLE=Property Classes Manual
 CONTENTS=Contents
 COMPRESS=HIGH
diff --git a/utils/wxtree/src/makefile.b32 b/utils/wxtree/src/makefile.b32
index a830b94d4d..ac0051a3cf 100644
--- a/utils/wxtree/src/makefile.b32
+++ b/utils/wxtree/src/makefile.b32
@@ -16,7 +16,7 @@ WXINC = $(WXDIR)\include
 TARGET=test
 TESTOBJECTS=test.obj
 LIBTARGET= $(WXLIBDIR)\wxprop.lib
-LIBS=$(WXLIB)\wx32.lib $(LIBTARGET) cw32 import32 ole2w32
+LIBS=$(WXLIBDIR)\wx32.lib $(LIBTARGET) cw32 import32 ole2w32
 
 !ifndef DEBUG
 DEBUG=0
-- 
2.45.2

