CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    94

    Question CMFCRibbonBar button click delay

    If I click a button or a check box on the CMFCRibbonBar, there seems to be a delay of about 750 milliseconds before I can click it again (before it will trigger another event). Does anyone know why this is happening and how I can get rid of it?

    For example. if I have a check box on a form and I double click it, the box will tick on the first click and then untick on the second click no matter how fast I click. If I have the check box on the Ribbon bar and I double click on it, the first click will tick the box and the second click will do nothing. I can click on it 1000 times but it will only send 1 event every 750 milliseconds or so.

    I have looked at the feature pack ribbon control example for inspiration but it also has the same problem, however if I go in to Microsoft Word and click on some of the ribbon buttons in there (for example the Grow Font and Shrink Font buttons) they dont have this problem so there must be a way around it.

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: CMFCRibbonBar button click delay

    You will always experience a slight delay depending how long it takes to process a command.
    On the top of this, check box or any "control" you see in a ribbon bar is not really a windows control but an image representing a control.
    The framework does some additional work, determining what was clicked using hit test and also does all drawing needed to update "control’s" state.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  3. #3
    Join Date
    Oct 2006
    Posts
    94

    Re: CMFCRibbonBar button click delay

    So why do none of Microsofts applications have the problem? Do they not use the same ribbon control?

  4. #4
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: CMFCRibbonBar button click delay

    I do not think so.
    If you use Spy you will see that not only windows class names are different, but Word ribbon (for example) is much more complex than in MFC based application.
    Word’s ribbon contains more childwindows.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured