Revert the rev 34 change to webkit_glue::GetLocalizedString() which broke resource loading.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@36 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2009-08-21 02:01:13 +00:00
parent 65b06ebf66
commit f341b9f439
1 changed files with 7 additions and 7 deletions

View File

@ -33,17 +33,17 @@ using WebKit::WebSize;
namespace webkit_glue { namespace webkit_glue {
#define MAX_LOADSTRING 100
string16 GetLocalizedString(int message_id) { string16 GetLocalizedString(int message_id) {
wchar_t localized[MAX_LOADSTRING]; // Localized resources are provided via webkit_resources.rc and
int length = LoadString(GetModuleHandle(NULL), message_id, // webkit_strings_en-US.rc.
localized, MAX_LOADSTRING); const ATLSTRINGRESOURCEIMAGE* image =
if (!length && GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND) { AtlGetStringResourceImage(_AtlBaseModule.GetModuleInstance(),
message_id);
if (!image) {
NOTREACHED(); NOTREACHED();
return L"No string for this identifier!"; return L"No string for this identifier!";
} }
return string16(localized, length); return string16(image->achString, image->nLength);
} }
HCURSOR LoadCursor(int cursor_id) { HCURSOR LoadCursor(int cursor_id) {