IE 工具栏添加多个按钮
各位高手:
我现在用vc6.0 ATL 上实现在IE工具栏添加按钮,现在我只能添加一个按钮 代码如下
SendMessage(m_hWnd, TB_SETEXTENDEDSTYLE, 0, (LPARAM)TBSTYLE_EX_DRAWDDARROWS);
SendMessage(m_hWnd, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
SendMessage(m_hWnd, TB_SETMAXTEXTROWS, 1, 0L);
TCHAR* pCaption = _T("打印");
int iIndex = ::SendMessage(m_hWnd, TB_ADDSTRING, 0,(LPARAM)pCaption);
HICON hMotley = LoadIcon(_Module.GetResourceInstance(), MAKEINTRESOURCE(IDI_MOTLEY));
m_hImageList = ImageList_Create(16,16, ILC_COLOR16, 1, 0);
int iImageIndex = ImageList_AddIcon(m_hImageList, hMotley);
DestroyIcon(hMotley);
::SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)m_hImageList);
// add the button for the toolbar to the window
TBBUTTON Button;
ZeroMemory((void*)&Button, sizeof(TBBUTTON));
Button.idCommand = IDM_GETURL;
Button.fsState = TBSTATE_ENABLED;
Button.fsStyle = TBSTYLE_BUTTON;//|TBSTYLE_AUTOSIZE;//BTNS_BUTTON | BTNS_AUTOSIZE | BTNS_SHOWTEXT;
Button.dwData = 0;
Button.iString = iIndex;
Button.iBitmap = 0;
::SendMessage(m_hWnd, TB_INSERTBUTTON, 0, (LPARAM)&Button);
return 0;
怎么能通过 TBBUTTON 在IE 上多添加几个按钮
谢谢!!!