]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/mstream.cpp
buttons now become default when they have focus
[wxWidgets.git] / src / common / mstream.cpp
index 35e384bade7a58e8c2bd39878faf28d28469107d..c9f23704668d4a52def03835fa52ec7abc53921a 100644 (file)
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
-#include <stdlib.h>
-#include <wx/stream.h>
-#include <wx/mstream.h>
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+  #pragma hdrstop
 #endif
 
+#ifndef WX_PRECOMP
+  #include "wx/defs.h"
+#endif
+
+#if wxUSE_STREAMS
+
+#include <stdlib.h>
+#include <wx/stream.h>
+#include <wx/mstream.h>
+
 // ----------------------------------------------------------------------------
 // wxMemoryInputStream
 // ----------------------------------------------------------------------------
@@ -31,7 +38,9 @@ wxMemoryInputStream::wxMemoryInputStream(const char *data, size_t len)
   : wxInputStream()
 {
   m_i_streambuf->SetBufferIO((char*) data, (char*) (data+len));
+  m_i_streambuf->SetIntPosition(0); // seek to start pos
   m_i_streambuf->Fixed(TRUE);
+  m_length = len;
 }
 
 wxMemoryInputStream::~wxMemoryInputStream()
@@ -58,3 +67,5 @@ wxMemoryOutputStream::wxMemoryOutputStream(char *data, size_t len)
 wxMemoryOutputStream::~wxMemoryOutputStream()
 {
 }
+
+#endif