Move strings to resources.
This commit is contained in:
parent
87b297ebc2
commit
b5ec066d99
|
@ -19,6 +19,12 @@
|
||||||
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
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 */
|
/* FIXME: This should be in shdoclc.dll */
|
||||||
|
|
||||||
IDR_BROWSE_CONTEXT_MENU MENU
|
IDR_BROWSE_CONTEXT_MENU MENU
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* 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 IDR_BROWSE_CONTEXT_MENU 24641
|
||||||
|
|
||||||
#define IDM_COPY 15
|
#define IDM_COPY 15
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
@ -37,8 +38,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
||||||
|
|
||||||
static const WCHAR wszInternetExplorer_Server[] =
|
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};
|
{'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;
|
static ATOM serverwnd_class = 0;
|
||||||
|
|
||||||
|
@ -48,6 +47,9 @@ static void paint_disabled(HWND hwnd) {
|
||||||
HBRUSH brush;
|
HBRUSH brush;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
HFONT font;
|
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);
|
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));
|
brush = CreateSolidBrush(RGB(255,255,255));
|
||||||
|
@ -57,8 +59,7 @@ static void paint_disabled(HWND hwnd) {
|
||||||
SelectObject(hdc, font);
|
SelectObject(hdc, font);
|
||||||
SelectObject(hdc, brush);
|
SelectObject(hdc, brush);
|
||||||
Rectangle(hdc, rect.left, rect.top, rect.right, rect.bottom);
|
Rectangle(hdc, rect.left, rect.top, rect.right, rect.bottom);
|
||||||
DrawTextA(hdc, "HTML rendering is currently disabled.",-1, &rect,
|
DrawTextW(hdc, wszHTMLDisabled,-1, &rect, DT_CENTER | DT_SINGLELINE | DT_VCENTER);
|
||||||
DT_CENTER | DT_SINGLELINE | DT_VCENTER);
|
|
||||||
EndPaint(hwnd, &ps);
|
EndPaint(hwnd, &ps);
|
||||||
|
|
||||||
DeleteObject(font);
|
DeleteObject(font);
|
||||||
|
@ -375,7 +376,10 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
|
||||||
|
|
||||||
hres = IOleInPlaceSite_OnUIActivate(This->ipsite);
|
hres = IOleInPlaceSite_OnUIActivate(This->ipsite);
|
||||||
if(SUCCEEDED(hres)) {
|
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 {
|
}else {
|
||||||
FIXME("OnUIActivate failed: %08lx\n", hres);
|
FIXME("OnUIActivate failed: %08lx\n", hres);
|
||||||
IOleInPlaceFrame_Release(This->frame);
|
IOleInPlaceFrame_Release(This->frame);
|
||||||
|
|
Loading…
Reference in New Issue