MSHTML: Move strings to resources

Jacek Caban jack at itma.pwr.wroc.pl
Sat Aug 27 09:57:06 CDT 2005


Is 'rendering' good word here?

Changelog:
    Move strings to resources
-------------- next part --------------
Index: dlls/mshtml/En.rc
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/En.rc,v
retrieving revision 1.1
diff -u -p -r1.1 En.rc
--- dlls/mshtml/En.rc	26 Aug 2005 08:46:37 -0000	1.1
+++ dlls/mshtml/En.rc	27 Aug 2005 12:52:26 -0000
@@ -19,6 +19,12 @@
 
 LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
 
+STRINGTABLE DISCARDABLE
+{
+    IDS_HTMLDISABLED    "HTML rendering is currently disabled."
+    IDS_HTMLDOCUMENT    "HTML Document"
+}
+
 /* FIXME: This should be in shdoclc.dll */
 
 IDR_BROWSE_CONTEXT_MENU MENU
Index: dlls/mshtml/resource.h
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/resource.h,v
retrieving revision 1.1
diff -u -p -r1.1 resource.h
--- dlls/mshtml/resource.h	26 Aug 2005 08:46:37 -0000	1.1
+++ dlls/mshtml/resource.h	27 Aug 2005 12:52:26 -0000
@@ -16,6 +16,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define IDS_HTMLDISABLED    7500
+#define IDS_HTMLDOCUMENT    7501
+
 #define IDR_BROWSE_CONTEXT_MENU  24641
 
 #define IDM_COPY        15
Index: dlls/mshtml/view.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/view.c,v
retrieving revision 1.16
diff -u -p -r1.16 view.c
--- dlls/mshtml/view.c	26 Aug 2005 10:05:52 -0000	1.16
+++ dlls/mshtml/view.c	27 Aug 2005 12:52:26 -0000
@@ -28,6 +28,7 @@
 #include "winuser.h"
 #include "wingdi.h"
 #include "ole2.h"
+#include "resource.h"
 
 #include "wine/debug.h"
 
@@ -37,8 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
 
 static const WCHAR wszInternetExplorer_Server[] =
     {'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','_','S','e','r','v','e','r',0};
-static const WCHAR wszHTML_Document[] =
-    {'H','T','M','L',' ','D','o','c','u','m','e','n','t',0};
 
 static ATOM serverwnd_class = 0;
 
@@ -48,6 +47,9 @@ static void paint_disabled(HWND hwnd) {
     HBRUSH brush;
     RECT rect;
     HFONT font;
+    WCHAR wszHTMLDisabled[100];
+
+    LoadStringW(hInst, IDS_HTMLDISABLED, wszHTMLDisabled, sizeof(wszHTMLDisabled)/sizeof(WCHAR));
 
     font = CreateFontA(25,0,0,0,400,0,0,0,ANSI_CHARSET,0,0,DEFAULT_QUALITY,DEFAULT_PITCH,NULL);
     brush = CreateSolidBrush(RGB(255,255,255));
@@ -57,8 +59,7 @@ static void paint_disabled(HWND hwnd) {
     SelectObject(hdc, font);
     SelectObject(hdc, brush);
     Rectangle(hdc, rect.left, rect.top, rect.right, rect.bottom);
-    DrawTextA(hdc, "HTML rendering is currently disabled.",-1, &rect,
-            DT_CENTER | DT_SINGLELINE | DT_VCENTER);
+    DrawTextW(hdc, wszHTMLDisabled,-1, &rect, DT_CENTER | DT_SINGLELINE | DT_VCENTER);
     EndPaint(hwnd, &ps);
 
     DeleteObject(font);
@@ -375,7 +376,10 @@ static HRESULT WINAPI OleDocumentView_UI
 
         hres = IOleInPlaceSite_OnUIActivate(This->ipsite);
         if(SUCCEEDED(hres)) {
-            IOleInPlaceFrame_SetActiveObject(This->frame, ACTOBJ(This), wszHTML_Document);
+            OLECHAR wszHTMLDocument[30];
+            LoadStringW(hInst, IDS_HTMLDOCUMENT, wszHTMLDocument,
+                    sizeof(wszHTMLDocument)/sizeof(WCHAR));
+            IOleInPlaceFrame_SetActiveObject(This->frame, ACTOBJ(This), wszHTMLDocument);
         }else {
             FIXME("OnUIActivate failed: %08lx\n", hres);
             IOleInPlaceFrame_Release(This->frame);


More information about the wine-patches mailing list