Visite Webhosting Latino, el site sobre alojamiento web.
adding button to custom IE toolbar - Mombu the Microsoft Forum
Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > adding button to custom IE toolbar
User Name
REGISTER NOW! Mark Forums Read

sponsored links

1 24th April 22:23
External User
Posts: 1
Default adding button to custom IE toolbar

Hello All,

I am trying to add a button to a custom IE toolbar that will print the

currently displayed website. (Before a get a bunch of posts... I know
this can be done by using File => Print).

Using a number of different examples, I have a custom with a button
that displays a message box when the user clicks on. I have been
struggling with this for a few days and desperately seeking help.

This is what I have so far:

on the SetSite() function I create the toolbar with code below:
RECT _rcClientParent;


// We need to create an Invisible Child Window using the Parent

Window, this will also be used to reflect Command
// messages from the rebar
m_parent.Create(m_rebar, _rcClientParent, NULL, WS_CHILD);

// Now we can create the Tool Bar, using the Invisible Child
m_toolbar.m_hWnd = m_toolbar.CreateSimpleToolBarCtrl(m_parent,
m_toolbar.SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS |


//Get and keep the IInputObjectSite pointer.
m_pSite = _pSite;
//Here I pass the pointer of the IE window to the class that contains
//the button functionality
m_parent.get_ie_handle ( m_pSite );

//this is a code snippet from the CParent class.
//Here have access to the handle to the IE window by retrieving the
*_m_pSite pointer
IInputObjectSite *_m_pSite;

LRESULT OnButtonDollar(WORD /*wNotifyCode*/, WORD /*wID*/, HWND
/*hWndCtl*/, BOOL& /*bHandled*/)
::MessageBoxA(NULL, "CToolbar::OnButtonDollar",
__TIME__, MB_OK);
//I want to print the current page
return 0;


void get_ie_handle(IInputObjectSite *m_pSite)
*_m_pSite = *m_pSite;


Hopefully this is clear?

Sorry for the XPosting but I at a wits end
  Reply With Quote

  sponsored links


Thread Tools
Display Modes

Copyright 2006 - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -