DISPID on Type or change of a combo

  • Thread starter KarthikonIT via OfficeKB.com
  • Start date
K

KarthikonIT via OfficeKB.com

Hi,
I m creating a plugin for MSOutlook.
I have added a combobox in the OUtlook toolbar. I would like to receive event
when the user types on combobox or choose an item from the list.

Can someone tell me what is the DispID I have to use to listen to that event.

I tried using OleViewer but could not find, please suggest me appropriate
links to learn about that or how to use.




Here is the code snippet for event-sink:

Office::_CommandBarComboBoxPtr m_spSearchComboPtr;

public IDispEventSimpleImpl<2,CGrabExplorer,&__uuidof( Office::
_CommandBarComboBoxEvents)>


//type def
typedef IDispEventSimpleImpl< 2,CGrabExplorer,&__uuidof( Office::
_CommandBarComboBoxEvents)> CmdBarComboBoxEvnts;


//code for sinking.
BEGIN_SINK_MAP(CGrabExpl)
SINK_ENTRY_INFO(2, __uuidof(Office::_CommandBarComboBoxEvents),0x1,
OnDataChange, &OnDataChangeInfo)
END_SINK_MAP()



//Attached to the event sink after adding to the toolbar.
CmdBarComboBoxEvnts::DispEventAdvise( (LPDISPATCH)m_spSearchComboPtr );



Thanks in Advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top