From 1e6d94998fcbdb3ce60774e38c0d4b6ee20c6798 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 20 Dec 1998 23:49:21 +0000 Subject: [PATCH] wxPaintDC -> wxDC in wxListCtrl; fixed compile problems in wxTreeCtrl (return types in wxCHECK_MSG); compiles again for 16-bit Windows, though dialogs don't work; added generic notebook implementation (copied from wxMotif); fixed event handler arg in wxDirDialog; added preliminary wxImage reference; removed some constructors from documentation; fixed wxIniConfig compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/msw.rsp | 1 + docs/latex/wx/bitmap.tex | 8 +- docs/latex/wx/brush.tex | 4 - docs/latex/wx/category.tex | 1 + docs/latex/wx/classes.tex | 1 + docs/latex/wx/colour.tex | 6 + docs/latex/wx/cursor.tex | 4 - docs/latex/wx/icon.tex | 4 +- docs/latex/wx/image.tex | 547 +++++++++++++++++++++++++++++ docs/latex/wx/palette.tex | 4 - docs/latex/wx/pen.tex | 4 - docs/msw/install.txt | 5 +- docs/msw/issues.txt | 12 +- include/wx/defs.h | 4 +- include/wx/dirdlg.h | 4 + include/wx/generic/dirdlgg.h | 2 +- include/wx/generic/listctrl.h | 57 +-- include/wx/generic/notebook.h | 247 +++++++++++++ include/wx/imaglist.h | 4 + include/wx/listctrl.h | 4 + include/wx/msw/iniconf.h | 4 +- include/wx/msw/private.h | 3 + include/wx/msw/window.h | 27 ++ include/wx/notebook.h | 4 + include/wx/treectrl.h | 4 + samples/checklst/makefile.dos | 58 +-- samples/config/makefile.dos | 17 + samples/controls/makefile.dos | 58 +-- samples/db/makefile.dos | 17 + samples/dialogs/makefile.dos | 74 +--- samples/dnd/makefile.dos | 58 +-- samples/docview/makefile.dos | 67 +--- samples/docvwmdi/makefile.dos | 67 +--- samples/dynamic/makefile.dos | 58 +-- samples/forty/canvas.cpp | 2 +- samples/forty/forty.cpp | 2 +- samples/forty/forty.def | 8 + samples/forty/makefile.dos | 17 + samples/grid/makefile.dos | 59 +--- samples/image/makefile.dos | 17 + samples/internat/makefile.dos | 58 +-- samples/joytest/makefile.dos | 56 +-- samples/layout/makefile.dos | 80 +---- samples/listctrl/makefile.dos | 74 +--- samples/mdi/makefile.dos | 56 +-- samples/memcheck/makefile.dos | 80 +---- samples/minifram/makefile.dos | 80 +---- samples/minimal/makefile.dos | 58 +-- samples/nativdlg/makefile.dos | 81 +---- samples/notebook/makefile.dos | 58 +-- samples/notebook/test.def | 1 - samples/ownerdrw/makefile.dos | 58 +-- samples/tab/makefile.dos | 58 +-- samples/toolbar/makefile.dos | 80 +---- samples/treectrl/makefile.dos | 74 +--- samples/treectrl/treetest.def | 1 - samples/typetest/makefile.dos | 58 +-- samples/validate/makefile.dos | 74 +--- samples/wxpoem/makefile.dos | 17 + src/common/config.cpp | 2 +- src/generic/dirdlgg.cpp | 17 +- src/generic/imaglist.cpp | 7 + src/generic/listctrl.cpp | 29 +- src/generic/notebook.cpp | 642 ++++++++++++++++++++++++++++++++++ src/generic/treectrl.cpp | 43 ++- src/makemsc.env | 2 +- src/makeprog.msc | 58 +++ src/msw/accel.cpp | 6 + src/msw/app.cpp | 1 + src/msw/dc.cpp | 7 + src/msw/frame.cpp | 2 + src/msw/iniconf.cpp | 10 +- src/msw/makefile.dos | 318 ++++------------- src/msw/tbarmsw.cpp | 7 +- src/msw/utils.cpp | 4 +- 75 files changed, 1988 insertions(+), 1813 deletions(-) create mode 100644 docs/latex/wx/image.tex create mode 100644 include/wx/generic/notebook.h create mode 100644 samples/config/makefile.dos create mode 100644 samples/db/makefile.dos create mode 100644 samples/forty/forty.def create mode 100644 samples/forty/makefile.dos create mode 100644 samples/image/makefile.dos create mode 100644 samples/wxpoem/makefile.dos create mode 100644 src/generic/notebook.cpp create mode 100644 src/makeprog.msc diff --git a/distrib/msw/msw.rsp b/distrib/msw/msw.rsp index cd00058ea5..8227e1cfea 100644 --- a/distrib/msw/msw.rsp +++ b/distrib/msw/msw.rsp @@ -11,6 +11,7 @@ tools/gettext/msgunfmt.exe src/makeb32.env src/makebcc.env src/makemsw.env +src/makeprog.msw src/makewat.env src/makeprog.wat src/makesc.env diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index f18676eb78..f847a82bf0 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -24,9 +24,7 @@ Default constructor. \func{}{wxBitmap}{\param{const wxBitmap\& }{bitmap}} -\func{}{wxBitmap}{\param{const wxBitmap* }{bitmap}} - -Copy constructors. +Copy constructor. \func{}{wxBitmap}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} @@ -61,7 +59,7 @@ Loads a bitmap from a file or resource. screen is used.} \docparam{name}{This can refer to a resource name under MS Windows, or a filename under MS Windows and X. -Its meaning is determined by the {\it flags} parameter.} +Its meaning is determined by the {\it type} parameter.} \docparam{type}{May be one of the following: @@ -259,7 +257,7 @@ or set for the bitmap. \constfunc{wxMask*}{GetMask}{\void} -Gets the associated mask if any) which may have been loaded from a file +Gets the associated mask (if any) which may have been loaded from a file or set for the bitmap. \wxheading{See also} diff --git a/docs/latex/wx/brush.tex b/docs/latex/wx/brush.tex index d707dcf875..5e75dc8cfd 100644 --- a/docs/latex/wx/brush.tex +++ b/docs/latex/wx/brush.tex @@ -63,10 +63,6 @@ Constructs a stippled brush using a bitmap. Copy constructor. This uses reference counting so is a cheap operation. -\func{}{wxBrush}{\param{const wxBrush*}{ brush}} - -Copy constructor. This uses reference counting so is a cheap operation. - \wxheading{Parameters} \docparam{colour}{Colour object.} diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index 0caaa8e29c..f9b7786266 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -143,6 +143,7 @@ These classes are related to drawing on device contexts and windows. \twocolitem{\helpref{wxFont}{wxfont}}{Represents fonts} \twocolitem{\helpref{wxFontList}{wxfontlist}}{The list of previously-created fonts} \twocolitem{\helpref{wxIcon}{wxicon}}{A small, transparent bitmap for assigning to frames and drawing on device contexts} +\twocolitem{\helpref{wxImage}{wximage}}{A platform-independent image class.} \twocolitem{\helpref{wxImageList}{wximagelist}}{A list of images, used with some controls} \twocolitem{\helpref{wxMask}{wxmask}}{Represents a mask to be used with a bitmap for transparent drawing} \twocolitem{\helpref{wxPen}{wxpen}}{Used for drawing lines on a device context} diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex index 3c434bb4de..b6a2d2d4cf 100644 --- a/docs/latex/wx/classes.tex +++ b/docs/latex/wx/classes.tex @@ -90,6 +90,7 @@ $$\image{14cm;0cm}{wxclass.ps}$$ \input helpinst.tex \input idleevt.tex \input icon.tex +\input image.tex \input imaglist.tex \input ilayout.tex \input indlgevt.tex diff --git a/docs/latex/wx/colour.tex b/docs/latex/wx/colour.tex index 3ad00632db..48690ef40e 100644 --- a/docs/latex/wx/colour.tex +++ b/docs/latex/wx/colour.tex @@ -33,6 +33,10 @@ Constructs a colour from red, green and blue values. Constructs a colour object using a colour name listed in {\bf wxTheColourDatabase}. +\func{}{wxColour}{\param{const wxColour\&}{ colour}} + +Copy constructor. + \wxheading{Parameters} \docparam{red}{The red value.} @@ -43,6 +47,8 @@ listed in {\bf wxTheColourDatabase}. \docparam{colourName}{The colour name.} +\docparam{colour}{The colour to copy.} + \wxheading{See also} \helpref{wxColourDatabase}{wxcolourdatabase} diff --git a/docs/latex/wx/cursor.tex b/docs/latex/wx/cursor.tex index ebe20a9803..7d67eb6078 100644 --- a/docs/latex/wx/cursor.tex +++ b/docs/latex/wx/cursor.tex @@ -55,10 +55,6 @@ Constructs a cursor using a cursor identifier. Copy constructor. This uses reference counting so is a cheap operation. -\func{}{wxCursor}{\param{const wxCursor*}{ cursor}} - -Copy constructor. This uses reference counting so is a cheap operation. - \wxheading{Parameters} \docparam{bits}{An array of bits.} diff --git a/docs/latex/wx/icon.tex b/docs/latex/wx/icon.tex index 3e1df35864..87193b04c6 100644 --- a/docs/latex/wx/icon.tex +++ b/docs/latex/wx/icon.tex @@ -57,9 +57,7 @@ Default constructor. \func{}{wxIcon}{\param{const wxIcon\& }{icon}} -\func{}{wxIcon}{\param{const wxIcon* }{icon}} - -Copy constructors. +Copy constructor. \func{}{wxIcon}{\param{void*}{ data}, \param{int}{ type}, \param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex new file mode 100644 index 0000000000..6eac4c09cd --- /dev/null +++ b/docs/latex/wx/image.tex @@ -0,0 +1,547 @@ +\section{\class{wxImage}}\label{wximage} + +This class encapsulates a platform-independent image. An image can be created +from data, or using the constructor taking a wxBitmap object. An image +can be loaded from a file in a variety of formats, and is extensible to new formats +via image format handlers. Functions are available to set and get image bits, so +it can be used for basic image manipulation. + +A wxImage cannot (currently) be drawn directly to a wxDC. Instead, a platform-specific +wxBitmap object must be created from it, and that bitmap drawn on the wxDC. + +\wxheading{Derived from} + +\helpref{wxObject}{wxobject} + +\wxheading{See also} + +\helpref{wxBitmap}{wxbitmap} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxImage::wxImage}\label{wximageconstr} + +\func{}{wxImage}{\void} + +Default constructor. + +\func{}{wxImage}{\param{const wxImage\& }{image}} + +Copy constructor. + +\func{}{wxImage}{\param{const wxBitmap\&}{ bitmap}} + +Constructs an image from a platform-dependent bitmap. + +\func{}{wxImage}{\param{int}{ width}, \param{int}{ height}} + +Creates an image with the given width and height. + +\func{}{wxImage}{\param{const wxString\& }{name}, \param{long}{ type = wxBITMAP\_TYPE\_PNG}} + +Loads an image from a file. + +\wxheading{Parameters} + +\docparam{width}{Specifies the width of the image.} + +\docparam{height}{Specifies the height of the image.} + +\docparam{name}{This refers to an image filename. Its meaning is determined by the {\it type} parameter.} + +\docparam{type}{May be one of the following: + +\twocolwidtha{5cm} +\begin{twocollist} +\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_BMP}}}{Load a Windows bitmap file.} +\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_GIF}}}{Load a GIF bitmap file.} +\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XBM}}}{Load an X bitmap file.} +\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_XPM}}}{Load an XPM bitmap file.} +\twocolitem{{\bf \indexit{wxBITMAP\_TYPE\_PNG}}}{Load a PNG bitmap file.} +\end{twocollist} + +The validity of these flags depends on the platform and wxWindows configuration. +If all possible wxWindows settings are used, the Windows platform supports BMP, BMP\_RESOURCE, +XPM\_DATA, and XPM. Under X, the available formats are BMP, GIF, XBM, and XPM.} + +\wxheading{See also} + +\helpref{wxImage::LoadFile}{wximageloadfile} + +\membersection{wxImage::\destruct{wxImage}} + +\func{}{\destruct{wxImage}}{\void} + +Destructor. + +\membersection{wxImage::AddHandler}\label{wximageaddhandler} + +\func{static void}{AddHandler}{\param{wxImageHandler*}{ handler}} + +Adds a handler to the end of the static list of format handlers. + +\docparam{handler}{A new image format handler object. There is usually only one instance +of a given handler class in an application session.} + +\wxheading{See also} + +\helpref{wxImageHandler}{wximagehandler} + +\membersection{wxImage::CleanUpHandlers} + +\func{static void}{CleanUpHandlers}{\void} + +Deletes all image handlers. + +This function is called by wxWindows on exit. + +\membersection{wxImage::ConvertToBitmap}\label{wximageconverttobitmap} + +\constfunc{wxBitmap}{ConvertToBitmap}{\void} + +Converts the image to a platform-specific bitmap object. + +\membersection{wxImage::Create}\label{wximagecreate} + +\func{bool}{Create}{\param{int}{ width}, \param{int}{ height}} + +Creates a fresh image. + +\wxheading{Parameters} + +\docparam{width}{The width of the image in pixels.} + +\docparam{height}{The height of the image in pixels.} + +\wxheading{Return value} + +TRUE if the call succeeded, FALSE otherwise. + +\membersection{wxImage::Destroy}\label{wximagedestroy} + +\func{bool}{Destroy}{\void} + +Destroys the image data. + +\membersection{wxImage::FindHandler} + +\func{static wxImageHandler*}{FindHandler}{\param{const wxString\& }{name}} + +Finds the handler with the given name. + +\func{static wxImageHandler*}{FindHandler}{\param{const wxString\& }{extension}, \param{long}{ imageType}} + +Finds the handler associated with the given extension and type. + +\func{static wxImageHandler*}{FindHandler}{\param{long }{imageType}} + +Finds the handler associated with the given image type. + +\docparam{name}{The handler name.} + +\docparam{extension}{The file extension, such as ``bmp".} + +\docparam{imageType}{The image type, such as wxBITMAP\_TYPE\_BMP.} + +\wxheading{Return value} + +A pointer to the handler if found, NULL otherwise. + +\wxheading{See also} + +\helpref{wxImageHandler}{wximagehandler} + +\membersection{wxImage::GetBlue}\label{wximagegetblue} + +\constfunc{unsigned char}{GetBlue}{\param{int}{ x}, \param{int}{ y}} + +Returns the blue intensity at the given coordinate. + +\membersection{wxImage::GetData}\label{wximagegetdata} + +\constfunc{unsigned char*}{GetData}{\void} + +Returns the image data as an array. + +\membersection{wxImage::GetGreen}\label{wximagegetgreen} + +\constfunc{unsigned char}{GetGreen}{\param{int}{ x}, \param{int}{ y}} + +Returns the green intensity at the given coordinate. + +\membersection{wxImage::GetRed}\label{wximagegetred} + +\constfunc{unsigned char}{GetRed}{\param{int}{ x}, \param{int}{ y}} + +Returns the red intensity at the given coordinate. + +\membersection{wxImage::GetHandlers} + +\func{static wxList\&}{GetHandlers}{\void} + +Returns the static list of image format handlers. + +\wxheading{See also} + +\helpref{wxImageHandler}{wximagehandler} + +\membersection{wxImage::GetHeight}\label{wximagegetheight} + +\constfunc{int}{GetHeight}{\void} + +Gets the height of the image in pixels. + +\membersection{wxImage::GetMaskBlue}\label{wximagegetmaskblue} + +\constfunc{unsigned char}{GetMaskBlue}{\void} + +Gets the blue value of the mask colour. + +\membersection{wxImage::GetMaskGreen}\label{wximagegetmaskgreen} + +\constfunc{unsigned char}{GetMaskGreen}{\void} + +Gets the green value of the mask colour. + +\membersection{wxImage::GetMaskRed}\label{wximagegetmaskred} + +\constfunc{unsigned char}{GetMaskRed}{\void} + +Gets the red value of the mask colour. + +\membersection{wxImage::GetWidth}\label{wximagegetwidth} + +\constfunc{int}{GetWidth}{\void} + +Gets the width of the image in pixels. + +\wxheading{See also} + +\helpref{wxImage::GetHeight}{wximagegetheight} + +\membersection{wxImage::HasMask}\label{wximagehasmask} + +\constfunc{bool}{HasMask}{\void} + +Returns TRUE if there is a mask active, FALSE otherwise. + +\membersection{wxImage::InitStandardHandlers} + +\func{static void}{InitStandardHandlers}{\void} + +Adds the standard image format handlers, which, depending on wxWindows +configuration, can be handlers for Windows image, Windows image resource, and XPM. + +This function is called by wxWindows on startup. + +\wxheading{See also} + +\helpref{wxImageHandler}{wximagehandler} + +\membersection{wxImage::InsertHandler} + +\func{static void}{InsertHandler}{\param{wxImageHandler*}{ handler}} + +Adds a handler at the start of the static list of format handlers. + +\docparam{handler}{A new image format handler object. There is usually only one instance +of a given handler class in an application session.} + +\wxheading{See also} + +\helpref{wxImageHandler}{wximagehandler} + +\membersection{wxImage::LoadFile}\label{wximageloadfile} + +\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type}} + +Loads an image from a file. + +\wxheading{Parameters} + +\docparam{name}{A filename. +The meaning of {\it name} is determined by the {\it type} parameter.} + +\docparam{type}{One of the following values: + +\twocolwidtha{5cm} +\begin{twocollist} +\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Load a Windows image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Load a GIF image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Load an X image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Load an XPM image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Load a PNG image file.} +\end{twocollist} + +The validity of these flags depends on the platform and wxWindows configuration.} + +\wxheading{Return value} + +TRUE if the operation succeeded, FALSE otherwise. + +\wxheading{See also} + +\helpref{wxImage::SaveFile}{wximagesavefile} + +\membersection{wxImage::Ok}\label{wximageok} + +\constfunc{bool}{Ok}{\void} + +Returns TRUE if image data is present. + +\membersection{wxImage::RemoveHandler} + +\func{static bool}{RemoveHandler}{\param{const wxString\& }{name}} + +Finds the handler with the given name, and removes it. The handler +is not deleted. + +\docparam{name}{The handler name.} + +\wxheading{Return value} + +TRUE if the handler was found and removed, FALSE otherwise. + +\wxheading{See also} + +\helpref{wxImageHandler}{wximagehandler} + +\membersection{wxImage::SaveFile}\label{wximagesavefile} + +\func{bool}{SaveFile}{\param{const wxString\& }{name}, \param{int}{ type}} + +Saves a image in the named file. + +\wxheading{Parameters} + +\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.} + +\docparam{type}{One of the following values: + +\twocolwidtha{5cm} +\begin{twocollist} +\twocolitem{{\bf wxBITMAP\_TYPE\_BMP}}{Save a Windows image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_GIF}}{Save a GIF image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_XBM}}{Save an X image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_XPM}}{Save an XPM image file.} +\twocolitem{{\bf wxBITMAP\_TYPE\_PNG}}{Save a PNG image file.} +\end{twocollist} + +The validity of these flags depends on the platform and wxWindows configuration.} + +\wxheading{Return value} + +TRUE if the operation succeeded, FALSE otherwise. + +\wxheading{Remarks} + +Depending on how wxWindows has been configured, not all formats may be available. + +\wxheading{See also} + +\helpref{wxImage::LoadFile}{wximageloadfile} + +\membersection{wxImage::Scale}\label{wximagescale} + +\func{wxImage}{Scale}{\param{int}{ width}, \param{int}{ height}} + +Returns a scaled version of the image. + +\membersection{wxImage::SetData}\label{wximagesetdata} + +\func{void}{SetData}{\param{unsigned char*}{data}} + +Sets the image data. + +\membersection{wxImage::SetMask}\label{wximagesetmask} + +\func{void}{SetMask}{\param{bool}{ hasMask = TRUE}} + +Specifies whether there is a mask or not. The area of the mask is determined by the current mask colour. + +\membersection{wxImage::SetMaskColour}\label{wximagesetmaskcolour} + +\func{void}{SetMaskColour}{\param{unsigned char }{red}, \param{unsigned char }{blue}, \param{unsigned char }{green}} + +Sets the mask colour for this image. + +\membersection{wxImage::SetRGB}\label{wximagesetrgb} + +\func{void}{SetRGB}{\param{int }{x}, \param{int }{y}, \param{unsigned char }{red}, \param{unsigned char }{blue}, \param{unsigned char }{green}} + +Sets the pixel at the given coordinate. + +\membersection{wxImage::operator $=$} + +\func{wxImage\& }{operator $=$}{\param{const wxImage\& }{image}} + +Assignment operator. This operator does not copy any data, but instead +passes a pointer to the data in {\it image} and increments a reference +counter. It is a fast operation. + +\wxheading{Parameters} + +\docparam{image}{Image to assign.} + +\wxheading{Return value} + +Returns 'this' object. + +\membersection{wxImage::operator $==$} + +\func{bool}{operator $==$}{\param{const wxImage\& }{image}} + +Equality operator. This operator tests whether the internal data pointers are +equal (a fast test). + +\wxheading{Parameters} + +\docparam{image}{Image to compare with 'this'} + +\wxheading{Return value} + +Returns TRUE if the images were effectively equal, FALSE otherwise. + +\membersection{wxImage::operator $!=$} + +\func{bool}{operator $!=$}{\param{const wxImage\& }{image}} + +Inequality operator. This operator tests whether the internal data pointers are +unequal (a fast test). + +\wxheading{Parameters} + +\docparam{image}{Image to compare with 'this'} + +\wxheading{Return value} + +Returns TRUE if the images were unequal, FALSE otherwise. + +\section{\class{wxImageHandler}}\label{wximagehandler} + +\overview{Overview}{wximageoverview} + +This is the base class for implementing image file loading/saving, and image creation from data. +It is used within wxImage and is not normally seen by the application. + +If you wish to extend the capabilities of wxImage, derive a class from wxImageHandler +and add the handler using \helpref{wxImage::AddHandler}{wximageaddhandler} in your +application initialisation. + +\wxheading{Derived from} + +\helpref{wxObject}{wxobject} + +\wxheading{See also} + +\helpref{wxImage}{wximage} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxImageHandler::wxImageHandler}\label{wximagehandlerconstr} + +\func{}{wxImageHandler}{\void} + +Default constructor. In your own default constructor, initialise the members +m\_name, m\_extension and m\_type. + +\membersection{wxImageHandler::\destruct{wxImageHandler}} + +\func{}{\destruct{wxImageHandler}}{\void} + +Destroys the wxImageHandler object. + +\membersection{wxImageHandler::GetName} + +\constfunc{wxString}{GetName}{\void} + +Gets the name of this handler. + +\membersection{wxImageHandler::GetExtension} + +\constfunc{wxString}{GetExtension}{\void} + +Gets the file extension associated with this handler. + +\membersection{wxImageHandler::GetType} + +\constfunc{long}{GetType}{\void} + +Gets the image type associated with this handler. + +\membersection{wxImageHandler::LoadFile}\label{wximagehandlerloadfile} + +\func{bool}{LoadFile}{\param{wxImage* }{image}, \param{const wxString\&}{ name}} + +Loads a image from a file or resource, putting the resulting data into {\it image}. + +\wxheading{Parameters} + +\docparam{image}{The image object which is to be affected by this operation.} + +\docparam{name}{Either a filename or a Windows resource name. +The meaning of {\it name} is determined by the {\it type} parameter.} + +\wxheading{Return value} + +TRUE if the operation succeeded, FALSE otherwise. + +\wxheading{See also} + +\helpref{wxImage::LoadFile}{wximageloadfile}\\ +\helpref{wxImage::SaveFile}{wximagesavefile}\\ +\helpref{wxImageHandler::SaveFile}{wximagehandlersavefile} + +\membersection{wxImageHandler::SaveFile}\label{wximagehandlersavefile} + +\func{bool}{SaveFile}{\param{wxImage* }{image}, \param{const wxString\& }{name}} + +Saves a image in the named file. + +\wxheading{Parameters} + +\docparam{image}{The image object which is to be affected by this operation.} + +\docparam{name}{A filename. The meaning of {\it name} is determined by the {\it type} parameter.} + +\wxheading{Return value} + +TRUE if the operation succeeded, FALSE otherwise. + +\wxheading{See also} + +\helpref{wxImage::LoadFile}{wximageloadfile}\\ +\helpref{wxImage::SaveFile}{wximagesavefile}\\ +\helpref{wxImageHandler::LoadFile}{wximagehandlerloadfile} + +\membersection{wxImageHandler::SetName} + +\func{void}{SetName}{\param{const wxString\& }{name}} + +Sets the handler name. + +\wxheading{Parameters} + +\docparam{name}{Handler name.} + +\membersection{wxImageHandler::SetExtension} + +\func{void}{SetExtension}{\param{const wxString\& }{extension}} + +Sets the handler extension. + +\wxheading{Parameters} + +\docparam{extension}{Handler extension.} + +\membersection{wxImageHandler::SetType} + +\func{void}{SetType}{\param{long }{type}} + +Sets the handler type. + +\wxheading{Parameters} + +\docparam{name}{Handler type.} + + diff --git a/docs/latex/wx/palette.tex b/docs/latex/wx/palette.tex index 14134b38da..ded5bc1d29 100644 --- a/docs/latex/wx/palette.tex +++ b/docs/latex/wx/palette.tex @@ -26,10 +26,6 @@ Default constructor. Copy constructor. This uses reference counting so is a cheap operation. -\func{}{wxPalette}{\param{const wxPalette*}{ palette}} - -Copy constructor. This uses reference counting so is a cheap operation. - \func{}{wxPalette}{\param{int}{ n}, \param{const unsigned char* }{red},\\ \param{const unsigned char* }{green}, \param{const unsigned char* }{blue}} diff --git a/docs/latex/wx/pen.tex b/docs/latex/wx/pen.tex index c0490876e9..2022597217 100644 --- a/docs/latex/wx/pen.tex +++ b/docs/latex/wx/pen.tex @@ -51,10 +51,6 @@ Constructs a stippled pen from a stipple bitmap and a width. Copy constructor. This uses reference counting so is a cheap operation. -\func{}{wxPen}{\param{const wxPen*}{ pen}} - -Copy constructor. This uses reference counting so is a cheap operation. - \wxheading{Parameters} \docparam{colour}{A colour object.} diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 32016ecef0..09562235ec 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -58,8 +58,9 @@ Visual C++ 1.5 compilation make the wxWindows core library. 2. Change directory to wx\samples and type 'nmake -f makefile.dos' 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. + +NOTE: 16-bit compilation is not recommended (see issues.txt): +many things are broken, including dialog boxes. Borland C++ 4.5/5.0 compilation ------------------------------- diff --git a/docs/msw/issues.txt b/docs/msw/issues.txt index 73e607511f..900bfa8600 100644 --- a/docs/msw/issues.txt +++ b/docs/msw/issues.txt @@ -1,12 +1,6 @@ Current issues and bugs ----------------------- -Owner-draw menus ----------------- - -If USE_OWNER_DRAWN = 1 and you create a wxMenu, you get 'all bets -are off' memory checking warnings from wxWindows. - Memory-checking subsystem ------------------------- @@ -14,5 +8,7 @@ This conflicts with wxUSE_IOSTREAMSH = 0 using MS VC++ 5.0 (crashes the template code). It should be switched off if you wish to use wxUSE_IOSTREAMSH = 0. - - +Many things seem to be broken for 16-bit Windows, including +dialogs (crash in wxFindWinFromHandle). The generic tree, list +and notebook controls don't work. The generic wxImageList drawing +function doesn't work (wxDC::SelectObject problem). diff --git a/include/wx/defs.h b/include/wx/defs.h index e50e07a804..a43ff851bb 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -940,8 +940,10 @@ typedef void * WXMEASUREITEMSTRUCT; typedef void * WXLPCREATESTRUCT; #ifdef __GNUWIN32__ typedef int (*WXFARPROC)(); -#else +#elif defined(__WIN32__) typedef int (__stdcall *WXFARPROC)(); +#else +typedef int (*WXFARPROC)(); #endif #endif diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index 6be23181a9..26f944b3f1 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -2,7 +2,11 @@ #define _WX_DIRDLG_H_BASE_ #if defined(__WXMSW__) +#ifdef __WIN16__ +#include "wx/generic/dirdlgg.h" +#else #include "wx/msw/dirdlg.h" +#endif #elif defined(__WXMOTIF__) #include "wx/generic/dirdlgg.h" #elif defined(__WXGTK__) diff --git a/include/wx/generic/dirdlgg.h b/include/wx/generic/dirdlgg.h index c70aedf6eb..10fefdce31 100644 --- a/include/wx/generic/dirdlgg.h +++ b/include/wx/generic/dirdlgg.h @@ -95,7 +95,7 @@ class WXDLLEXPORT wxDirDialog: public wxDialog int ShowModal(); void OnTreeSelected( wxTreeEvent &event ); - void OnTreeKeyDown( wxKeyEvent &event ); + void OnTreeKeyDown( wxTreeEvent &event ); void OnSize(wxSizeEvent& event); void OnOK(wxCommandEvent& event); void OnCancel(wxCommandEvent& event); diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 81c34064df..ff5bc55e13 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -25,26 +25,30 @@ #include "wx/scrolwin.h" #include "wx/settings.h" +#if wxUSE_DRAG_AND_DROP +class WXDLLEXPORT wxDropTarget; +#endif + //----------------------------------------------------------------------------- // classes //----------------------------------------------------------------------------- -class wxListItem; -class wxListEvent; -class wxListCtrl; +class WXDLLEXPORT wxListItem; +class WXDLLEXPORT wxListEvent; +class WXDLLEXPORT wxListCtrl; //----------------------------------------------------------------------------- // internal classes //----------------------------------------------------------------------------- -class wxListHeaderData; -class wxListItemData; -class wxListLineData; +class WXDLLEXPORT wxListHeaderData; +class WXDLLEXPORT wxListItemData; +class WXDLLEXPORT wxListLineData; -class wxListHeaderWindow; -class wxListMainWindow; +class WXDLLEXPORT wxListHeaderWindow; +class WXDLLEXPORT wxListMainWindow; -class wxListRenameTimer; +class WXDLLEXPORT wxListRenameTimer; //class wxListTextCtrl; //----------------------------------------------------------------------------- @@ -164,7 +168,7 @@ enum { // wxListItem //----------------------------------------------------------------------------- -class wxListItem: public wxObject +class WXDLLEXPORT wxListItem: public wxObject { DECLARE_DYNAMIC_CLASS(wxListItem) @@ -230,7 +234,7 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); // wxListItemData (internal) //----------------------------------------------------------------------------- -class wxListItemData : public wxObject +class WXDLLEXPORT wxListItemData : public wxObject { DECLARE_DYNAMIC_CLASS(wxListItemData); @@ -269,7 +273,7 @@ class wxListItemData : public wxObject // wxListHeaderData (internal) //----------------------------------------------------------------------------- -class wxListHeaderData : public wxObject +class WXDLLEXPORT wxListHeaderData : public wxObject { DECLARE_DYNAMIC_CLASS(wxListHeaderData); @@ -304,7 +308,7 @@ class wxListHeaderData : public wxObject // wxListLineData (internal) //----------------------------------------------------------------------------- -class wxListLineData : public wxObject +class WXDLLEXPORT wxListLineData : public wxObject { DECLARE_DYNAMIC_CLASS(wxListLineData); @@ -320,13 +324,13 @@ class wxListLineData : public wxObject int m_spacing; wxListMainWindow *m_owner; - void DoDraw( wxPaintDC *dc, bool hilight, bool paintBG ); + void DoDraw( wxDC *dc, bool hilight, bool paintBG ); public: wxListLineData( void ) {}; wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush ); - void CalculateSize( wxPaintDC *dc, int spacing ); - void SetPosition( wxPaintDC *dc, int x, int y, int window_width ); + void CalculateSize( wxDC *dc, int spacing ); + void SetPosition( wxDC *dc, int x, int y, int window_width ); void SetColumnPosition( int index, int x ); void GetSize( int &width, int &height ); void GetExtent( int &x, int &y, int &width, int &height ); @@ -341,8 +345,8 @@ class wxListLineData : public wxObject void GetRect( wxRectangle &rect ); void Hilight( bool on ); void ReverseHilight( void ); - void DrawRubberBand( wxPaintDC *dc, bool on ); - void Draw( wxPaintDC *dc ); + void DrawRubberBand( wxDC *dc, bool on ); + void Draw( wxDC *dc ); bool IsInRect( int x, int y, const wxRectangle &rect ); bool IsHilighted( void ); void AssignRect( wxRectangle &dest, int x, int y, int width, int height ); @@ -353,7 +357,7 @@ class wxListLineData : public wxObject // wxListHeaderWindow (internal) //----------------------------------------------------------------------------- -class wxListHeaderWindow : public wxWindow +class WXDLLEXPORT wxListHeaderWindow : public wxWindow { DECLARE_DYNAMIC_CLASS(wxListHeaderWindow) @@ -372,7 +376,7 @@ class wxListHeaderWindow : public wxWindow wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0, const wxString &name = "columntitles" ); - void DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h ); + void DoDrawRect( wxDC *dc, int x, int y, int w, int h ); void OnPaint( wxPaintEvent &event ); void DrawCurrent(); void OnMouse( wxMouseEvent &event ); @@ -385,7 +389,7 @@ class wxListHeaderWindow : public wxWindow // wxListRenameTimer (internal) //----------------------------------------------------------------------------- -class wxListRenameTimer: public wxTimer +class WXDLLEXPORT wxListRenameTimer: public wxTimer { private: wxListMainWindow *m_owner; @@ -399,7 +403,7 @@ class wxListRenameTimer: public wxTimer // wxListTextCtrl (internal) //----------------------------------------------------------------------------- -class wxListTextCtrl: public wxTextCtrl +class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl { DECLARE_DYNAMIC_CLASS(wxListTextCtrl); @@ -426,7 +430,7 @@ class wxListTextCtrl: public wxTextCtrl // wxListMainWindow (internal) //----------------------------------------------------------------------------- -class wxListMainWindow: public wxScrolledWindow +class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow { DECLARE_DYNAMIC_CLASS(wxListMainWindow); @@ -480,7 +484,7 @@ class wxListMainWindow: public wxScrolledWindow void OnSetFocus( wxFocusEvent &event ); void OnKillFocus( wxFocusEvent &event ); void OnSize( wxSizeEvent &event ); - void DrawImage( int index, wxPaintDC *dc, int x, int y ); + void DrawImage( int index, wxDC *dc, int x, int y ); void GetImageSize( int index, int &width, int &height ); int GetIndexOfLine( const wxListLineData *line ); int GetTextLength( wxString &s ); // should be const @@ -528,7 +532,7 @@ class wxListMainWindow: public wxScrolledWindow // wxListCtrl //----------------------------------------------------------------------------- -class wxListCtrl: public wxControl +class WXDLLEXPORT wxListCtrl: public wxControl { DECLARE_DYNAMIC_CLASS(wxListCtrl); @@ -611,10 +615,13 @@ class wxListCtrl: public wxControl void SetForegroundColour( const wxColour &colour ); void SetFont( const wxFont &font ); +#if wxUSE_DRAG_AND_DROP void SetDropTarget( wxDropTarget *dropTarget ) { m_mainWin->SetDropTarget( dropTarget ); } wxDropTarget *GetDropTarget() const { return m_mainWin->GetDropTarget(); } +#endif + void SetCursor( const wxCursor &cursor ) { if (m_mainWin) m_mainWin->wxWindow::SetCursor( cursor); } wxColour GetBackgroundColour() const diff --git a/include/wx/generic/notebook.h b/include/wx/generic/notebook.h new file mode 100644 index 0000000000..df4e960314 --- /dev/null +++ b/include/wx/generic/notebook.h @@ -0,0 +1,247 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: notebook.h +// Purpose: wxNotebook class (a.k.a. property sheet, tabbed dialog) +// Author: Julian Smart +// Modified by: +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_NOTEBOOK_H_ +#define _WX_NOTEBOOK_H_ + +#ifdef __GNUG__ +#pragma interface "notebook.h" +#endif + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +#include "wx/dynarray.h" +#include "wx/event.h" +#include "wx/control.h" +#include "wx/generic/tabg.h" + +// ---------------------------------------------------------------------------- +// types +// ---------------------------------------------------------------------------- + +// fwd declarations +class WXDLLEXPORT wxImageList; +class WXDLLEXPORT wxWindow; + +// array of notebook pages +typedef wxWindow wxNotebookPage; // so far, any window can be a page +WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages); + +// ---------------------------------------------------------------------------- +// notebook events +// ---------------------------------------------------------------------------- +class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent +{ +public: + wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0, + int nSel = -1, int nOldSel = -1) + : wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; } + + // accessors + int GetSelection() const { return m_nSel; } + int GetOldSelection() const { return m_nOldSel; } + + void SetSelection(int sel) { m_nSel = sel; } + void SetOldSelection(int oldSel) { m_nOldSel = oldSel; } + +private: + int m_nSel, // currently selected page + m_nOldSel; // previously selected page + + DECLARE_DYNAMIC_CLASS(wxNotebookEvent) +}; + +// ---------------------------------------------------------------------------- +// wxNotebook +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxNotebook; + +// This reuses wxTabView to draw the tabs. +class WXDLLEXPORT wxNotebookTabView: public wxTabView +{ +DECLARE_DYNAMIC_CLASS(wxNotebookTabView) +public: + wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR); + ~wxNotebookTabView(void); + + // Called when a tab is activated + virtual void OnTabActivate(int activateId, int deactivateId); + +protected: + wxNotebook* m_notebook; +}; + +class wxNotebook : public wxControl +{ +public: + // ctors + // ----- + // default for dynamic class + wxNotebook(); + // the same arguments as for wxControl (@@@ any special styles?) + wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = "notebook"); + // Create() function + bool Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = "notebook"); + // dtor + ~wxNotebook(); + + // accessors + // --------- + // get number of pages in the dialog + int GetPageCount() const; + + // Find the position of the wxNotebookPage, -1 if not found. + int FindPagePosition(wxNotebookPage* page) const; + + // set the currently selected page, return the index of the previously + // selected one (or -1 on error) + // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events + int SetSelection(int nPage); + // cycle thru the tabs + void AdvanceSelection(bool bForward = TRUE); + // get the currently selected page + int GetSelection() const { return m_nSelection; } + + // set/get the title of a page + bool SetPageText(int nPage, const wxString& strText); + wxString GetPageText(int nPage) const; + + // image list stuff: each page may have an image associated with it. All + // the images belong to an image list, so you have to + // 1) create an image list + // 2) associate it with the notebook + // 3) set for each page it's image + // associate image list with a control + void SetImageList(wxImageList* imageList); + // get pointer (may be NULL) to the associated image list + wxImageList* GetImageList() const { return m_pImageList; } + + // sets/returns item's image index in the current image list + int GetPageImage(int nPage) const; + bool SetPageImage(int nPage, int nImage); + + // currently it's always 1 because wxGTK doesn't support multi-row + // tab controls + int GetRowCount() const; + + // control the appearance of the notebook pages + // set the size (the same for all pages) + void SetPageSize(const wxSize& size); + // set the padding between tabs (in pixels) + void SetPadding(const wxSize& padding); + + // operations + // ---------- + // remove one page from the notebook, and delete the page. + bool DeletePage(int nPage); + bool DeletePage(wxNotebookPage* page); + // remove one page from the notebook, without deleting the page. + bool RemovePage(int nPage); + bool RemovePage(wxNotebookPage* page); + // remove all pages + bool DeleteAllPages(); + // adds a new page to the notebook (it will be deleted ny the notebook, + // don't delete it yourself). If bSelect, this page becomes active. + bool AddPage(wxNotebookPage *pPage, + const wxString& strText, + bool bSelect = FALSE, + int imageId = -1); + // the same as AddPage(), but adds it at the specified position + bool InsertPage(int nPage, + wxNotebookPage *pPage, + const wxString& strText, + bool bSelect = FALSE, + int imageId = -1); + // get the panel which represents the given page + wxNotebookPage *GetPage(int nPage) { return m_aPages[nPage]; } + + // callbacks + // --------- + void OnSize(wxSizeEvent& event); + void OnIdle(wxIdleEvent& event); + void OnSelChange(wxNotebookEvent& event); + void OnSetFocus(wxFocusEvent& event); + void OnNavigationKey(wxNavigationKeyEvent& event); + + // base class virtuals + // ------------------- + virtual void Command(wxCommandEvent& event); + virtual void SetConstraintSizes(bool recurse = TRUE); + virtual bool DoPhase(int nPhase); + +// Implementation + + // wxNotebook on Motif uses a generic wxTabView to implement itself. + inline wxTabView *GetTabView() const { return m_tabView; } + inline void SetTabView(wxTabView *v) { m_tabView = v; } + + void OnMouseEvent(wxMouseEvent& event); + void OnPaint(wxPaintEvent& event); + + virtual wxRect GetAvailableClientSize(); + + // Implementation: calculate the layout of the view rect + // and resize the children if required + bool RefreshLayout(bool force = TRUE); + +protected: + // common part of all ctors + void Init(); + + // helper functions + void ChangePage(int nOldSel, int nSel); // change pages + + wxImageList *m_pImageList; // we can have an associated image list + wxArrayPages m_aPages; // array of pages + + int m_nSelection; // the current selection (-1 if none) + + wxTabView* m_tabView; + + DECLARE_DYNAMIC_CLASS(wxNotebook) + DECLARE_EVENT_TABLE() +}; + +// ---------------------------------------------------------------------------- +// event macros +// ---------------------------------------------------------------------------- +typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); + +#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ + { \ + wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ + id, \ + -1, \ + (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ + NULL \ + }, + +#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \ + { \ + wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \ + id, \ + -1, \ + (wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \ + NULL \ + }, + +#endif // _WX_NOTEBOOK_H_ diff --git a/include/wx/imaglist.h b/include/wx/imaglist.h index e62b821a80..7aa92ee1bf 100644 --- a/include/wx/imaglist.h +++ b/include/wx/imaglist.h @@ -2,7 +2,11 @@ #define _WX_IMAGLIST_H_BASE_ #if defined(__WXMSW__) +#ifdef __WIN16__ +#include "wx/generic/imaglist.h" +#else #include "wx/msw/imaglist.h" +#endif #elif defined(__WXMOTIF__) #include "wx/generic/imaglist.h" #elif defined(__WXGTK__) diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index d1fd4f9043..1e5c3480c8 100644 --- a/include/wx/listctrl.h +++ b/include/wx/listctrl.h @@ -2,7 +2,11 @@ #define _WX_LISTCTRL_H_BASE_ #if defined(__WXMSW__) +#ifdef __WIN16__ +#include "wx/generic/listctrl.h" +#else #include "wx/msw/listctrl.h" +#endif #elif defined(__WXMOTIF__) #include "wx/generic/listctrl.h" #elif defined(__WXGTK__) diff --git a/include/wx/msw/iniconf.h b/include/wx/msw/iniconf.h index 76449ced01..6d214806e9 100644 --- a/include/wx/msw/iniconf.h +++ b/include/wx/msw/iniconf.h @@ -91,8 +91,8 @@ public: virtual bool Flush(bool bCurrentOnly = FALSE); - virtual bool DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso); - virtual bool DeleteGroup(const char *szKey); + virtual bool DeleteEntry(const wxString& Key, bool bGroupIfEmptyAlso); + virtual bool DeleteGroup(const wxString& szKey); virtual bool DeleteAll(); private: diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index de33833bea..8a64ec8796 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -46,6 +46,9 @@ WXDLLEXPORT wxFont wxCreateFontFromLogFont(LOGFONT *logFont); // , bool createNe # if defined (__WIN32__) && defined(STRICT) typedef long (_stdcall * WndProcCast) (HWND, unsigned int, unsigned int, long); # define CASTWNDPROC (WndProcCast) +# elif defined(__WIN16__) + typedef int (PASCAL * WndProcCast) (); +# define CASTWNDPROC (WndProcCast) # else # define CASTWNDPROC # endif diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index cef7278a85..8f151883fb 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -81,6 +81,33 @@ WXDLLEXPORT_DATA(extern const char*) wxPanelNameStr; WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; +//----------------------------------------------------------------------------- +// wxClientData +//----------------------------------------------------------------------------- + +class wxClientData +{ +public: + wxClientData() { } + virtual ~wxClientData() { } +}; + +//----------------------------------------------------------------------------- +// wxStringClientData +//----------------------------------------------------------------------------- + +class wxStringClientData: public wxClientData +{ +public: + wxStringClientData() { } + wxStringClientData( wxString &data ) { m_data = data; } + void SetData( wxString &data ) { m_data = data; } + wxString GetData() const { return m_data; } + +private: + wxString m_data; +}; + class WXDLLEXPORT wxWindow : public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxWindow) diff --git a/include/wx/notebook.h b/include/wx/notebook.h index 4d2aaafc5c..42c138cfbf 100644 --- a/include/wx/notebook.h +++ b/include/wx/notebook.h @@ -2,7 +2,11 @@ #define _WX_NOTEBOOK_H_BASE_ #if defined(__WXMSW__) +#ifdef __WIN16__ + #include "wx/generic/notebook.h" +#else #include "wx/msw/notebook.h" +#endif #elif defined(__WXMOTIF__) #include "wx/motif/notebook.h" #elif defined(__WXGTK__) diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h index 0fce45a8a2..fc3a89e1b3 100644 --- a/include/wx/treectrl.h +++ b/include/wx/treectrl.h @@ -2,7 +2,11 @@ #define _WX_TREECTRL_H_BASE_ #if defined(__WXMSW__) +#ifdef __WIN16__ +#include "wx/generic/treectrl.h" +#else #include "wx/msw/treectrl.h" +#endif #elif defined(__WXMOTIF__) #include "wx/generic/treectrl.h" #elif defined(__WXGTK__) diff --git a/samples/checklst/makefile.dos b/samples/checklst/makefile.dos index c33ea5e450..78232aa571 100644 --- a/samples/checklst/makefile.dos +++ b/samples/checklst/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds checklst example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\checklst - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = checklst.$(SRCSUFF) -OBJECTS = checklst.obj - -all: checklst.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -checklst.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) checklst.obj checklst.def checklst.res - link $(LINKFLAGS) @<< -checklst.obj $(WXDIR)\src\msw\dummy.obj, -checklst, -NUL, -$(LIBS), -checklst.def -; -<< - rc -K checklst.res - -checklst.obj: checklst.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=checklst +OBJECTS=$(TARGET).obj -checklst.res : checklst.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include checklst +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/config/makefile.dos b/samples/config/makefile.dos new file mode 100644 index 0000000000..0a87032b82 --- /dev/null +++ b/samples/config/makefile.dos @@ -0,0 +1,17 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1998 +# Updated: +# +# Makefile : Builds 16-bit sample, VC++ 1.5 +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +TARGET=conftest +OBJECTS=$(TARGET).obj + +!include $(WXDIR)\src\makeprog.msc + diff --git a/samples/controls/makefile.dos b/samples/controls/makefile.dos index 81466d023d..f1170311a5 100644 --- a/samples/controls/makefile.dos +++ b/samples/controls/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds controls example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\controls - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = controls.$(SRCSUFF) -OBJECTS = controls.obj - -all: controls.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -controls.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) controls.obj controls.def controls.res - link $(LINKFLAGS) @<< -controls.obj $(WXDIR)\src\msw\dummy.obj, -controls, -NUL, -$(LIBS), -controls.def -; -<< - rc -K controls.res - -controls.obj: controls.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=controls +OBJECTS=$(TARGET).obj -controls.res : controls.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include controls +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/db/makefile.dos b/samples/db/makefile.dos new file mode 100644 index 0000000000..437ac4e46e --- /dev/null +++ b/samples/db/makefile.dos @@ -0,0 +1,17 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1998 +# Updated: +# +# Makefile : Builds 16-bit sample, VC++ 1.5 +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +TARGET=dbtest +OBJECTS=$(TARGET).obj + +!include $(WXDIR)\src\makeprog.msc + diff --git a/samples/dialogs/makefile.dos b/samples/dialogs/makefile.dos index dd0e10c4a1..639f27668f 100644 --- a/samples/dialogs/makefile.dos +++ b/samples/dialogs/makefile.dos @@ -1,81 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds dialogs example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\dialogs -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /DDEBUG=$(DEBUG) /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = dialogs.$(SRCSUFF) -OBJECTS = dialogs.obj - -all: dialogs.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -dialogs.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) dialogs.def dialogs.res - link $(LINKFLAGS) @<< -$(OBJECTS) $(WXDIR)\src\msw\dummy.obj, -dialogs, -NUL, -$(LIBS), -dialogs.def -; -<< - rc -30 -K dialogs.res - -dialogs.obj: dialogs.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=dialogs +OBJECTS=$(TARGET).obj -dialogs.res : dialogs.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw dialogs +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/dnd/makefile.dos b/samples/dnd/makefile.dos index 46906a90e4..dd90a7a9df 100644 --- a/samples/dnd/makefile.dos +++ b/samples/dnd/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds dnd example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\dnd - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = dnd.$(SRCSUFF) -OBJECTS = dnd.obj - -all: dnd.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -dnd.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) dnd.obj dnd.def dnd.res - link $(LINKFLAGS) @<< -dnd.obj $(WXDIR)\src\msw\dummy.obj, -dnd, -NUL, -$(LIBS), -dnd.def -; -<< - rc -K dnd.res - -dnd.obj: dnd.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=dnd +OBJECTS=$(TARGET).obj -dnd.res : dnd.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include dnd +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/docview/makefile.dos b/samples/docview/makefile.dos index 3e32b22dce..033f382e7d 100644 --- a/samples/docview/makefile.dos +++ b/samples/docview/makefile.dos @@ -1,74 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1995 +# Created: 1998 # Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds docview example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\docview -INC=/I$(WXDIR)\include - -HEADERS = docview.h -SOURCES = docview.$(SRCSUFF) -OBJECTS = docview.obj doc.obj view.obj - -all: docview.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -docview.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) docview.def docview.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj $(OBJECTS), -docview, -NUL, -$(LIBS), -docview.def -; -<< - rc -30 -K docview.res - -docview.obj: docview.h docview.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h view.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: doc.h doc.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -docview.res : docview.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\include docview +TARGET=docview +OBJECTS=$(TARGET).obj view.obj doc.obj -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb +!include $(WXDIR)\src\makeprog.msc diff --git a/samples/docvwmdi/makefile.dos b/samples/docvwmdi/makefile.dos index f1132c9c7f..04760719b3 100644 --- a/samples/docvwmdi/makefile.dos +++ b/samples/docvwmdi/makefile.dos @@ -1,74 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1995 +# Created: 1998 # Updated: -# Copyright: (c) 1995, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds docview example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\docvwmdi -INC=/I$(WXDIR)\include - -HEADERS = docview.h -SOURCES = docview.$(SRCSUFF) -OBJECTS = docview.obj doc.obj view.obj - -all: docview.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -docview.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) docview.def docview.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj $(OBJECTS), -docview, -NUL, -$(LIBS), -docview.def -; -<< - rc -30 -K docview.res - -docview.obj: docview.h docview.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -view.obj: view.h view.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -doc.obj: doc.h doc.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -docview.res : docview.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\include docview +TARGET=docview +OBJECTS=$(TARGET).obj doc.obj view.obj -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb +!include $(WXDIR)\src\makeprog.msc diff --git a/samples/dynamic/makefile.dos b/samples/dynamic/makefile.dos index 1305df9589..d4109ed7dc 100644 --- a/samples/dynamic/makefile.dos +++ b/samples/dynamic/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds dynamic example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\dynamic - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = dynamic.$(SRCSUFF) -OBJECTS = dynamic.obj - -all: dynamic.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -dynamic.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) dynamic.obj dynamic.def dynamic.res - link $(LINKFLAGS) @<< -dynamic.obj $(WXDIR)\src\msw\dummy.obj, -dynamic, -NUL, -$(LIBS), -dynamic.def -; -<< - rc -K dynamic.res - -dynamic.obj: dynamic.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=dynamic +OBJECTS=$(TARGET).obj -dynamic.res : dynamic.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include dynamic +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/forty/canvas.cpp b/samples/forty/canvas.cpp index 7a5dfe4010..2ba1f15c5b 100644 --- a/samples/forty/canvas.cpp +++ b/samples/forty/canvas.cpp @@ -51,7 +51,7 @@ FortyCanvas::FortyCanvas(wxWindow* parent, int x, int y, int w, int h) : m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL); #endif SetBackgroundColour(FortyApp::BackgroundColour()); - AllowDoubleClick(true); + AllowDoubleClick(TRUE); m_handCursor = new wxCursor(wxCURSOR_HAND); m_arrowCursor = new wxCursor(wxCURSOR_ARROW); diff --git a/samples/forty/forty.cpp b/samples/forty/forty.cpp index 570fe85df0..6195e27f4b 100644 --- a/samples/forty/forty.cpp +++ b/samples/forty/forty.cpp @@ -93,7 +93,7 @@ bool FortyApp::OnInit() // Show the frame frame->Show(TRUE); - return true; + return TRUE; } const wxColour& FortyApp::BackgroundColour() diff --git a/samples/forty/forty.def b/samples/forty/forty.def new file mode 100644 index 0000000000..a096488900 --- /dev/null +++ b/samples/forty/forty.def @@ -0,0 +1,8 @@ +NAME Forty +DESCRIPTION 'Forty Thieves' +EXETYPE WINDOWS +STUB 'WINSTUB.EXE' +CODE PRELOAD MOVEABLE DISCARDABLE +DATA PRELOAD MOVEABLE MULTIPLE +HEAPSIZE 4048 +STACKSIZE 16000 diff --git a/samples/forty/makefile.dos b/samples/forty/makefile.dos new file mode 100644 index 0000000000..150d0b9387 --- /dev/null +++ b/samples/forty/makefile.dos @@ -0,0 +1,17 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1998 +# Updated: +# +# Makefile : Builds 16-bit sample, VC++ 1.5 +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +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.msc + diff --git a/samples/grid/makefile.dos b/samples/grid/makefile.dos index 23a7e87223..13e3a4ce8e 100644 --- a/samples/grid/makefile.dos +++ b/samples/grid/makefile.dos @@ -1,66 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds grid test example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\test - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = test.$(SRCSUFF) -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -test.obj $(WXDIR)\src\msw\dummy.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -30 -K test.res - -test.obj: test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=test +OBJECTS = $(TARGET).obj -test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\include test +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/image/makefile.dos b/samples/image/makefile.dos new file mode 100644 index 0000000000..788ca91e16 --- /dev/null +++ b/samples/image/makefile.dos @@ -0,0 +1,17 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1998 +# Updated: +# +# Makefile : Builds 16-bit sample, VC++ 1.5 +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +TARGET=image +OBJECTS = $(TARGET).obj + +!include $(WXDIR)\src\makeprog.msc + diff --git a/samples/internat/makefile.dos b/samples/internat/makefile.dos index 99b18d8075..3bb51f5fe2 100644 --- a/samples/internat/makefile.dos +++ b/samples/internat/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds internat example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\internat - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = internat.$(SRCSUFF) -OBJECTS = internat.obj - -all: internat.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -internat.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) internat.obj internat.def internat.res - link $(LINKFLAGS) @<< -internat.obj $(WXDIR)\src\msw\dummy.obj, -internat, -NUL, -$(LIBS), -internat.def -; -<< - rc -K internat.res - -internat.obj: internat.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=internat +OBJECTS = $(TARGET).obj -internat.res : internat.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include internat +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/joytest/makefile.dos b/samples/joytest/makefile.dos index b2ddbcf9f5..df94746c2e 100644 --- a/samples/joytest/makefile.dos +++ b/samples/joytest/makefile.dos @@ -1,63 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds joytest example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\joytest -INC=/I$(WXDIR)\include - -HEADERS = joytest.h -SOURCES = joytest.$(SRCSUFF) -OBJECTS = joytest.obj - -all: joytest.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -joytest.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) joytest.obj joytest.def joytest.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj joytest.obj, -joytest, -NUL, -$(LIBS), -joytest.def -; -<< - rc -K joytest.res - -joytest.obj: joytest.h joytest.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=joytest +OBJECTS = $(TARGET).obj -joytest.res : joytest.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include joytest +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/layout/makefile.dos b/samples/layout/makefile.dos index 8ecd7c5608..e963c12e94 100644 --- a/samples/layout/makefile.dos +++ b/samples/layout/makefile.dos @@ -1,85 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds layout example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging -# info. +# info -# Set WXDIR for your system WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\layout -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = layout.h -SOURCES = layout.$(SRCSUFF) -OBJECTS = layout.obj - -layout: layout.exe - -all: wx layout.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -layout.exe: $(DUMMY) $(WXLIB) layout.obj layout.def layout.res - link $(LINKFLAGS) @<< -$(DUMMY) layout.obj, -layout, -NUL, -$(LIBS), -layout.def -; -<< - rc -31 -K layout.res - -layout.obj: layout.h layout.$(SRCSUFF) $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -layout.res : layout.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa layout +TARGET=layout +OBJECTS = $(TARGET).obj -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb +!include $(WXDIR)\src\makeprog.msc diff --git a/samples/listctrl/makefile.dos b/samples/listctrl/makefile.dos index 5b65a93c36..ed9ccc0bed 100644 --- a/samples/listctrl/makefile.dos +++ b/samples/listctrl/makefile.dos @@ -1,81 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -30 -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=listtest +OBJECTS = $(TARGET).obj -minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/mdi/makefile.dos b/samples/mdi/makefile.dos index 1bd3983dc8..54c483503e 100644 --- a/samples/mdi/makefile.dos +++ b/samples/mdi/makefile.dos @@ -1,63 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds mdi example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\mdi -INC=/I$(WXDIR)\include - -HEADERS = mdi.h -SOURCES = mdi.$(SRCSUFF) -OBJECTS = mdi.obj - -all: mdi.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -mdi.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) mdi.obj mdi.def mdi.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj mdi.obj, -mdi, -NUL, -$(LIBS), -mdi.def -; -<< - rc -K mdi.res - -mdi.obj: mdi.h mdi.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=mdi +OBJECTS = $(TARGET).obj -mdi.res : mdi.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include mdi +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/memcheck/makefile.dos b/samples/memcheck/makefile.dos index e3f1acfaf4..400017d264 100644 --- a/samples/memcheck/makefile.dos +++ b/samples/memcheck/makefile.dos @@ -1,87 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds memcheck example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\memcheck -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -!ifndef DEBUG -DEBUG=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /DDEBUG=$(DEBUG) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -CPPFLAGS2=/AL /W3 /Zi $(ZOPTION) /DDEBUG /G2sw /Od /Dwx_msw $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /NOE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /DDEBUG=$(DEBUG) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -CPPFLAGS2=/AL /W3 /G2sw /Ox /DDEBUG /Dwx_msw $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /NOE /SEG:512 -!endif - -HEADERS = -SOURCES = memcheck.$(SRCSUFF) -OBJECTS = memcheck.obj - -all: memcheck.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -memcheck.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) memcheck.def memcheck.res - link $(LINKFLAGS) @<< -$(OBJECTS) $(WXDIR)\src\msw\dummy.obj, -memcheck, -NUL, -$(LIBS), -memcheck.def -; -<< - rc -30 -K memcheck.res - -memcheck.obj: memcheck.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=memcheck +OBJECTS = $(TARGET).obj -memcheck.res : memcheck.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include\wx memcheck +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/minifram/makefile.dos b/samples/minifram/makefile.dos index 98f93ab7bb..13e3a4ce8e 100644 --- a/samples/minifram/makefile.dos +++ b/samples/minifram/makefile.dos @@ -1,87 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds wxToolbar sample +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info -# Set WXDIR for your system WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -BBARDIR = $(WXDIR)\samples\toolbar - -INC = /I$(WXDIR)\include\base /I$(WXDIR)\include\msw - -THISDIR = $(BBARDIR) - -!ifndef FINAL -FINAL=0 -!endif - -# Default is to output RTF for WinHelp -!ifndef WINHELP -WINHELP=-winhelp -!endif - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw -LINKFLAGS=/NOD /CO /SEG:512 /ONERROR:NOEXE -!else -CPPFLAGS=/AL /Gt8 /W3 /G2sw /Os /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw -LINKFLAGS=/NOD /SEG:512 /ONERROR:NOEXE -!endif - -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj test.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -30 -K test.res - -test.obj: test.h test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.res : test.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw test +TARGET=test +OBJECTS = $(TARGET).obj -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb +!include $(WXDIR)\src\makeprog.msc diff --git a/samples/minimal/makefile.dos b/samples/minimal/makefile.dos index aa7e6ddf53..6319446109 100644 --- a/samples/minimal/makefile.dos +++ b/samples/minimal/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=minimal +OBJECTS=$(TARGET).obj -minimal.res : minimal.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include minimal +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/nativdlg/makefile.dos b/samples/nativdlg/makefile.dos index 6096ca810c..32d5aa720b 100644 --- a/samples/nativdlg/makefile.dos +++ b/samples/nativdlg/makefile.dos @@ -1,86 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds resource example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging -# info. +# info -# Set WXDIR for your system WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\resource -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg ddeml shell mmsystem -INC=-I$(WXDIR)\include\base -I$(WXDIR)\include\msw -DUMMY=$(WXDIR)\src\msw\dummy.obj - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!ifndef FINAL -FINAL=0 -!endif - -PRECOMP = /YuWX_PREC.H /Fp$(WXDIR)\src\msw\wx.pch - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) $(PRECOMP) /Dwx_msw -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:256 -!else -CPPFLAGS=/AL /W3 /G2sw $(INC) /Ox $(PRECOMP) /Dwx_msw -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:256 -!endif - -HEADERS = resource.h -SOURCES = resource.$(SRCSUFF) -OBJECTS = resource.obj - -resource: resource.exe - -all: wx resource.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -resource.exe: $(DUMMY) $(WXLIB) resource.obj resource.def resource.res - link $(LINKFLAGS) @<< -$(DUMMY) resource.obj, -resource, -NUL, -$(LIBS), -resource.def -; -<< - rc -31 -K resource.res - -resource.obj: resource.h resource.$(SRCSUFF) dialog1.wxr $(DUMMY) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=nativdlg +OBJECTS = $(TARGET).obj -resource.res : resource.rc $(WXDIR)\include\msw\wx.rc - rc -r /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa resource +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/notebook/makefile.dos b/samples/notebook/makefile.dos index 032e661e15..13e3a4ce8e 100644 --- a/samples/notebook/makefile.dos +++ b/samples/notebook/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds tab example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\tab - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = test.$(SRCSUFF) -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -test.obj $(WXDIR)\src\msw\dummy.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -K test.res - -test.obj: test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=test +OBJECTS = $(TARGET).obj -test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include test +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/notebook/test.def b/samples/notebook/test.def index b8dbdf8b5d..43b2ed3907 100644 --- a/samples/notebook/test.def +++ b/samples/notebook/test.def @@ -1,4 +1,3 @@ - * Last change: JS 26 Oct 98 6:29 pm NAME Test DESCRIPTION 'Notebook test' EXETYPE WINDOWS diff --git a/samples/ownerdrw/makefile.dos b/samples/ownerdrw/makefile.dos index 71c72681ac..8dc0bc9445 100644 --- a/samples/ownerdrw/makefile.dos +++ b/samples/ownerdrw/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds ownerdrw example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\ownerdrw - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = ownerdrw.$(SRCSUFF) -OBJECTS = ownerdrw.obj - -all: ownerdrw.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -ownerdrw.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) ownerdrw.obj ownerdrw.def ownerdrw.res - link $(LINKFLAGS) @<< -ownerdrw.obj $(WXDIR)\src\msw\dummy.obj, -ownerdrw, -NUL, -$(LIBS), -ownerdrw.def -; -<< - rc -K ownerdrw.res - -ownerdrw.obj: ownerdrw.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=ownerdrw +OBJECTS = $(TARGET).obj -ownerdrw.res : ownerdrw.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include ownerdrw +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/tab/makefile.dos b/samples/tab/makefile.dos index 032e661e15..13e3a4ce8e 100644 --- a/samples/tab/makefile.dos +++ b/samples/tab/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds tab example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\tab - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = test.$(SRCSUFF) -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -test.obj $(WXDIR)\src\msw\dummy.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -K test.res - -test.obj: test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=test +OBJECTS = $(TARGET).obj -test.res : test.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include test +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/toolbar/makefile.dos b/samples/toolbar/makefile.dos index 98f93ab7bb..13e3a4ce8e 100644 --- a/samples/toolbar/makefile.dos +++ b/samples/toolbar/makefile.dos @@ -1,87 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds wxToolbar sample +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info -# Set WXDIR for your system WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -BBARDIR = $(WXDIR)\samples\toolbar - -INC = /I$(WXDIR)\include\base /I$(WXDIR)\include\msw - -THISDIR = $(BBARDIR) - -!ifndef FINAL -FINAL=0 -!endif - -# Default is to output RTF for WinHelp -!ifndef WINHELP -WINHELP=-winhelp -!endif - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw -LINKFLAGS=/NOD /CO /SEG:512 /ONERROR:NOEXE -!else -CPPFLAGS=/AL /Gt8 /W3 /G2sw /Os /YuWX_PREC.H $(INC) /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch -CFLAGS=/AL /Gt8 /W3 /Zi $(ZOPTION) /G2sw /Od $(INC) /Dwx_msw -LINKFLAGS=/NOD /SEG:512 /ONERROR:NOEXE -!endif - -OBJECTS = test.obj - -all: test.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -test.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) test.obj test.def test.res - link $(LINKFLAGS) @<< -$(WXDIR)\src\msw\dummy.obj test.obj, -test, -NUL, -$(LIBS), -test.def -; -<< - rc -30 -K test.res - -test.obj: test.h test.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< - -test.res : test.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw test +TARGET=test +OBJECTS = $(TARGET).obj -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb +!include $(WXDIR)\src\makeprog.msc diff --git a/samples/treectrl/makefile.dos b/samples/treectrl/makefile.dos index 5b65a93c36..c1d52b22bf 100644 --- a/samples/treectrl/makefile.dos +++ b/samples/treectrl/makefile.dos @@ -1,81 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -30 -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=treetest +OBJECTS = $(TARGET).obj -minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/treectrl/treetest.def b/samples/treectrl/treetest.def index 8c952e6f00..714586eb59 100644 --- a/samples/treectrl/treetest.def +++ b/samples/treectrl/treetest.def @@ -1,4 +1,3 @@ - * Last change: JS 28 Apr 97 1:45 pm NAME TreeCtrl DESCRIPTION 'TreeCtrl wxWindows application' EXETYPE WINDOWS diff --git a/samples/typetest/makefile.dos b/samples/typetest/makefile.dos index 0c9debf866..837e509b02 100644 --- a/samples/typetest/makefile.dos +++ b/samples/typetest/makefile.dos @@ -1,65 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds typetest example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\typetest - -!ifndef FINAL -FINAL=0 -!endif - -HEADERS = -SOURCES = typetest.$(SRCSUFF) -OBJECTS = typetest.obj - -all: typetest.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - -typetest.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) typetest.obj typetest.def typetest.res - link $(LINKFLAGS) @<< -typetest.obj $(WXDIR)\src\msw\dummy.obj, -typetest, -NUL, -$(LIBS), -typetest.def -; -<< - rc -K typetest.res - -typetest.obj: typetest.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=typetest +OBJECTS = $(TARGET).obj -typetest.res : typetest.rc $(WXDIR)\include\wx\msw\wx.rc - rc -r /i$(WXDIR)\include typetest +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/validate/makefile.dos b/samples/validate/makefile.dos index 5b65a93c36..b8a1ba2104 100644 --- a/samples/validate/makefile.dos +++ b/samples/validate/makefile.dos @@ -1,81 +1,17 @@ # # File: makefile.dos # Author: Julian Smart -# Created: 1993 +# Created: 1998 # Updated: -# Copyright: (c) 1993, AIAI, University of Edinburgh # -# "%W% %G%" -# -# Makefile : Builds minimal example (DOS). +# Makefile : Builds 16-bit sample, VC++ 1.5 # Use FINAL=1 argument to nmake to build final version with no debugging # info WXDIR = $(WXWIN) -!include $(WXDIR)\src\makemsc.env - -THISDIR = $(WXDIR)\samples\minimal -WXLIB = $(WXDIR)\lib\wx.lib -LIBS=$(WXLIB) oldnames libw llibcew commdlg shell ddeml - -!ifndef FINAL -FINAL=0 -!endif - -INC=/I$(WXDIR)\include\msw /I$(WXDIR)\include\base - -# Set this to nothing if using MS C++ 7 -ZOPTION=/Z7 - -!if "$(FINAL)" == "0" -CPPFLAGS=/AL /W3 /Zi $(ZOPTION) /G2sw /Od /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /CO /ONERROR:NOEXE /SEG:512 -!else -CPPFLAGS=/AL /W3 /G2sw /Ox /YuWX_PREC.H /Dwx_msw /Fp$(WXDIR)\src\msw\wx.pch $(INC) -LINKFLAGS=/NOD /ONERROR:NOEXE /SEG:512 -!endif - -HEADERS = -SOURCES = minimal.$(SRCSUFF) -OBJECTS = minimal.obj - -all: minimal.exe - -wx: - cd $(WXDIR)\src\msw - nmake -f makefile.dos FINAL=$(FINAL) - cd $(THISDIR) - -wxclean: - cd $(WXDIR)\src\msw - nmake -f makefile.dos clean - cd $(THISDIR) - - -minimal.exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) minimal.obj minimal.def minimal.res - link $(LINKFLAGS) @<< -minimal.obj $(WXDIR)\src\msw\dummy.obj, -minimal, -NUL, -$(LIBS), -minimal.def -; -<< - rc -30 -K minimal.res - -minimal.obj: minimal.$(SRCSUFF) - cl @<< -$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) -<< +TARGET=validate +OBJECTS = $(TARGET).obj -minimal.res : minimal.rc $(WXDIR)\include\msw\wx.rc - rc -r /dFAFA_LIB /i$(WXDIR)\contrib\fafa /i$(WXDIR)\include\msw minimal +!include $(WXDIR)\src\makeprog.msc -clean: - -erase *.obj - -erase *.exe - -erase *.res - -erase *.map - -erase *.sbr - -erase *.pdb diff --git a/samples/wxpoem/makefile.dos b/samples/wxpoem/makefile.dos new file mode 100644 index 0000000000..84d5daaa91 --- /dev/null +++ b/samples/wxpoem/makefile.dos @@ -0,0 +1,17 @@ +# +# File: makefile.dos +# Author: Julian Smart +# Created: 1998 +# Updated: +# +# Makefile : Builds 16-bit sample, VC++ 1.5 +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +TARGET=wxpoem +OBJECTS = $(TARGET).obj + +!include $(WXDIR)\src\makeprog.msc + diff --git a/src/common/config.cpp b/src/common/config.cpp index 1510e939a7..9f25a1f05b 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -42,7 +42,7 @@ // we must include (one of) these files for wxConfigBase::Create #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE) #ifdef __WIN32__ - #include + #include #else //WIN16 #include #endif diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index db260cf827..f670a131b5 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -12,6 +12,13 @@ #pragma implementation "dirdlgg.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + #include "wx/defs.h" #include "wx/utils.h" #include "wx/dialog.h" @@ -126,8 +133,8 @@ class wxDirCtrl: public wxTreeCtrl const wxSize& size = wxDefaultSize, const long style = wxTR_HAS_BUTTONS, const wxString& name = "wxTreeCtrl" ); - void OnExpandItem( const wxTreeEvent &event ); - void OnCollapseItem( const wxTreeEvent &event ); + void OnExpandItem(wxTreeEvent &event ); + void OnCollapseItem(wxTreeEvent &event ); void ShowHidden( const bool yesno ); DECLARE_EVENT_TABLE() protected: @@ -235,7 +242,7 @@ void wxDirCtrl::CreateItems(const wxTreeItemId &parent) } } -void wxDirCtrl::OnExpandItem( const wxTreeEvent &event ) +void wxDirCtrl::OnExpandItem(wxTreeEvent &event ) { if (event.GetItem() == m_rootId) { @@ -273,7 +280,7 @@ void wxDirCtrl::OnExpandItem( const wxTreeEvent &event ) }; -void wxDirCtrl::OnCollapseItem( const wxTreeEvent &event ) +void wxDirCtrl::OnCollapseItem(wxTreeEvent &event ) { wxTreeItemId child, parent = event.GetItem(); long cookie; @@ -414,7 +421,7 @@ void wxDirDialog::OnTreeSelected( wxTreeEvent &event ) m_input->SetValue( *(data->m_path) ); }; -void wxDirDialog::OnTreeKeyDown( wxKeyEvent &WXUNUSED(event) ) +void wxDirDialog::OnTreeKeyDown( wxTreeEvent &WXUNUSED(event) ) { wxDirItemData *data = (wxDirItemData*)m_dir->GetItemData(m_dir->GetSelection()); diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 29ad9cdb75..95614a8281 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -11,6 +11,13 @@ #pragma implementation "imaglist.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + #include "wx/imaglist.h" //----------------------------------------------------------------------------- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 192ddb36a0..4e5824aabb 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -11,6 +11,13 @@ #pragma implementation "listctrl.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + #include "wx/dcscreen.h" #include "wx/app.h" #include "wx/listctrl.h" @@ -73,7 +80,7 @@ void wxListItemData::SetPosition( int x, int y ) m_ypos = y; } -void wxListItemData::SetSize( int const width, int height ) +void wxListItemData::SetSize( int width, int height ) { if (width != -1) m_width = width; if (height != -1) m_height = height; @@ -260,7 +267,7 @@ wxListLineData::wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hili m_spacing = 0; } -void wxListLineData::CalculateSize( wxPaintDC *dc, int spacing ) +void wxListLineData::CalculateSize( wxDC *dc, int spacing ) { m_spacing = spacing; switch (m_mode) @@ -319,7 +326,7 @@ void wxListLineData::CalculateSize( wxPaintDC *dc, int spacing ) } } -void wxListLineData::SetPosition( wxPaintDC *dc, int x, int y, int window_width ) +void wxListLineData::SetPosition( wxDC *dc, int x, int y, int window_width ) { m_bound_all.x = x; m_bound_all.y = y; @@ -470,7 +477,7 @@ void wxListLineData::SetItem( int index, const wxListItem &info ) } } -void wxListLineData::GetItem( int const index, wxListItem &info ) +void wxListLineData::GetItem( int index, wxListItem &info ) { int i = index; wxNode *node = m_items.Nth( i ); @@ -516,7 +523,7 @@ int wxListLineData::GetImage( int index ) return -1; } -void wxListLineData::DoDraw( wxPaintDC *dc, bool hilight, bool paintBG ) +void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG ) { long dev_x = dc->LogicalToDeviceX( m_bound_all.x-2 ); long dev_y = dc->LogicalToDeviceY( m_bound_all.y-2 ); @@ -616,7 +623,7 @@ void wxListLineData::ReverseHilight( void ) m_owner->DeselectLine( this ); } -void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on ) +void wxListLineData::DrawRubberBand( wxDC *dc, bool on ) { if (on) { @@ -627,7 +634,7 @@ void wxListLineData::DrawRubberBand( wxPaintDC *dc, bool on ) } } -void wxListLineData::Draw( wxPaintDC *dc ) +void wxListLineData::Draw( wxDC *dc ) { DoDraw( dc, m_hilighted, m_hilighted ); } @@ -696,7 +703,7 @@ wxListHeaderWindow::~wxListHeaderWindow( void ) delete m_resizeCursor; } -void wxListHeaderWindow::DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h ) +void wxListHeaderWindow::DoDrawRect( wxDC *dc, int x, int y, int w, int h ) { const int m_corner = 1; @@ -1536,7 +1543,7 @@ void wxListMainWindow::OnSize( wxSizeEvent &WXUNUSED(event) ) */ } -void wxListMainWindow::DrawImage( int index, wxPaintDC *dc, int x, int y ) +void wxListMainWindow::DrawImage( int index, wxDC *dc, int x, int y ) { if ((m_mode & wxLC_ICON) && (m_normal_image_list)) { @@ -1577,7 +1584,7 @@ void wxListMainWindow::GetImageSize( int index, int &width, int &height ) int wxListMainWindow::GetTextLength( wxString &s ) { - wxPaintDC dc( this ); + wxClientDC dc( this ); long lw = 0; long lh = 0; dc.GetTextExtent( s, &lw, &lh ); @@ -1891,7 +1898,7 @@ void wxListMainWindow::CalculatePositions( void ) { if (!m_lines.First()) return; - wxPaintDC dc( this ); + wxClientDC dc( this ); dc.SetFont( GetFont() ); int iconSpacing = 0; diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp new file mode 100644 index 0000000000..cced371845 --- /dev/null +++ b/src/generic/notebook.cpp @@ -0,0 +1,642 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: notebook.cpp +// Purpose: implementation of wxNotebook +// Author: Julian Smart +// Modified by: +// Created: 17/09/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- +#ifdef __GNUG__ +#pragma implementation "notebook.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#include +#include +#include +#include +#include + +// ---------------------------------------------------------------------------- +// macros +// ---------------------------------------------------------------------------- + +// check that the page index is valid +#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount())) + +// ---------------------------------------------------------------------------- +// event table +// ---------------------------------------------------------------------------- + +#if !USE_SHARED_LIBRARIES +BEGIN_EVENT_TABLE(wxNotebook, wxControl) + EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) + EVT_SIZE(wxNotebook::OnSize) + EVT_PAINT(wxNotebook::OnPaint) + EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent) + EVT_SET_FOCUS(wxNotebook::OnSetFocus) + EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) + EVT_IDLE(wxNotebook::OnIdle) +END_EVENT_TABLE() + +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) +#endif + +// ============================================================================ +// implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// wxNotebook construction +// ---------------------------------------------------------------------------- + +// common part of all ctors +void wxNotebook::Init() +{ + m_tabView = (wxNotebookTabView*) NULL; + m_pImageList = NULL; + m_nSelection = -1; +} + +// default for dynamic class +wxNotebook::wxNotebook() +{ + Init(); +} + +// the same arguments as for wxControl +wxNotebook::wxNotebook(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + Init(); + + Create(parent, id, pos, size, style, name); +} + +// Create() function +bool wxNotebook::Create(wxWindow *parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + // base init + SetName(name); + + m_windowId = id == -1 ? NewControlId() : id; + + // It's like a normal window... + if (!wxWindow::Create(parent, id, pos, size, style, name)) + return FALSE; + + SetTabView(new wxNotebookTabView(this)); + + return TRUE; +} + +// dtor +wxNotebook::~wxNotebook() +{ + delete m_tabView; +} + +// ---------------------------------------------------------------------------- +// wxNotebook accessors +// ---------------------------------------------------------------------------- +int wxNotebook::GetPageCount() const +{ + return m_aPages.Count(); +} + +int wxNotebook::GetRowCount() const +{ + // TODO + return 0; +} + +int wxNotebook::SetSelection(int nPage) +{ + if (nPage == -1) + return 0; + + wxASSERT( IS_VALID_PAGE(nPage) ); + + wxNotebookPage* pPage = GetPage(nPage); + + m_tabView->SetTabSelection((int) (long) pPage); + + // TODO + return 0; +} + +void wxNotebook::AdvanceSelection(bool bForward) +{ + int nSel = GetSelection(); + int nMax = GetPageCount() - 1; + if ( bForward ) + SetSelection(nSel == nMax ? 0 : nSel + 1); + else + SetSelection(nSel == 0 ? nMax : nSel - 1); +} + +bool wxNotebook::SetPageText(int nPage, const wxString& strText) +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + wxNotebookPage* page = GetPage(nPage); + if (page) + { + m_tabView->SetTabText((int) (long) page, strText); + Refresh(); + return TRUE; + } + + return FALSE; +} + +wxString wxNotebook::GetPageText(int nPage) const +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + wxNotebookPage* page = ((wxNotebook*)this)->GetPage(nPage); + if (page) + return m_tabView->GetTabText((int) (long) page); + else + return wxEmptyString; +} + +int wxNotebook::GetPageImage(int nPage) const +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + // TODO + return 0; +} + +bool wxNotebook::SetPageImage(int nPage, int nImage) +{ + wxASSERT( IS_VALID_PAGE(nPage) ); + + // TODO + return FALSE; +} + +void wxNotebook::SetImageList(wxImageList* imageList) +{ + m_pImageList = imageList; + // TODO +} + +// ---------------------------------------------------------------------------- +// wxNotebook operations +// ---------------------------------------------------------------------------- + +// remove one page from the notebook and delete it +bool wxNotebook::DeletePage(int nPage) +{ + wxCHECK( IS_VALID_PAGE(nPage), FALSE ); + + if (m_nSelection != -1) + { + m_aPages[m_nSelection]->Show(FALSE); + m_aPages[m_nSelection]->Lower(); + } + + wxNotebookPage* pPage = GetPage(nPage); + m_tabView->RemoveTab((int) (long) pPage); + + delete m_aPages[nPage]; + m_aPages.Remove(nPage); + + if (m_aPages.GetCount() == 0) + { + m_nSelection = -1; + m_tabView->SetTabSelection(-1, FALSE); + } + else if (m_nSelection > -1) + { + m_nSelection = -1; + m_tabView->SetTabSelection((int) (long) GetPage(0), FALSE); + if (m_nSelection != 0) + ChangePage(-1, 0); + } + + RefreshLayout(FALSE); + + return TRUE; +} + +bool wxNotebook::DeletePage(wxNotebookPage* page) +{ + int pagePos = FindPagePosition(page); + if (pagePos > -1) + return DeletePage(pagePos); + else + return FALSE; +} + +// remove one page from the notebook +bool wxNotebook::RemovePage(int nPage) +{ + wxCHECK( IS_VALID_PAGE(nPage), FALSE ); + + m_aPages[nPage]->Show(FALSE); + // m_aPages[nPage]->Lower(); + + wxNotebookPage* pPage = GetPage(nPage); + m_tabView->RemoveTab((int) (long) pPage); + + m_aPages.Remove(nPage); + + if (m_aPages.GetCount() == 0) + { + m_nSelection = -1; + m_tabView->SetTabSelection(-1, TRUE); + } + else if (m_nSelection > -1) + { + // Only change the selection if the page we + // deleted was the selection. + if (nPage == m_nSelection) + { + m_nSelection = -1; + // Select the first tab. Generates a ChangePage. + m_tabView->SetTabSelection((int) (long) GetPage(0), TRUE); + } + else + { + // We must adjust which tab we think is selected. + // If greater than the page we deleted, it must be moved down + // a notch. + if (m_nSelection > nPage) + m_nSelection -- ; + } + } + + RefreshLayout(FALSE); + + return TRUE; +} + +bool wxNotebook::RemovePage(wxNotebookPage* page) +{ + int pagePos = FindPagePosition(page); + if (pagePos > -1) + return RemovePage(pagePos); + else + return FALSE; +} + +// Find the position of the wxNotebookPage, -1 if not found. +int wxNotebook::FindPagePosition(wxNotebookPage* page) const +{ + int nPageCount = GetPageCount(); + int nPage; + for ( nPage = 0; nPage < nPageCount; nPage++ ) + if (m_aPages[nPage] == page) + return nPage; + return -1; +} + +// remove all pages +bool wxNotebook::DeleteAllPages() +{ + m_tabView->ClearTabs(TRUE); + + int nPageCount = GetPageCount(); + int nPage; + for ( nPage = 0; nPage < nPageCount; nPage++ ) + delete m_aPages[nPage]; + + m_aPages.Clear(); + + return TRUE; +} + +// add a page to the notebook +bool wxNotebook::AddPage(wxNotebookPage *pPage, + const wxString& strText, + bool bSelect, + int imageId) +{ + return InsertPage(GetPageCount(), pPage, strText, bSelect, imageId); +} + +// same as AddPage() but does it at given position +bool wxNotebook::InsertPage(int nPage, + wxNotebookPage *pPage, + const wxString& strText, + bool bSelect, + int imageId) +{ + wxASSERT( pPage != NULL ); + wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE ); + + m_tabView->AddTab((int) (long) pPage, strText); + if (!bSelect) + pPage->Show(FALSE); + + // save the pointer to the page + m_aPages.Insert(pPage, nPage); + + if (bSelect) + { + // This will cause ChangePage to be called, via OnSelPage + m_tabView->SetTabSelection((int) (long) pPage, TRUE); + } + + // some page must be selected: either this one or the first one if there is + // still no selection + if ( m_nSelection == -1 ) + ChangePage(-1, 0); + + RefreshLayout(FALSE); + + return TRUE; +} + +// ---------------------------------------------------------------------------- +// wxNotebook callbacks +// ---------------------------------------------------------------------------- + +// @@@ OnSize() is used for setting the font when it's called for the first +// time because doing it in ::Create() doesn't work (for unknown reasons) +void wxNotebook::OnSize(wxSizeEvent& event) +{ + static bool s_bFirstTime = TRUE; + if ( s_bFirstTime ) { + // TODO: any first-time-size processing. + s_bFirstTime = FALSE; + } + + RefreshLayout(); + + // Processing continues to next OnSize + event.Skip(); +} + +// This was supposed to cure the non-display of the notebook +// until the user resizes the window. +// What's going on? +void wxNotebook::OnIdle(wxIdleEvent& event) +{ + static bool s_bFirstTime = TRUE; + if ( s_bFirstTime ) { + /* + wxSize sz(GetSize()); + sz.x ++; + SetSize(sz); + sz.x --; + SetSize(sz); + */ + + /* + wxSize sz(GetSize()); + wxSizeEvent sizeEvent(sz, GetId()); + sizeEvent.SetEventObject(this); + GetEventHandler()->ProcessEvent(sizeEvent); + Refresh(); + */ + s_bFirstTime = FALSE; + } + event.Skip(); +} + +// Implementation: calculate the layout of the view rect +// and resize the children if required +bool wxNotebook::RefreshLayout(bool force) +{ + if (m_tabView) + { + wxRect oldRect = m_tabView->GetViewRect(); + + int cw, ch; + GetClientSize(& cw, & ch); + + int tabHeight = m_tabView->GetTotalTabHeight(); + wxRect rect; + rect.x = 4; + rect.y = tabHeight + 4; + rect.width = cw - 8; + rect.height = ch - 4 - rect.y ; + + m_tabView->SetViewRect(rect); + + m_tabView->Layout(); + + // Need to do it a 2nd time to get the tab height with + // the new view width, since changing the view width changes the + // tab layout. + tabHeight = m_tabView->GetTotalTabHeight(); + rect.x = 4; + rect.y = tabHeight + 4; + rect.width = cw - 8; + rect.height = ch - 4 - rect.y ; + + m_tabView->SetViewRect(rect); + + m_tabView->Layout(); + + if (!force && (rect == oldRect)) + return FALSE; + + // fit the notebook page to the tab control's display area + + unsigned int nCount = m_aPages.Count(); + for ( unsigned int nPage = 0; nPage < nCount; nPage++ ) { + wxNotebookPage *pPage = m_aPages[nPage]; + if (pPage->IsShown()) + { + wxRect clientRect = GetAvailableClientSize(); + pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height); + if ( pPage->GetAutoLayout() ) + pPage->Layout(); + } + } + Refresh(); + } + return TRUE; +} + +void wxNotebook::OnSelChange(wxNotebookEvent& event) +{ + // is it our tab control? + if ( event.GetEventObject() == this ) + { + if (event.GetSelection() != m_nSelection) + ChangePage(event.GetOldSelection(), event.GetSelection()); + } + + // we want to give others a chance to process this message as well + event.Skip(); +} + +void wxNotebook::OnSetFocus(wxFocusEvent& event) +{ + // set focus to the currently selected page if any + if ( m_nSelection != -1 ) + m_aPages[m_nSelection]->SetFocus(); + + event.Skip(); +} + +void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event) +{ + if ( event.IsWindowChange() ) { + // change pages + AdvanceSelection(event.GetDirection()); + } + else { + // pass to the parent + if ( GetParent() ) { + event.SetCurrentFocus(this); + GetParent()->ProcessEvent(event); + } + } +} + +// ---------------------------------------------------------------------------- +// wxNotebook base class virtuals +// ---------------------------------------------------------------------------- + +// override these 2 functions to do nothing: everything is done in OnSize + +void wxNotebook::SetConstraintSizes(bool /* recurse */) +{ + // don't set the sizes of the pages - their correct size is not yet known + wxControl::SetConstraintSizes(FALSE); +} + +bool wxNotebook::DoPhase(int /* nPhase */) +{ + return TRUE; +} + +void wxNotebook::Command(wxCommandEvent& event) +{ + wxFAIL_MSG("wxNotebook::Command not implemented"); +} + +// ---------------------------------------------------------------------------- +// wxNotebook helper functions +// ---------------------------------------------------------------------------- + +// hide the currently active panel and show the new one +void wxNotebook::ChangePage(int nOldSel, int nSel) +{ + // cout << "ChangePage: " << nOldSel << ", " << nSel << "\n"; + wxASSERT( nOldSel != nSel ); // impossible + + if ( nOldSel != -1 ) { + m_aPages[nOldSel]->Show(FALSE); + m_aPages[nOldSel]->Lower(); + } + + wxNotebookPage *pPage = m_aPages[nSel]; + + wxRect clientRect = GetAvailableClientSize(); + pPage->SetSize(clientRect.x, clientRect.y, clientRect.width, clientRect.height); + + pPage->Show(TRUE); + pPage->Raise(); + pPage->SetFocus(); + + Refresh(); + + m_nSelection = nSel; +} + +void wxNotebook::OnMouseEvent(wxMouseEvent& event) +{ + if (m_tabView) + m_tabView->OnEvent(event); +} + +void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event) ) +{ + wxPaintDC dc(this); + if (m_tabView) + m_tabView->Draw(dc); +} + +wxRect wxNotebook::GetAvailableClientSize() +{ + int cw, ch; + GetClientSize(& cw, & ch); + + int tabHeight = m_tabView->GetTotalTabHeight(); + + // TODO: these margins should be configurable. + wxRect rect; + rect.x = 6; + rect.y = tabHeight + 6; + rect.width = cw - 12; + rect.height = ch - 4 - rect.y ; + + return rect; +} + +/* + * wxNotebookTabView + */ + +IMPLEMENT_CLASS(wxNotebookTabView, wxTabView) + +wxNotebookTabView::wxNotebookTabView(wxNotebook *notebook, long style): wxTabView(style) +{ + m_notebook = notebook; + + m_notebook->SetTabView(this); + + SetWindow(m_notebook); +} + +wxNotebookTabView::~wxNotebookTabView(void) +{ +} + +// Called when a tab is activated +void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId) +{ + if (!m_notebook) + return; + + wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId()); + + // Translate from wxTabView's ids (which aren't position-dependent) + // to wxNotebook's (which are). + wxNotebookPage* pActive = (wxNotebookPage*) activateId; + wxNotebookPage* pDeactive = (wxNotebookPage*) deactivateId; + + int activatePos = m_notebook->FindPagePosition(pActive); + int deactivatePos = m_notebook->FindPagePosition(pDeactive); + + event.SetEventObject(m_notebook); + event.SetSelection(activatePos); + event.SetOldSelection(deactivatePos); + m_notebook->GetEventHandler()->ProcessEvent(event); +} + + diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 052f03b240..3a2dea9902 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -21,7 +21,14 @@ #pragma implementation "treectrl.h" #endif -#include "wx/treectrl.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#include "wx/generic/treectrl.h" #include "wx/settings.h" #include "wx/log.h" #include "wx/intl.h" @@ -34,6 +41,8 @@ // array types // ----------------------------------------------------------------------------- +class WXDLLEXPORT wxGenericTreeItem; + WX_DEFINE_ARRAY(wxGenericTreeItem *, wxArrayTreeItems); // ----------------------------------------------------------------------------- @@ -525,14 +534,14 @@ bool wxTreeCtrl::IsBold(const wxTreeItemId& item) const wxTreeItemId wxTreeCtrl::GetParent(const wxTreeItemId& item) const { - wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" ); + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" ); return item.m_pItem->GetParent(); } wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) const { - wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" ); + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" ); cookie = 0; return GetNextChild(item, cookie); @@ -540,7 +549,7 @@ wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item, long& cookie) c wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) const { - wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" ); + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" ); wxArrayTreeItems& children = item.m_pItem->GetChildren(); if ( (size_t)cookie < children.Count() ) @@ -550,20 +559,20 @@ wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) co else { // there are no more of them - return NULL; + return wxTreeItemId(); } } wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const { - wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" ); + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" ); wxGenericTreeItem *i = item.m_pItem; wxGenericTreeItem *parent = i->GetParent(); if ( parent == NULL ) { // root item doesn't have any siblings - return NULL; + return wxTreeItemId(); } wxArrayTreeItems& siblings = parent->GetChildren(); @@ -571,51 +580,51 @@ wxTreeItemId wxTreeCtrl::GetNextSibling(const wxTreeItemId& item) const wxASSERT( index != NOT_FOUND ); // I'm not a child of my parent? size_t n = (size_t)(index + 1); - return n == siblings.Count() ? (wxGenericTreeItem*)NULL : siblings[n]; + return n == siblings.Count() ? wxTreeItemId() : siblings[n]; } wxTreeItemId wxTreeCtrl::GetPrevSibling(const wxTreeItemId& item) const { - wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" ); + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" ); wxGenericTreeItem *i = item.m_pItem; wxGenericTreeItem *parent = i->GetParent(); if ( parent == NULL ) { // root item doesn't have any siblings - return NULL; + return wxTreeItemId(); } wxArrayTreeItems& siblings = parent->GetChildren(); int index = siblings.Index(i); wxASSERT( index != NOT_FOUND ); // I'm not a child of my parent? - return index == 0 ? (wxGenericTreeItem*)NULL : siblings[(size_t)(index - 1)]; + return index == 0 ? wxTreeItemId() : siblings[(size_t)(index - 1)]; } wxTreeItemId wxTreeCtrl::GetFirstVisibleItem() const { wxFAIL_MSG("not implemented"); - return NULL; + return wxTreeItemId(); } wxTreeItemId wxTreeCtrl::GetNextVisible(const wxTreeItemId& item) const { - wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" ); + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" ); wxFAIL_MSG("not implemented"); - return NULL; + return wxTreeItemId(); } wxTreeItemId wxTreeCtrl::GetPrevVisible(const wxTreeItemId& item) const { - wxCHECK_MSG( item.IsOk(), NULL, "invalid tree item" ); + wxCHECK_MSG( item.IsOk(), wxTreeItemId(), "invalid tree item" ); wxFAIL_MSG("not implemented"); - return NULL; + return wxTreeItemId(); } // ----------------------------------------------------------------------------- @@ -657,7 +666,7 @@ wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text, int image, int selImage, wxTreeItemData *data) { - wxCHECK_MSG( !m_anchor, NULL, "tree can have only one root" ); + wxCHECK_MSG( !m_anchor, wxTreeItemId(), "tree can have only one root" ); wxClientDC dc(this); m_anchor = new wxGenericTreeItem((wxGenericTreeItem *)NULL, text, dc, diff --git a/src/makemsc.env b/src/makemsc.env index e12f7b692b..f21ae55fec 100644 --- a/src/makemsc.env +++ b/src/makemsc.env @@ -51,7 +51,7 @@ DEBUG_FLAGS= LINK_DEBUG_FLAGS= !endif -LIBS=$(WXLIB) $(EXTRALIBS) oldnames libw llibcew commdlg ddeml shell mmsystem $(WXDIR)\src\msw\ctl3d\msvc\ctl3dv2.lib +LIBS=$(WXLIB) $(EXTRALIBS) oldnames libw llibcew commdlg ddeml shell mmsystem ole2 $(WXDIR)\src\msw\ctl3d\msvc\ctl3dv2.lib !if "$(DLL)" == "0" PCH=WX.PCH diff --git a/src/makeprog.msc b/src/makeprog.msc new file mode 100644 index 0000000000..298f229981 --- /dev/null +++ b/src/makeprog.msc @@ -0,0 +1,58 @@ +# +# File: makeprog.msc +# Author: Julian Smart +# Created: 1998 +# Updated: +# +# "%W% %G%" +# +# Include file for 16-bit samples +# Use FINAL=1 argument to nmake to build final version with no debugging +# info + +WXDIR = $(WXWIN) + +!include $(WXDIR)\src\makemsc.env + +!ifndef FINAL +FINAL=0 +!endif + +.cpp.obj: + cl @<< +$(CPPFLAGS) /c /Tp $*.cpp +<< + +all: $(TARGET).exe + +wx: + cd $(WXDIR)\src\msw + nmake -f makefile.dos FINAL=$(FINAL) + cd $(THISDIR) + +wxclean: + cd $(WXDIR)\src\msw + nmake -f makefile.dos clean + cd $(THISDIR) + +$(TARGET).exe: $(WXDIR)\src\msw\dummy.obj $(WXLIB) $(OBJECTS) $(TARGET).def $(TARGET).res + link $(LINKFLAGS) /NOE @<< +$(OBJECTS) $(WXDIR)\src\msw\dummy.obj, +$(TARGET), +NUL, +$(LIBS), +$(TARGET).def +; +<< + rc -K $(TARGET).res + +$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc + rc -r /i$(WXDIR)\include $(TARGET) + +clean: + -erase *.obj + -erase *.exe + -erase *.res + -erase *.map + -erase *.sbr + -erase *.pdb diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp index 86a28418e4..448cec07ea 100644 --- a/src/msw/accel.cpp +++ b/src/msw/accel.cpp @@ -61,7 +61,10 @@ wxAcceleratorRefData::~wxAcceleratorRefData() { if (m_hAccel) { + // This function not available in WIN16 +#ifndef __WIN16__ DestroyAcceleratorTable((HACCEL) m_hAccel); +#endif } m_hAccel = 0 ; } @@ -99,6 +102,8 @@ extern int wxCharCodeWXToMSW(int id, bool *isVirtual); // Create from an array wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]) { + // Not available in WIN16 +#ifndef __WIN16__ m_refData = new wxAcceleratorRefData; ACCEL* arr = new ACCEL[n]; @@ -128,6 +133,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] delete[] arr; M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0); +#endif } bool wxAcceleratorTable::Ok(void) const diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 300ec55493..a1d526fa5c 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -43,6 +43,7 @@ #include "wx/resource.h" #endif +#include #include #include diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 9367a7d761..25997d4c27 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -194,7 +194,11 @@ void wxDC::SetClippingRegion(const wxRegion& region) m_clipX2 = box.x + box.width; m_clipY2 = box.y + box.height; +#ifdef __WIN16__ + SelectClipRgn((HDC) m_hDC, (HRGN) region.GetHRGN()); +#else ExtSelectClipRgn((HDC) m_hDC, (HRGN) region.GetHRGN(), RGN_AND); +#endif } void wxDC::DoClipping(WXHDC dc) @@ -887,11 +891,14 @@ bool wxDC::StartDoc(const wxString& message) #endif #endif +#ifndef __WIN16__ if (ret <= 0) { DWORD lastError = GetLastError(); wxDebugMsg("wxDC::StartDoc failed with error: %d\n", lastError); } +#endif + return (ret > 0); } diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 8759c68272..8f1e6f9db3 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -612,8 +612,10 @@ void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow * WXDWORD extendedStyle = MakeExtendedStyle(style); +#ifndef __WIN16__ if (style & wxFRAME_TOOL_WINDOW) extendedStyle |= WS_EX_TOOLWINDOW; +#endif if (style & wxSTAY_ON_TOP) extendedStyle |= WS_EX_TOPMOST; diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index 2076a1f3d8..b49e6d9348 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -398,7 +398,7 @@ bool wxIniConfig::Flush(bool /* bCurrentOnly */) // delete // ---------------------------------------------------------------------------- -bool wxIniConfig::DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso) +bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso) { // passing NULL as value to WritePrivateProfileString deletes the key if ( !Write(szKey, (const char *)NULL) ) @@ -417,7 +417,7 @@ bool wxIniConfig::DeleteEntry(const char *szKey, bool bGroupIfEmptyAlso) return bOk; } -bool wxIniConfig::DeleteGroup(const char *szKey) +bool wxIniConfig::DeleteGroup(const wxString& szKey) { wxConfigPathChanger path(this, szKey); @@ -432,6 +432,10 @@ bool wxIniConfig::DeleteGroup(const char *szKey) return bOk; } +#ifndef MAX_PATH +#define MAX_PATH 256 +#endif + bool wxIniConfig::DeleteAll() { // first delete our group in win.ini @@ -448,7 +452,7 @@ bool wxIniConfig::DeleteAll() wxString strFile = szBuf; strFile << '\\' << m_strLocalFilename; - if ( !DeleteFile(strFile) ) { + if ( !wxRemoveFile(strFile) ) { wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str()); return FALSE; } diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index f49334d46e..0314a8a54d 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -23,14 +23,12 @@ DUMMYOBJ=dummy.obj # This one overrides the others, to be consistent with the settings in wx_setup.h MINIMAL_WXWINDOWS_SETUP=0 -USE_CTL3D=1 USE_XPM_IN_MSW=0 +USE_CTL3D=1 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1" USE_CTL3D=0 -USE_IMAGE_LOADING_IN_MSW=0 USE_XPM_IN_MSW=0 -USE_GNU_WXSTRING=0 !endif PERIPH_LIBS= @@ -52,24 +50,29 @@ COMMDIR=..\common OLEDIR=.\ole MSWDIR=. -DOCDIR = $(WXDIR)\docs - GENERICOBJS= \ $(GENDIR)\choicdgg.obj \ - $(GENDIR)\colrdlgg.obj \ - $(GENDIR)\fontdlgg.obj \ + $(GENDIR)\dirdlgg.obj \ $(GENDIR)\gridg.obj \ - $(GENDIR)\helpxlp.obj \ - $(GENDIR)\msgdlgg.obj \ + $(GENDIR)\imaglist.obj \ + $(GENDIR)\listctrl.obj \ + $(GENDIR)\notebook.obj \ $(GENDIR)\panelg.obj \ - $(GENDIR)\printps.obj \ - $(GENDIR)\prntdlgg.obj \ $(GENDIR)\scrolwin.obj \ $(GENDIR)\splitter.obj \ $(GENDIR)\statusbr.obj \ $(GENDIR)\tabg.obj \ - $(GENDIR)\textdlgg.obj - + $(GENDIR)\textdlgg.obj\ + $(GENDIR)\treectrl.obj + +# Don't need these generic objects for Windows +# $(GENDIR)\msgdlgg.obj \ +# $(GENDIR)\fontdlgg.obj \ +# $(GENDIR)\colrdlgg.obj \ +# $(GENDIR)\printps.obj \ +# $(GENDIR)\prntdlgg.obj \ +# $(GENDIR)\helpxlp.obj \ + COMMONOBJS = \ $(COMMDIR)\config.obj \ $(COMMDIR)\cmndata.obj \ @@ -81,7 +84,6 @@ COMMONOBJS = \ $(COMMDIR)\filefn.obj \ $(COMMDIR)\framecmn.obj \ $(COMMDIR)\gdicmn.obj \ - $(COMMDIR)\image.obj \ $(COMMDIR)\intl.obj \ $(COMMDIR)\helpbase.obj \ $(COMMDIR)\ipcbase.obj \ @@ -91,7 +93,6 @@ COMMONOBJS = \ $(COMMDIR)\module.obj \ $(COMMDIR)\object.obj \ $(COMMDIR)\odbc.obj \ - $(COMMDIR)\postscrp.obj \ $(COMMDIR)\process.obj \ $(COMMDIR)\prntbase.obj \ $(COMMDIR)\resource.obj \ @@ -118,8 +119,15 @@ COMMONOBJS = \ $(COMMDIR)\extended.obj \ $(COMMDIR)\wincmn.obj -# $(COMMDIR)\fileconf.obj # Doens't compile (nested classes) +# Doesn't compile (nested classes) +# $(COMMDIR)\fileconf.obj\ + +# Fails when including png.h, on jmp_buf. +# $(COMMDIR)\image.obj \ +# Don't need this +# $(COMMDIR)\postscrp.obj \ + MSWOBJS = \ $(MSWDIR)\accel.obj \ $(MSWDIR)\app.obj \ @@ -146,7 +154,6 @@ MSWOBJS = \ $(MSWDIR)\dde.obj \ $(MSWDIR)\dialog.obj \ $(MSWDIR)\dib.obj \ - $(MSWDIR)\dirdlg.obj \ $(MSWDIR)\filedlg.obj \ $(MSWDIR)\font.obj \ $(MSWDIR)\fontdlg.obj \ @@ -155,10 +162,9 @@ MSWOBJS = \ $(MSWDIR)\gdiobj.obj \ $(MSWDIR)\helpwin.obj \ $(MSWDIR)\icon.obj \ - $(MSWDIR)\imaglist.obj \ + $(MSWDIR)\iniconf.obj\ $(MSWDIR)\joystick.obj \ $(MSWDIR)\listbox.obj \ - $(MSWDIR)\listctrl.obj \ $(MSWDIR)\main.obj \ $(MSWDIR)\mdi.obj \ $(MSWDIR)\menu.obj\ @@ -186,18 +192,23 @@ MSWOBJS = \ $(MSWDIR)\tbarmsw.obj \ $(MSWDIR)\textctrl.obj \ $(MSWDIR)\timer.obj \ - $(MSWDIR)\treectrl.obj \ $(MSWDIR)\utils.obj \ $(MSWDIR)\utilsexc.obj \ $(MSWDIR)\wave.obj \ $(MSWDIR)\window.obj \ - $(OLEDIR)\droptgt.obj \ $(OLEDIR)\dropsrc.obj \ - $(OLEDIR)\dataobj.obj \ - $(OLEDIR)\oleutils.obj \ - $(OLEDIR)\uuid.obj + $(OLEDIR)\droptgt.obj +# $(OLEDIR)\automtn.obj \ +# $(OLEDIR)\dataobj.obj \ +# $(OLEDIR)\oleutils.obj \ +# $(OLEDIR)\uuid.obj + +# Not appropriate for 16-bit Windows # $(MSWDIR)\registry.obj \ +# $(MSWDIR)\dirdlg.obj \ +# $(MSWDIR)\treectrl.obj \ +# $(MSWDIR)\listctrl.obj \ OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) @@ -431,6 +442,11 @@ $(MSWDIR)/icon.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(MSWDIR)/iniconf.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(MSWDIR)/imaglist.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) @@ -641,6 +657,11 @@ $(OLEDIR)/uuid.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(OLEDIR)/automtn.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + ######################################################## # Common objects (always compiled) @@ -704,6 +725,11 @@ $(COMMDIR)/helpbase.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(COMMDIR)/image.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(COMMDIR)/intl.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) @@ -909,6 +935,11 @@ $(GENDIR)/colrdlgg.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(GENDIR)/dirdlgg.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(GENDIR)/fontdlgg.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) @@ -919,6 +950,21 @@ $(GENDIR)/gridg.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(GENDIR)/imaglist.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + +$(GENDIR)/listctrl.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + +$(GENDIR)/notebook.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(GENDIR)/helpxlp.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) @@ -969,6 +1015,11 @@ $(GENDIR)/textdlgg.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(GENDIR)/treectrl.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(OBJECTS): $(WXDIR)/include/wx/setup.h # Peripheral components @@ -1005,223 +1056,4 @@ clean: $(PERIPH_CLEAN_TARGET) cleanall: clean -# Making documents -docs: hlp -hlp: wxhlp faqhlp refhlp -wxhlp: $(DOCDIR)/winhelp/wx.hlp -faqhlp: $(DOCDIR)/winhelp/faq.hlp -refhlp: $(DOCDIR)/winhelp/techref.hlp -rtf: $(DOCDIR)/winhelp/wx.rtf -faqrtf: $(DOCDIR)/winhelp/faq.rtf -html: wxhtml faqhtml -wxhtml: $(DOCDIR)\html\wx\wx.htm -faqhtml: $(DOCDIR)\html\faq\faq.htm -ps: faqps wxps referencps -wxps: $(WXDIR)\docs\ps\wx.ps -faqps: $(WXDIR)\docs\ps\faq.ps -referencps: $(WXDIR)\docs\ps\referenc.ps - -alldocs: allhlp allhtml allps - -allhlp: wxhlp faqhlp - nmake -f makefile.dos hlp - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.dos hlp - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.dos hlp - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxbuild\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxgrid\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.dos hlp - -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.dos hlp -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.dos hlp - -allhtml: wxhtml faqhtml - nmake -f makefile.dos html - cd $(WXDIR)\utils\wxprop\src - cd $(THISDIR) - -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\dialoged\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\hytext\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxhelp\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxhelp2\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\tex2rtf\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxgraph\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxchart\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxtree\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.dos html - -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.dos html -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.dos html - -allps: wxps faqps - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxhelp\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxhelp2\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\tex2rtf\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxgraph\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxchart\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxtree\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\wxprop\src - nmake -f makefile.dos ps - cd $(WXDIR)\utils\dialoged\src - nmake -f makefile.dos ps - cd $(THISDIR) - -# cd $(WXDIR)\utils\wxtab\src -# nmake -f makefile.dos ps -# cd $(WXDIR)\utils\prologio\src -# nmake -f makefile.dos ps -# cd $(WXDIR)\utils\wxclips\src -# nmake -f makefile.dos ps -# cd $(WXDIR)\utils\clips2c\src -# nmake -f makefile.dos ps - -$(DOCDIR)/winhelp/wx.hlp: $(DOCDIR)/latex/wx/wx.rtf $(DOCDIR)/latex/wx/wx.hpj - cd $(DOCDIR)/latex/wx - -erase wx.ph - hc wx - move wx.hlp $(DOCDIR)\winhelp\wx.hlp - move wx.cnt $(DOCDIR)\winhelp\wx.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/faq.hlp: $(DOCDIR)/latex/faq/faq.rtf $(DOCDIR)/latex/faq/faq.hpj - cd $(DOCDIR)/latex/faq - -erase faq.ph - hc faq - move faq.hlp $(DOCDIR)\winhelp\faq.hlp - move faq.cnt $(DOCDIR)\winhelp\faq.cnt - cd $(THISDIR) - -$(DOCDIR)/winhelp/techref.hlp: $(DOCDIR)/latex/techref/techref.rtf $(DOCDIR)/latex/techref/techref.hpj - cd $(DOCDIR)/latex/techref - -erase techref.ph - hc techref - move techref.hlp $(DOCDIR)\winhelp\techref.hlp - move techref.cnt $(DOCDIR)\winhelp\techref.cnt - cd $(THISDIR) - -$(DOCDIR)/latex/wx/wx.rtf: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/manual.tex - cd $(DOCDIR)\latex\wx - -start /w tex2rtf $(DOCDIR)/latex/wx/manual.tex $(DOCDIR)/latex/wx/wx.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/faq/faq.rtf: $(DOCDIR)/latex/faq/faq.tex - cd $(DOCDIR)\latex\faq - -start /w tex2rtf $(DOCDIR)/latex/faq/faq.tex $(DOCDIR)/latex/faq/faq.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)/latex/techref/techref.rtf: $(DOCDIR)/latex/techref/techref.tex - cd $(DOCDIR)\latex\techref - -start /w tex2rtf $(DOCDIR)/latex/techref/techref.tex $(DOCDIR)/latex/techref/techref.rtf -twice -winhelp - cd $(THISDIR) - -$(DOCDIR)\html\wx\wx.htm: $(DOCDIR)\latex\wx\classes.tex $(DOCDIR)\latex\wx\body.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)\latex\wx\manual.tex - cd $(DOCDIR)\latex\wx - -mkdir $(DOCDIR)\html\wx - -start /w tex2rtf $(DOCDIR)\latex\wx\manual.tex $(DOCDIR)\html\wx\wx.htm -twice -html -macros $(DOCDIR)\tex2rtf.ini - -erase $(DOCDIR)\html\wx\*.con - -erase $(DOCDIR)\html\wx\*.ref - -erase $(DOCDIR)\latex\wx\*.con - -erase $(DOCDIR)\latex\wx\*.ref - cd $(THISDIR) - -$(DOCDIR)\html\faq\faq.htm: $(DOCDIR)\latex\faq\faq.tex - cd $(DOCDIR)\latex\faq - -mkdir $(DOCDIR)\html\faq - -start /w tex2rtf $(DOCDIR)\latex\faq\faq.tex $(DOCDIR)\html\faq\faq.htm -twice -html -macros $(DOCDIR)\tex2rtf.ini - -erase $(DOCDIR)\html\faq\*.con - -erase $(DOCDIR)\html\faq\*.ref - -erase $(DOCDIR)\latex\faq\*.con - -erase $(DOCDIR)\latexfaq\*.ref - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\manual.dvi: $(DOCDIR)/latex/wx/body.tex $(DOCDIR)/latex/wx/manual.tex - cd $(WXDIR)\docs\latex\wx - -latex manual - -latex manual - -makeindx manual - -bibtex manual - -latex manual - -latex manual - cd $(THISDIR) - -$(WXDIR)\docs\ps\wx.ps: $(WXDIR)\docs\latex\wx\manual.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o wx.ps manual - move wx.ps $(WXDIR)\docs\ps\wx.ps - cd $(THISDIR) - -$(WXDIR)\docs\latex\wx\referenc.dvi: $(DOCDIR)/latex/wx/classes.tex $(DOCDIR)/latex/wx/topics.tex $(DOCDIR)/latex/wx/referenc.tex - cd $(WXDIR)\docs\latex\wx - -latex referenc - -latex referenc - -makeindx referenc - -bibtex referenc - -latex referenc - -latex referenc - cd $(THISDIR) - -$(WXDIR)\docs\ps\referenc.ps: $(WXDIR)\docs\latex\wx\referenc.dvi - cd $(WXDIR)\docs\latex\wx - -dvips32 -o referenc.ps referenc - move referenc.ps $(WXDIR)\docs\ps\referenc.ps - cd $(THISDIR) - -$(WXDIR)\docs\latex\faq\faq.dvi: $(DOCDIR)/latex/faq/faq.tex - cd $(WXDIR)\docs\latex\faq - -latex faq - -latex faq - -makeindx faq - -latex faq - -latex faq - cd $(THISDIR) - -$(WXDIR)\docs\ps\faq.ps: $(WXDIR)\docs\latex\faq\faq.dvi - cd $(WXDIR)\docs\latex\faq - -dvips32 -o faq.ps faq - move faq.ps $(WXDIR)\docs\ps\faq.ps - cd $(THISDIR) - diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp index 15dd0eafae..99104456ff 100644 --- a/src/msw/tbarmsw.cpp +++ b/src/msw/tbarmsw.cpp @@ -339,14 +339,13 @@ wxToolBarTool *wxToolBarMSW::AddTool(int index, const wxBitmap& bitmap, const wx // TODO: use the mapping code from wxToolBar95 to get it right in this class #if !defined(__WIN32__) && !defined(__WIN386__) - wxBitmap *bitmap2 = NULL; + wxBitmap bitmap2; if (toggle) { - bitmap2 = new wxBitmap; - bitmap2->SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP())); + bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP())); } - wxToolBarTool *tool = new wxToolBarTool(index, bitmap, *bitmap2, toggle, xPos, yPos, helpString1, helpString2); + wxToolBarTool *tool = new wxToolBarTool(index, bitmap, bitmap2, toggle, xPos, yPos, helpString1, helpString2); #else wxToolBarTool *tool = new wxToolBarTool(index, bitmap, wxNullBitmap, toggle, xPos, yPos, helpString1, helpString2); #endif diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index fdb322892c..88a1de8e60 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -72,7 +72,7 @@ //// BEGIN for console support: VC++ only -#if defined(__WXDEBUG__) && defined(_MSC_VER) && !defined(__NO_VC_CRTDBG__) +#if defined(__WXDEBUG__) && !defined(__WIN16__) && defined(_MSC_VER) && !defined(__NO_VC_CRTDBG__) #define wxUSE_VC_CRTDBG #else #undef wxUSE_VC_CRTDBG @@ -106,7 +106,9 @@ # undef new # endif +#ifndef __WIN16__ # include +#endif # if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS # define new new(__FILE__,__LINE__) -- 2.45.2