]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/html/virtual/virtual.cpp
Fix so the value given to wxTextEntryDialog::SetValue will actually be
[wxWidgets.git] / samples / html / virtual / virtual.cpp
index 99e848ee55652b2fd8bc4bcdf65432c44f8ec17a..8672b7b277efcae8cb9f7686f60baa658b5e91f7 100644 (file)
@@ -10,7 +10,7 @@
 #endif
 
 // For compilers that support precompilation, includes "wx/wx.h".
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
     #pragma hdrstop
 // for all others, include the necessary headers (this file is usually all you
 // need because it includes almost all "standard" wxWindows headers
 #ifndef WX_PRECOMP
-    #include <wx/wx.h>
+    #include "wx/wx.h"
 #endif
 
 
-#include <wx/html/htmlwin.h>
+#include "wx/html/htmlwin.h"
 
 
 // new handler class:
 
-#include <wx/wfstream.h>
-#include <wx/mstream.h>
+#include "wx/wfstream.h"
+#include "wx/mstream.h"
 
 
 
@@ -63,8 +63,11 @@ wxFSFile* MyVFS::OpenFile(wxFileSystem& fs, const wxString& location)
                  "<a href=\"%s-3\">sub-3</a><br>"
                  "</blockquote></body></html>",
                  location.GetData(), location.GetData(), location.GetData(), location.GetData());
+
+    // WARNING: wxMemoryInputStream will not free buf.
+    // There is a memory leak here.
     str = new wxMemoryInputStream(buf, strlen(buf));
-    f = new wxFSFile(str, location, "text/html", wxEmptyString);
+    f = new wxFSFile(str, location, "text/html", wxEmptyString, wxDateTime::Today());
     return f;
 }
 
@@ -196,7 +199,7 @@ wxHtmlWindow *html;
     // ... and attach this menu bar to the frame
       SetMenuBar(menuBar);
    
-      CreateStatusBar(1);
+      CreateStatusBar(2);
 
       html = new wxHtmlWindow(this);
       html -> SetRelatedFrame(this, "VFS Demo: '%s'");