Click here to Skip to main content
15,867,939 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to make a Office-style app, for some button I use ribbon editor and load it as usual.
C++
m_wndRibbonBar.Create(this);
m_wndRibbonBar.LoadFromResource(IDR_RIBBON);

Then I override some CMFCRibbonButton, so I must have to add it by code as shown in above lines (not by ribbon editor anymore). Everything work fine on win xp, but when I run it on win 7, it only display the buttons I added using editor. But dynamically added buttons didn't display. When I run it on win XP again, everything work fine as always.

I'm really confused now. Maybe I override but forgot something. I appreciate any ideas. Thanks for reading!

p/s: if anyone didn't understand what I ask, pls read my reply comment, if you're still confused pls let me know.

p/s: i just find out that my app work wrongly when i turn on win 7 Aero effect, if i turn it off, everything goes fine, anyone khow how to fix this.
Posted
Updated 25-Jul-12 5:06am
v4
Comments
Sergey Alexandrovich Kryukov 23-Jul-12 23:54pm    
Not enough information.
--SA
nbtthief 24-Jul-12 0:32am    
My problem is exactly what i stated above. For example:

I create Ribbon app with 4 button, i use Ribbon editor toolbox (in VS10) to drag and drop it to RibbonBar. Then i create new class derive from CMFCRibbonButton that i call it NewButton, then i add to Ribbon Bar 2 NewButton button. but because that button is my own creation so it wont appear in Ribbon Editor tool box.

So i must add code myself in OnCreate(...), those code just right below this line
m_wndRibbonBar.LoadFromResource(IDR_RIBBON);

When in ribbon editor, i click on Test Button, the app appear but with only 4 button (normal button), 2 NewButton button isnt display. But when i compile and run it display properly include 2 NewButton button (i add event and do some code, everything work greatly).

The big problem here is it work great on win XP, when i compile and run on win 7, it only appear 4 normal button

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

  Print Answers RSS


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