How to get active ribbon tab with Win32++

120 views Asked by At

I'm a new winapi programmer and I'm using the Win32++ Framework to build a program with a ribbon bar. In the main window (CRibbonDockFrame) the view is supposed to change when the user changes the active tab in the ribbon bar. Like in a CTab control the OnTCNSelChange(LPNMHDR pNMHDR) function is called when the tab is changed.

All standard functions for the ribbon bar:

virtual STDMETHODIMP Execute(UINT32 cmdID, UI_EXECUTIONVERB verb, const PROPERTYKEY* key, const PROPVARIANT* ppropvarValue, IUISimplePropertySet* pCmdExProp)
virtual STDMETHODIMP UpdateProperty(UINT32 cmdID, __in REFPROPERTYKEY key, __in_opt  const ROPVARIANT* currentValue, __out PROPVARIANT* newValue)
virtual STDMETHODIMP OnViewChanged( UINT32 viewId, __in UI_VIEWTYPE typeId, __in IUnknown* pView, UI_VIEWVERB verb, INT uReasonCode)

work fine, but none of them lets me get the active tab via the ids. How can I achieve that?

0

There are 0 answers