|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Wilhelm Falkner
|
May 3, 2012 - 8:19 AM
|
Hello, in Your sample for the Backstageview, you have followimg links included: pData_DirectContent->m_strHtmlInner =
_T("<p style=\" margin-top:0.4em; \" >Application version: XXXX.XXXX.XXXX.XXXX (XX-bit)</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Additional Version and Copyright information.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Part of the XXXX XXXX XXXX XXXX (xxxx xxxx xxxx xxxx) product.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >©201X Company Name. All rights reserved.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Product Support Services.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Product ID: 1111-2222-3333-4444-5555-6666-7777</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Software License Terms.</a></p>\r\n")
; Can You pls tell me, you to make them work? E.g. opening explorer, got to HP? TIA Willi
|
|
Technical Support
|
May 28, 2012 - 11:29 AM
|
You can use pData->m_nItemType property. For instance, backstage view defines set of __BSVIT_*** item types for its elements. You can convert HTREEITEM hti item handle into CExtRichContentItem * HTML DOM node (the CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke() method does this):
CExtSafeString strID;
strID.Format( _T("%p"), LPVOID(hti) );
CExtRichContentItem * pRCI = pRCL->ElementByUiBindingSrcID( LPCTSTR(strID) );
if( pRCI != NULL )
{
. . .
Then you can use CExtRichContentItem class properties. I.e. m_strTextParsed , m_strTextEffective , m_strTagPV and others. You can also access tag properties and CSS parameters.
|
|
Wilhelm Falkner
|
May 29, 2012 - 3:54 AM
|
You are right, I get all this information, but I don’t see the Item, I have clicked on. Waht is missing? Maybe You can modify the starting example (RibbonBarMDI), lines pData_DirectContent->m_strHtmlInner =
_T("<p style=\" margin-top:0.4em; \" >Application version: XXXX.XXXX.XXXX.XXXX (XX-bit)</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Additional Version and Copyright information.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Part of the XXXX XXXX XXXX XXXX (xxxx xxxx xxxx xxxx) product.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >©201X Company Name. All rights reserved.</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Product Support Services.</a></p>\r\n")
_T("<p style=\" margin-top:0.4em; \" >Product ID: 1111-2222-3333-4444-5555-6666-7777</p>\r\n")
_T("<p style=\" margin-top:0.4em; \" ><a href=\"http://www.prof-uis.com\">Company Software License Terms.</a></p>\r\n")
; in that way, that it open explorer an jumps to Your website? TIA Willi
|
|
Technical Support
|
May 16, 2012 - 3:14 AM
|
The CExtRibbonBackstageViewWnd::OnBsvItemInvokeCommand() virtual method allows you to handle invocations of most of elements in the backstage view. But the hyperlink is not a button like element of backstage view. So, a hyperlink click can be handled by overriding the CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke() virtual method.
|
|
Technical Support
|
May 16, 2012 - 3:02 AM
|
The CExtRibbonBackstageViewWnd::OnBsvItemInvokeCommand() virtual method allows you to handle invocations of most of elements in the backstage view. But the hyperlink is not a button like element of backstage view. So, a hyperlink click can be handled by overriding the CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke() virtual method.
|
|
Wilhelm Falkner
|
May 21, 2012 - 6:46 AM
|
You are right, OnRcgtdItemInvoke is called. But how can I detect, what the user has clicked? I tried to read it out from m_strHtmlInner, but this is allways empty, except for leftmost pane entries. What have I done: I have overwritten OnRcgtdItemInvok: bool CMyBackstageViewWnd::OnRcgtdItemInvoke( HTREEITEM hti, e_item_invoke_type eIIT )
{
{
ASSERT_VALID( this );
ASSERT( hti != NULL );
ASSERT( RcgtdItemIsPresent( hti ) );
CExtRichContentLayout * pRCL = RcsLayoutGet();
if( pRCL == NULL )
return CExtRichGenWnd::OnRcgtdItemInvoke( hti, eIIT );
CExtRichGenItemData * pData = (CExtRichGenItemData*)RcgtdItemDataGet( hti );
if( pData == NULL )
return CExtRichGenWnd::OnRcgtdItemInvoke( hti, eIIT );
if (!pData->m_strHtmlInner.IsEmpty())
TRACE("CMyBackstageViewWnd::OnRcgtdItemInvoke m_strHtmlInner = %s\n", pData->m_strHtmlInner);
if (pData->m_nItemType == __BSVIT_DIRECT_CONTENT) { // here I try to decode element, use has clicked on ...... // .................
return TRUE;
}
}
return CExtRibbonBackstageViewWnd::OnRcgtdItemInvoke( hti, eIIT );
} What have I done wrong? What is missing ? TIA Willi
|
|