]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utils.cpp
Applied patch [ 774837 ] OGL wxLineShape::HitTest: smaller region
[wxWidgets.git] / src / msw / utils.cpp
index ca408de0a6bfeb2dd38bd1b2543d49b309c7ec9c..4ba9ff2a28917149e8eeb0e7758b40a616edd212 100644 (file)
@@ -408,8 +408,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
 
     wxString strPath;
     ::GetModuleFileName(::GetModuleHandle(NULL),
 
     wxString strPath;
     ::GetModuleFileName(::GetModuleHandle(NULL),
-                        strPath.GetWriteBuf(MAX_PATH), MAX_PATH);
-    strPath.UngetWriteBuf();
+                        wxStringBuffer(strPath, MAX_PATH), MAX_PATH);
 
     // extract the dir name
     wxSplitPath(strPath, &strDir, NULL, NULL);
 
     // extract the dir name
     wxSplitPath(strPath, &strDir, NULL, NULL);
@@ -593,8 +592,8 @@ bool wxGetEnv(const wxString& var, wxString *value)
 
     if ( value )
     {
 
     if ( value )
     {
-        (void)::GetEnvironmentVariable(var, value->GetWriteBuf(dwRet), dwRet);
-        value->UngetWriteBuf();
+        (void)::GetEnvironmentVariable(var, wxStringBuffer(*value, dwRet),
+                                       dwRet);
     }
 
     return TRUE;
     }
 
     return TRUE;