Professional UI Solutions
Site Map   /  Register


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 » About a dynamic ribbon menu Collapse All
Subject Author Date
tera tera Sep 24, 2008 - 11:59 PM


I make a group node display or non-display by pushing the ID_EDIT_CLEAR button

In CExtRibboPage, the bar does not flicker in particular.

In CExtRibbonBar, the following point flickers.


Please teach improvement plan.


Technical Support Sep 25, 2008 - 12:47 PM

Here is the modified version of your project:

First of all, we added a MY_WM_DELAYED_UI_INIT message and a CMainFrame::OnMyDelayedUiInit() handler method for delayed initialization of the dialog, which resolves the problems with skinned non-client area of the main frame window. Second, we invoked the CWnd::RedrawWindow() and CExtPaintManager::stat_PassPaintMessages() APIs in the ID_EDIT_CLEAR() of the CMainFrame::OnCmdMsg() virtual method for avoiding re-painting effects related to the scroll bar control inside gallery control. We suppose that was the flicker effect explained in your message.

tera tera Sep 25, 2008 - 8:51 PM


Thank you for an answer.

However, the place where this focus is flickers.

Please teach a good method.

Is it difficult?.


Technical Support Sep 26, 2008 - 12:28 PM

Could you please explain us some more details about this flicker effect? Typically flicker effects are generated by more than one painting of the same screen areas. For instance, first time screen area is painted with some color and next time some control or its part appear on the screen. We didn’t see such effects in the ribbon.

tera tera Sep 27, 2008 - 2:29 AM


This sample program flickers.

If there is a good method, please teach it.

Technical Support Sep 27, 2008 - 12:18 PM

Please explain us details about flickering. We do not see anything painted and then over-painted. We do not see flicker effects. Maybe you mean something else what painted incorrectly in your point of view?

tera tera Sep 28, 2008 - 10:32 PM


A focus flickers with my PC in this way.

Please teach a good method.


Technical Support Oct 1, 2008 - 7:56 AM

Thank you very much for this video. It’s very easy to fix the flicker effect which caused by the delayed command updating invocations for all the re-created ribbon bar buttons. You should add only one line of code:

            if ( nID == ID_EDIT_CLEAR ){
                  if( nCode == CN_COMMAND && pExtra == NULL ){
                        CExtCustomizeCmdTreeNode * pNode = m_pFont ; //m_pRibbonNode->ElementAt( 0 );

                        if( blFlag == false )
                              pNode->ModifyFlags( 0, __ECTN_TBB_HIDDEN );
                              pNode->ModifyFlags( __ECTN_TBB_HIDDEN );

                        m_wndRibbonBar.SetButtons( NULL );  
                        m_wndRibbonBar.SetButtons( m_pRibbonNode );
                        m_wndRibbonBar.OnUpdateCmdUI( this, TRUE ); // !!! THIS LINE WAS ADDED !!!
                        m_wndRibbonBar.RedrawWindow( NULL, NULL, RDW_INVALIDATE|RDW_ALLCHILDREN );

                        if ( blFlag == false ){
                              blFlag = true;
                              blFlag = false;
                        return true ;