G
Guest
I am trying to add custom tollbars to MSP and I'am having difficulties
getting at the _CommandBars. In the code below:
HRESULT hr = m_spApp->get_CommandBars(&spCmdBars) results in error:
get_CommandBars is not a member of CComQIPtr <Project1::_MSProject>,
at least according to documentation. Any advice will be appreciated.
STDMETHOD(OnConnection)(IDispatch * Application, ext_ConnectMode
ConnectMode, IDispatch * AddInInst, SAFEARRAY * * custom)
{
// QI() for _Application
CComQIPtr <Project1::_MSProject> spApp(Application);
ATLASSERT(spApp);
m_spApp = spApp;
// get the CommandBars interface that represents Outlook's
//toolbars & menu
//items
HRESULT hr = m_spApp->get_CommandBars(&spCmdBars);
if(FAILED(hr))
return hr;
getting at the _CommandBars. In the code below:
HRESULT hr = m_spApp->get_CommandBars(&spCmdBars) results in error:
get_CommandBars is not a member of CComQIPtr <Project1::_MSProject>,
at least according to documentation. Any advice will be appreciated.
STDMETHOD(OnConnection)(IDispatch * Application, ext_ConnectMode
ConnectMode, IDispatch * AddInInst, SAFEARRAY * * custom)
{
// QI() for _Application
CComQIPtr <Project1::_MSProject> spApp(Application);
ATLASSERT(spApp);
m_spApp = spApp;
// get the CommandBars interface that represents Outlook's
//toolbars & menu
//items
HRESULT hr = m_spApp->get_CommandBars(&spCmdBars);
if(FAILED(hr))
return hr;