Click here to Skip to main content
12,821,494 members (31,050 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ MFC Ribbon
I'm trying to make a Office-style app, for some button I use ribbon editor and load it as usual.

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 23-Jul-12 17:20pm
Updated 25-Jul-12 6:06am
Sergey Alexandrovich Kryukov 23-Jul-12 23:54pm
Not enough information.
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

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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 25 Jul 2012
Copyright © CodeProject, 1999-2017
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