ieframe: Call appropriate functions in response to toolbar icons.

This commit is contained in:
Jacek Caban 2012-01-18 18:48:08 +01:00 committed by Alexandre Julliard
parent 44aa20720d
commit 3b8c977a74
2 changed files with 24 additions and 4 deletions

View file

@ -461,10 +461,10 @@ static void create_rebar(HWND hwnd)
SendMessageW(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)imagelist);
SendMessageW(hwndToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
add_tb_button(hwndToolbar, 0, 0, IDS_TB_BACK);
add_tb_button(hwndToolbar, 1, 0, IDS_TB_FORWARD);
add_tb_button(hwndToolbar, 2, 0, IDS_TB_STOP);
add_tb_button(hwndToolbar, 3, 0, IDS_TB_REFRESH);
add_tb_button(hwndToolbar, 0, ID_BROWSE_BACK, IDS_TB_BACK);
add_tb_button(hwndToolbar, 1, ID_BROWSE_FORWARD, IDS_TB_FORWARD);
add_tb_button(hwndToolbar, 2, ID_BROWSE_STOP, IDS_TB_STOP);
add_tb_button(hwndToolbar, 3, ID_BROWSE_REFRESH, IDS_TB_REFRESH);
add_tb_button(hwndToolbar, 4, ID_BROWSE_HOME, IDS_TB_HOME);
add_tb_separator(hwndToolbar);
add_tb_button(hwndToolbar, 5, ID_BROWSE_PRINT, IDS_TB_PRINT);
@ -594,6 +594,22 @@ static LRESULT iewnd_OnCommand(InternetExplorer *This, HWND hwnd, UINT msg, WPAR
IWebBrowser2_GoHome(&This->IWebBrowser2_iface);
break;
case ID_BROWSE_BACK:
IWebBrowser2_GoBack(&This->IWebBrowser2_iface);
break;
case ID_BROWSE_FORWARD:
IWebBrowser2_GoForward(&This->IWebBrowser2_iface);
break;
case ID_BROWSE_STOP:
IWebBrowser2_Stop(&This->IWebBrowser2_iface);
break;
case ID_BROWSE_REFRESH:
IWebBrowser2_Refresh(&This->IWebBrowser2_iface);
break;
case ID_BROWSE_ABOUT:
ie_dialog_about(hwnd);
break;

View file

@ -42,6 +42,10 @@
#define ID_BROWSE_ADDFAV 1200
#define ID_BROWSE_HOME 1201
#define ID_BROWSE_BACK 1202
#define ID_BROWSE_FORWARD 1203
#define ID_BROWSE_STOP 1204
#define ID_BROWSE_REFRESH 1205
#define ID_BROWSE_BAR_STD 1300
#define ID_BROWSE_BAR_ADDR 1301