Jacek Caban : mshtml: Added alert implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Dec 12 14:29:50 CST 2006
Module: wine
Branch: master
Commit: 62f1ef9d85284b9fb542d717ff62686ef73e58ca
URL: http://source.winehq.org/git/wine.git/?a=commit;h=62f1ef9d85284b9fb542d717ff62686ef73e58ca
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Dec 12 17:08:18 2006 +0100
mshtml: Added alert implementation.
---
dlls/mshtml/htmlwindow.c | 14 ++++++++++++--
dlls/mshtml/resource.h | 2 ++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 5c1c1d1..8f0fc2b 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -193,8 +193,18 @@ static HRESULT WINAPI HTMLWindow2_clearT
static HRESULT WINAPI HTMLWindow2_alert(IHTMLWindow2 *iface, BSTR message)
{
HTMLWindow *This = HTMLWINDOW2_THIS(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(message));
- return E_NOTIMPL;
+ WCHAR wszTitle[100];
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(message));
+
+ if(!LoadStringW(get_shdoclc(), IDS_MESSAGE_BOX_TITLE, wszTitle,
+ sizeof(wszTitle)/sizeof(WCHAR))) {
+ WARN("Could not load message box title: %d\n", GetLastError());
+ return S_OK;
+ }
+
+ MessageBoxW(This->doc->hwnd, message, wszTitle, MB_ICONWARNING);
+ return S_OK;
}
static HRESULT WINAPI HTMLWindow2_confirm(IHTMLWindow2 *iface, BSTR message,
diff --git a/dlls/mshtml/resource.h b/dlls/mshtml/resource.h
index a937faf..5dfbc42 100644
--- a/dlls/mshtml/resource.h
+++ b/dlls/mshtml/resource.h
@@ -26,6 +26,8 @@
#define ID_DWL_INSTALL 7602
#define ID_DWL_STATUS 7603
+#define IDS_MESSAGE_BOX_TITLE 2213
+
#define IDR_BROWSE_CONTEXT_MENU 24641
#define IDM_TRACETAGS 6004
More information about the wine-cvs
mailing list