From c0bcc480680ecdf368839c119f5e984df757f893 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 14 Mar 2000 11:25:54 +0000 Subject: [PATCH] Fixed crash-on-exit bug due to status bar being deleted twice (MDI apps); small changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/bitmap.tex | 2 +- docs/latex/wx/spinctrl.tex | 11 ++--------- docs/latex/wx/wx.hpj | 2 +- docs/msw/bc_ide.txt | 34 +++++++++++++++++++--------------- docs/msw/install.txt | 13 +++++++++---- src/common/unzip.c | 2 +- src/common/unzip.h | 2 +- src/generic/sashwin.cpp | 6 +++++- src/generic/splitter.cpp | 8 +++++++- src/msw/mdi.cpp | 1 + 10 files changed, 47 insertions(+), 34 deletions(-) diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index 0fffc0a71a..fa15dd36d3 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -199,7 +199,7 @@ Deletes all bitmap handlers. This function is called by wxWindows on exit. -\membersection{wxBitmap::Create} +\membersection{wxBitmap::Create}\label{wxbitmapcreate} \func{virtual bool}{Create}{\param{int}{ width}, \param{int}{ height}, \param{int}{ depth = -1}} diff --git a/docs/latex/wx/spinctrl.tex b/docs/latex/wx/spinctrl.tex index f72c25c168..44570693f6 100644 --- a/docs/latex/wx/spinctrl.tex +++ b/docs/latex/wx/spinctrl.tex @@ -3,7 +3,6 @@ % spinctrl.h at 11/Mar/00 00:22:05 % - \section{\class{wxSpinCtrl}}\label{wxspinctrl} wxSpinCtrl combines \helpref{wxTextCtrl}{wxtextctrl} and @@ -34,29 +33,24 @@ To process input from a spin button, use one of these event handler macros to di functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument: \twocolwidtha{7cm} -\begin{twocollist} +\begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_SPINCTRL(id, func)}}{Generated whenever spinctrl is updated} \end{twocollist}% - \wxheading{See also} \helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxSpinButton}{wxspinbutton}, \helpref{wxControl}{wxcontrol} - \latexignore{\rtfignore{\wxheading{Members}}} - \membersection{wxSpinCtrl::wxSpinCtrl}\label{wxspinctrlwxspinctrl} \func{}{wxSpinCtrl}{\void} Default constructor. -\membersection{wxSpinCtrl::wxSpinCtrl}\label{wxspinctrlwxspinctrl} - \func{}{wxSpinCtrl}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = -1}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSP\_ARROW\_KEYS}, \param{int }{min = 0}, \param{int }{max = 100}, \param{int }{initial = 0}, \param{const wxString\& }{name = \_T("wxSpinCtrl")}} Constructor, creating and showing a spin control. @@ -87,14 +81,13 @@ Constructor, creating and showing a spin control. \helpref{wxSpinCtrl::Create}{wxspinctrlcreate} - \membersection{wxSpinCtrl::Create}\label{wxspinctrlcreate} \func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = -1}, \param{const wxString\& }{value = wxEmptyString}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = wxSP\_ARROW\_KEYS}, \param{int }{min = 0}, \param{int }{max = 100}, \param{int }{initial = 0}, \param{const wxString\& }{name = \_T("wxSpinCtrl")}} Creation function called by the spin control constructor. -See \helpref{wxSpinCtrl::wxSpinCtrl}{wxspinctrlwxspinctrl} for details. +See \helpref{wxSpinCtrl::wxSpinCtrl}{wxspinctrlwxspinctrl} for details. \membersection{wxSpinCtrl::SetValue}\label{wxspinctrlsetvalue} diff --git a/docs/latex/wx/wx.hpj b/docs/latex/wx/wx.hpj index 43d8c37176..5bf567ae88 100644 --- a/docs/latex/wx/wx.hpj +++ b/docs/latex/wx/wx.hpj @@ -1,5 +1,5 @@ [OPTIONS] -BMROOT=d:\wx2\wxWindows\docs\latex\wx ; Assume that bitmaps are where the source is +BMROOT=d:\wx2\wxWind~1\docs/latex/wx ; Assume that bitmaps are where the source is TITLE=wxWindows Manual CONTENTS=Contents COMPRESS=HIGH diff --git a/docs/msw/bc_ide.txt b/docs/msw/bc_ide.txt index c1aa6e37c7..d0e0e59b7f 100644 --- a/docs/msw/bc_ide.txt +++ b/docs/msw/bc_ide.txt @@ -1,15 +1,15 @@ Readme for wxWindows 2.0 Ide-files First release Feb. 1999, detlev@reymann-online.de -1. What you can do with this ide-files +1. What you can do with this IDE files 2. Where to install the files 3. How to modify them for your own needs -4. How to create ide-files for your own wxWindows-programs +4. How to create IDE files for your own wxWindows-programs -1. What you can do with this ide-files +1. What you can do with this IDE files ====================================== -There are two ide-files. src\bc32.ide should help you to +There are two IDE files. src\bc32.ide should help you to create the wxWindows libraries from within the Ide of Borlands C++, v. 5.x. Note that this doesn't include debugging code: you need to change the settings if you wish to include debug @@ -42,9 +42,11 @@ To add a new sample to samples\bc32.ide, follow these steps: a. Choose Project->New target... and type in e.g. samples\newsample. Press OK. -b. Static, no OWL, MFC or class libraries. Press OK. +b. Static, no OWL, MFC or class libraries. Check Multithread + on. Press OK. c. Right-click on the new node, choose Add node... and add - ..\lib\wx32.lib. Add any other source files you require. + ..\lib\wx32.lib and ..\lib\xpm.lib. Add any other source + files you require. d. Right-click on the new node, choose Edit Local Options.. and add in Directories, specify the following: @@ -54,23 +56,25 @@ d. Right-click on the new node, choose Edit Local Options.. and Intermediate: .\newsample Final: .\newsample -4. How to create ide-files for your own wxWindows-programs +4. How to create IDE files for your own wxWindows-programs ========================================================== I think you are familiar with the necessary options for your own -programm. So I will only describe what is neccessary to link -yout programm with the wxWindows-library. If you want to create -a ide-file for your own wxWindows-program, create a new project +program. So I will only describe what is neccessary to link +yout program with the wxWindows library. If you want to create +an IDE file for your own wxWindows program, create a new project from the menu file->new->project. Deactivate all the -standard-options, the only two thing that should be activated is +standard-options, the only three thing that should be activated is "static" for the libraries, if you want to use the library -produced with the library-ide and the checkbox OLE (You can +produced with the library-ide, the checkbox OLE (you can leave this checkbox unchecked, but then you have to add the -library \bc5\lib\ole2w32.lib to your project). You have to add +library \bc5\lib\ole2w32.lib to your project), and the +Multithread checkbox. You have to add the include-path of wxWindows to the include-path in the options-dialog (options->project->directories->include). The result should be something like: path_of_my_program;\bc5\include;\wxwin2\include; Then you have to add the libraries to the project. Open the project-view and -activate your programm. Then right-click and choose "add" and -select the wxWindows-library (e.g. \wxwin\lib\wx32.lib). \ No newline at end of file +activate your program. Then right-click and choose "add" and +select the wxWindows library (e.g. \wxwin\lib\wx32.lib). Also +add the xpm library. diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 3521834eea..dfe44b62ec 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -211,7 +211,7 @@ Compiling using the makefiles: 2. Change directory to wx\src\msw. Type 'make -f makefile.b32' to make the wxWindows core library. Ignore the warnings about 'XXX' not found in library. -3. Change directory to a sample such as minimal, and type +3. Change directory to a sample or demo such as samples\minimal, and type 'make -f makefile.b32'. 4. For release versions, recompile wxWindows and samples using 'make -f makefile.b32 clean' @@ -259,11 +259,16 @@ Compiling using the IDE files: since some (notably the wxHTML samples) look for files relative to the working directory. -Note that to make the png, xpm, zlib and jpeg libraries (needed for +Note (1): the samples project file contains a selection of +samples, and not all samples. The remaining samples can be made +with the makefiles. See also the demos hierarchy which doesn't +have any BC++ project files yet. + +Note (2): to make the png, xpm, zlib, jpeg and tiff libraries (needed for some samples) you need to compile them with bc32.ide. -The debug version of the wxWindows library is about 37 MB, and the -release version is around 3 MB. +Note (3): the debug version of the wxWindows library is about 40 MB, and the +release version is around 5 MB. See also the file bc_ide.txt for further instructions and details of how to create your own project files. diff --git a/src/common/unzip.c b/src/common/unzip.c index 20d33af180..c78982488c 100644 --- a/src/common/unzip.c +++ b/src/common/unzip.c @@ -144,7 +144,7 @@ typedef struct file if we are decompressing it */ } unz_s; -#if defined (__VISAGECPP__) +#if defined (__VISAGECPP__) || defined(__BORLANDC__) /* VA always requires prototypes */ int unzlocal_CheckCurrentFileCoherencyHeader (unz_s*, uInt*, uLong*, uInt*); #endif diff --git a/src/common/unzip.h b/src/common/unzip.h index cb37bef325..494beebfc4 100644 --- a/src/common/unzip.h +++ b/src/common/unzip.h @@ -275,7 +275,7 @@ extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file, the error code */ -#if defined(__VISAGECPP__) +#if defined(__VISAGECPP__) || defined(__BORLANDC__) /*Visualage complains of no prototypes*/ int unzlocal_getByte(FILE* , int*); int strcmpcasenosensitive_internal (const char*, const char*); diff --git a/src/generic/sashwin.cpp b/src/generic/sashwin.cpp index a443cc9f07..5f0bbe3ba1 100644 --- a/src/generic/sashwin.cpp +++ b/src/generic/sashwin.cpp @@ -304,6 +304,10 @@ void wxSashWindow::OnMouseEvent(wxMouseEvent& event) SetCursor(*m_sashCursorNS); } } + else + { + SetCursor(* wxSTANDARD_CURSOR); + } } else if ( event.Dragging() && ((m_dragMode == wxSASH_DRAG_DRAGGING) || @@ -520,7 +524,7 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc) // Draw a drak grey line on the top to indicate that the // sash is raised dc.SetPen(mediumShadowPen); - dc.DrawLine(1, GetEdgeMargin(edge), w, GetEdgeMargin(edge)); + dc.DrawLine(1, GetEdgeMargin(edge), w-1, GetEdgeMargin(edge)); } } } diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 6f45254813..60ffc6dc72 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -283,9 +283,15 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) SetCursor(*m_sashCursorNS); } } -#ifdef __WXGTK__ +#if defined(__WXGTK__) || defined(__WXMSW__) else { + // We must set the normal cursor in MSW, because + // if the child window doesn't have a cursor, the + // parent's (splitter window) will be used, and this + // must be the standard cursor. + wxLogDebug("wxSplitterWindow: Setting to standard cursor"); + // where else do we unset the cursor? SetCursor(* wxSTANDARD_CURSOR); } diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 25cf16bbce..25b5282c7e 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -230,6 +230,7 @@ wxMDIParentFrame::~wxMDIParentFrame() DestroyChildren(); // already delete by DestroyChildren() m_frameToolBar = NULL; + m_frameStatusBar = NULL; // ::DestroyMenu((HMENU)m_windowMenu); if (m_windowMenu) -- 2.45.2