Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » OnSelendOkAccelCategoryCombo question Collapse All
Subject Author Date
tera tera Jun 4, 2009 - 4:27 AM

Hello.


About a button existing in the status bar.



In this key customize dialog ,

I want to customize the keys of status bars.


Is not there the schedule improving a program?

Technical Support Jun 4, 2009 - 5:05 AM

Please override the CExtRibbonPage::OnRibbonBuildCommandCategories() virtual method in your CExtRibbonBar-derived class. Your method should look like this:

virtual void C__YOUR__RibbonBar::OnRibbonBuildCommandCategories( CExtCustomizeCmdTreeNode * pNode, __EXT_MFC_SAFE_LPCTSTR strCommandCategoryName = NULL)
{
            //
            // Invoke parent class method first:
            //
            CExtRibbonBar::OnRibbonBuildCommandCategories( pNode, strCommandCategoryName );
            if( strCommandCategoryName != NULL )
                        return;
            //
            // Built your custom command categories or update existing command categories here.
            // You should use the CExtCustomizeSite::Category***() methods.
            // As result, your commands from the bottom toolbar will appear in the keyboard customization dialog box.
            //
}

tera tera Jun 5, 2009 - 3:02 AM

Hello.


For example, how should I make a program when I add IDM_OUTSIDE_MENU1?


 _MuMakeRibbnoNodeNormal(   _T("OUTSIDE_MENU1"), _T(""), _T(""),   IDM_OUTSIDE_MENU1,   NULL,   IDB_BLANK_PAGE_SMALL,   pRibbonGroup  );

 pRibbonNodeTabPage->InsertNode( NULL, pRibbonGroup );

 RibbonShowHide( false , pRibbonNodeTabPage );

}

 

bool XXXXX::RibbonShowHide( bool blShowFlag , CExtCustomizeCmdTreeNode * pNode ) {  if ( pNode == NULL ){   return false;  }

 if ( ( pNode->GetFlags() & __ECTN_TBB_HIDDEN ) == 0 ){   if ( blShowFlag == false ){    pNode->ModifyFlags( __ECTN_TBB_HIDDEN );    return true;   }  }else{   if ( blShowFlag == true ){    pNode->ModifyFlags( 0, __ECTN_TBB_HIDDEN );    return true;   }  }  return false; }


Because I want to display it in Quick Access , I made IDM_OUTSIDE_MENU1-RibbonNode of the non-display and customized it.

In addition, I got possible to perform a decision of the key to IDM_OUTSIDE_MENU1 input by making a IDM_OUTSIDE_MENU1-RibbonNode.


If there is a better method, please teach it.

Thanks,


 

Technical Support Jun 5, 2009 - 11:43 AM

The CExtRibbonBar::_OnCmdRibbonQuickAccessToolbarAddTo() method inserts new ribbon nodes into the quick access toolbar. It contains the ready to use code for this task. You should simply insert new ribbon node as child of the node returned by the Ribbon_GetQuickAccessRootNode() method. The new node should be marked with the __ECTN_RIBBON_QA_CLONED_COPY style. Then you should create new toolbar button using the OnRibbonCreateBarButton() method and attach new node to it. Finally you should update ribbon bar’s layout.

The CExtRibbonBar::_OnCmdRibbonQuickAccessToolbarAddTo() method inserts cloned copy of the toolbar button into the quick access toolbar. The source toolbar has the m_nHelperCtxIndexQA and the pRibbonNode pointer specifies its ribbon node. Then this method creates the new pButton button and the new pNewRibbonNode ribbon node and inserts them into quick access toolbar.