]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Added OLE automation sample, changed BC++ makefiles
[wxWidgets.git] / src / common / utilscmn.cpp
index cb7890e7a8dd666d256acd63895bcd00fd4db1b9..d845ed71da1df03f7503839075bbe8ba81b8f6e7 100644 (file)
 
 #if wxUSE_IOSTREAMH
 #include <iostream.h>
+#include <fstream.h>
 #else
 #include <iostream>
+#include <fstream>
+#  ifdef _MSC_VER
+      using namespace std;
+#  endif
 #endif
 
-#include <fstream.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -386,6 +390,14 @@ char *wxStripMenuCodes (char *in, char *out)
   return tmpOut;
 }
 
+wxString wxStripMenuCodes(const wxString& str)
+{
+    char *buf = new char[str.Length() + 1];
+    wxStripMenuCodes((char*) (const char*) str, buf);
+    wxString str1(buf);
+    delete[] buf;
+    return str1;
+}
 
 /*
  * Window search functions
@@ -520,7 +532,11 @@ wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& i
  
 wxDebugStreamBuf::wxDebugStreamBuf(void)
 {
-  if (allocate()) setp(base(),ebuf());
+       // <iostream> usage doesn't need this, and i have no idea how to simulate it.
+#if wxUSE_IOSTREAMH
+       if (allocate())
+         setp(base(),ebuf());
+#endif
 }
 
 int wxDebugStreamBuf::overflow(int WXUNUSED(i))