mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
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:
+3
-3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user