Click here to Skip to main content
15,887,827 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
Comments
[no name] 10-Jul-12 12:03pm    
Thank you for posting a well worded question. I hope you get an answer.

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..
 
Share this answer
 
Comments
nbtthief 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
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?
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900