Module: wine Branch: master Commit: 037d58c4f6e2e45cb76decd49972043aa8b9bda4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=037d58c4f6e2e45cb76decd499...
Author: Erich Hoover ehoover@mines.edu Date: Fri Jan 14 15:16:31 2011 -0700
hhctrl.ocx: Add support for the print button using IWebBrowser_ExecWB.
---
dlls/hhctrl.ocx/help.c | 4 +++- dlls/hhctrl.ocx/hhctrl.h | 1 + dlls/hhctrl.ocx/webbrowser.c | 5 +++++ 3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 2ea0132..31a7c1b 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -641,10 +641,12 @@ static void TB_OnClick(HWND hWnd, DWORD dwID) case IDTB_FORWARD: DoPageAction(info, WB_GOFORWARD); break; + case IDTB_PRINT: + DoPageAction(info, WB_PRINT); + break; case IDTB_EXPAND: case IDTB_CONTRACT: case IDTB_SYNC: - case IDTB_PRINT: case IDTB_OPTIONS: case IDTB_BROWSE_FWD: case IDTB_BROWSE_BACK: diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index 91d3a77..03a4807 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -47,6 +47,7 @@ #define WB_SEARCH 3 #define WB_REFRESH 4 #define WB_STOP 5 +#define WB_PRINT 6
typedef struct { LPWSTR chm_file; diff --git a/dlls/hhctrl.ocx/webbrowser.c b/dlls/hhctrl.ocx/webbrowser.c index d90a1a5..90b405d 100644 --- a/dlls/hhctrl.ocx/webbrowser.c +++ b/dlls/hhctrl.ocx/webbrowser.c @@ -751,7 +751,12 @@ void DoPageAction(HHInfo *info, DWORD dwAction) break; case WB_REFRESH: IWebBrowser2_Refresh(pWebBrowser2); + break; case WB_STOP: IWebBrowser2_Stop(pWebBrowser2); + break; + case WB_PRINT: + IWebBrowser2_ExecWB(pWebBrowser2, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0); + break; } }