Further fixes to Dialog Editor; additions to .dsp files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: mse/utils.cpp
|
||||
// Name: msw/utils.cpp
|
||||
// Purpose: Various utilities
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -876,7 +876,14 @@ wxChar *wxLoadUserResource(const wxString& resourceName, const wxString& resourc
|
||||
if ( !theText )
|
||||
return NULL;
|
||||
|
||||
wxChar *s = copystring(theText);
|
||||
// Not all compilers put a zero at the end of the resource (e.g. BC++ doesn't).
|
||||
// so we need to find the length of the resource.
|
||||
int len = ::SizeofResource(wxGetInstance(), hResource);
|
||||
wxChar *s = new wxChar[len+1];
|
||||
wxStrncpy(s,theText,len);
|
||||
s[len]=0;
|
||||
|
||||
// wxChar *s = copystring(theText);
|
||||
|
||||
// Obsolete in WIN32
|
||||
#ifndef __WIN32__
|
||||
|
Reference in New Issue
Block a user