From ad2fbd102d81705e7632d52df68c49643ce8d132 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 17 Apr 2000 09:28:18 +0000 Subject: [PATCH] Removed a memory leak in fs_zip.cpp; trivial formatting in helpdata.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/function.tex | 2 +- docs/latex/wx/window.tex | 5 +++++ samples/help/makefile.vc | 1 + src/common/fs_zip.cpp | 7 ++++++- src/html/helpdata.cpp | 8 ++++---- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index 351af3fd18..9105ec6798 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -86,7 +86,7 @@ slashes. Returns TRUE if the file exists. It also returns TRUE if the file is a directory. -\membersection{::wxFileModificationTime} +\membersection{::wxFileModificationTime}\label{wxfilemodificationtime} \func{time\_t}{wxFileModificationTime}{\param{const wxString\& }{filename}} diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 19143b959e..759a7ecd8a 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -1534,6 +1534,11 @@ Note that the size passed is of the whole window: call \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} for the area which may be used by the application. +When a window is resized, usually only a small part of the window is damaged and you +may only need to repaint that area. However, if your drawing depends on the size of the window, +you may need to clear the DC explicitly and repaint the whole window. In which case, you +may need to call \helpref{wxWindow::Refresh}{wxwindowrefresh} to invalidate the entire window. + \wxheading{See also} \helpref{wxSizeEvent}{wxsizeevent},\rtfsp diff --git a/samples/help/makefile.vc b/samples/help/makefile.vc index 3cbe3b33c2..723b606f7e 100644 --- a/samples/help/makefile.vc +++ b/samples/help/makefile.vc @@ -12,6 +12,7 @@ WXDIR = $(WXWIN) PROGRAM=demo +EXTRALIBS=htmlhelp.lib OBJECTS = $(PROGRAM).obj !include $(WXDIR)\src\makeprog.vc diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index 438a20a2b2..8a41c21b6b 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -85,7 +85,12 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l GetAnchor(location), wxDateTime(wxFileModificationTime(left))); } - else return NULL; + else + { + if (s) + delete s; + return NULL; + } } diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 53759bc2e7..22a9a1850c 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -538,10 +538,10 @@ bool wxHtmlHelpData::AddBook(const wxString& book) fi = fsys.OpenFile(bookFull); if (fi == NULL) - { - wxLogError(_("Cannot open HTML help book: %s"), bookFull.c_str()); - return FALSE; - } + { + wxLogError(_("Cannot open HTML help book: %s"), bookFull.c_str()); + return FALSE; + } fsys.ChangePathTo(bookFull); s = fi -> GetStream(); sz = s -> GetSize();