Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC Ribbon
First, i want to tell that i dont have much knowledge about MFC, today i try to create a Ribbon style program.
 
when i use ribbon toolbox to drag&drop any tool or button to my form, and click test button, every thing went right but when i compile and run every thing i add into my form grey out (like it is disabled) you cant click or do anything with it, but default Check box(Create with wizard) is ok. The only solution i find out myself that i must add event to button to enable it.
 
But what confuse me is when i compile and run sample project RibbonGadget from Microsoft, when i add new button, every thing is ok, i dont meet the situation like my own created project.
 
Can someone explain me why?
 
Note: sorry for my bad english
Posted 10-Jul-12 5:36am
Comments
Wes Aday at 10-Jul-12 12:03pm
   
Thank you for posting a well worded question. I hope you get an answer.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If it works as before, buttons in the ribbon should have functions associated to them (to the ID) via the message map (ON_COMMAND and ON_UPDATE_UI_COMMAND) or something similar for teh ribbon..
  Permalink  
Comments
nbtthief at 11-Jul-12 3:18am
   
Thank for replying, as i said above, with my own created project, nothing happen if i dont add massage map button (they're grey out as disable, cant click or do anything). But with sample project RibbonGadget, i just add new button/control then compile and run, every new added button/control work normally (can click or do something not grey out).
 
First, i think may be it automatically add message map for new added button but when i use class wizard to check on new added button ID, nothing is bolded (ON_COMMAND and ON_UPDATE_UI_COMMAND is not used), i can add new message handler on that ID.
 
Actually, this is not affect my project too much, it just make me wonder why?
Thank for reading and suggesting your idea
I appreciate all your idea
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I have had significant struggles with the ribbon bar in VS2010, when new buttons are added after the program had been compiled and run (at which point values are stored in the registry under the 'Workspace' key).
 
New accelerators, for example, didn't work. Using a stock SDI application, it was necessary to reset by right-clicking on the main frame and select "Customize Quick Access Toolbar". Then click on the "Customize" button at the bottom for "Keyboard shortcuts". Lastly, click on the "Reset All" button, and close out of the dialogs.
 
Is the problem potentially related to this?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,656
1 Sergey Alexandrovich Kryukov 6,490
2 CPallini 5,310
3 George Jonsson 3,584
4 Gihan Liyanage 2,650


Advertise | Privacy | Mobile
Web02 | 2.8.140921.1 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100