hhctrl.ocx: Add support for the print button using IWebBrowser_ExecWB.

This commit is contained in:
Erich Hoover 2011-01-14 15:16:31 -07:00 committed by Alexandre Julliard
parent 0a46f9b678
commit 037d58c4f6
3 changed files with 9 additions and 1 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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;
}
}