Localisation, using Locale class

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@113 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-12 16:09:05 +00:00
parent c2a03bc445
commit ca42f31ccc
24 changed files with 540 additions and 40 deletions
+3 -3
View File
@@ -76,13 +76,13 @@ Image load_resource_image(const String& name) {
// based on wxLoadUserResource
// The image can be in an IMAGE resource, in any file format
HRSRC hResource = ::FindResource(wxGetInstance(), name, _("IMAGE"));
if ( hResource == 0 ) throw InternalError(_("Resource not found: ") + name);
if ( hResource == 0 ) throw InternalError(String::Format(_("Resource not found: %s"), name));
HGLOBAL hData = ::LoadResource(wxGetInstance(), hResource);
if ( hData == 0 ) throw InternalError(_("Resource not an image: ") + name);
if ( hData == 0 ) throw InternalError(String::Format(_("Resource not an image: %s"), name));
char* data = (char *)::LockResource(hData);
if ( !data ) throw InternalError(_("Resource cannot be locked: ") + name);
if ( !data ) throw InternalError(String::Format(_("Resource cannot be locked: %s"), name));
int len = ::SizeofResource(wxGetInstance(), hResource);
wxMemoryInputStream stream(data, len);