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 General Discussion » Resize / RecalcLayout Bug in RibbonBar Collapse All
Subject Author Date
Sebstian Leopold Apr 10, 2009 - 8:30 PM

I have a problem with the layout of the ribbonbar after a window state change from maximized to normal window. If there is enough space (width) in the normal window the groups in a tab page are not correctly placed after a state change.

I can also reproduce this bug in your ribbonbar sample application doing the following steps:

1. Use a Desktop with a large resolution like (1650 x XXXX)
2. Now resize the window to a size where all groups are shown in maximal layout.
3. Now double click on the caption to maximize the window.
4. Double click the caption again and you will see the error in the ribbon bar.

If the window is smaller (step 2) so that the bar has to shrink the items in it,, the problem doesn’t occur.

S. Leopold

Technical Support Apr 13, 2009 - 1:18 PM

Thank you for reporting this issue. We fixed it by adding the WM_WINDOWPOSCHANGED case to the following method:

LRESULT CExtRibbonPage::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
            switch( message )
            case WM_WINDOWPOSCHANGED:
                        m_bRibbonSimplifiedLayoutDelayedFlush = true;
            case WM_DESTROY:
                        if(                     m_hWndParentRibbonPage != NULL
                                    &&        ( ::IsWindow( m_hWndParentRibbonPage ) )
                                    ::InvalidateRect( m_hWndParentRibbonPage, NULL, TRUE );
                                    if( m_bHelperAutoHideMode )
                        if( message == g_nMsgSyncAccelTable )
                                    if( ! m_bHelperPopupMode )
                                                OnUpdateAccelGlobalInfo( false );
                                    return 0L;
                        } // if( nMessage == g_nMsgSyncAccelTable )
                        else if( message == g_PaintManager.m_nMsgPaintManagerChanged )
                                    MSG _msg;
                                    PmBridge_OnPaintManagerChanged( PmBridge_GetPM() );
                                    return 0L;
                        } // else if( message == g_PaintManager.m_nMsgPaintManagerChanged )
            } // switch( message )
LRESULT lResult = CExtMenuControlBar::WindowProc( message, wParam, lParam );
            return lResult;

Sebstian Leopold Apr 10, 2009 - 8:45 PM

Windows Vista Home Premium 32 Bit