Click here to Skip to main content
Rate this: bad
good
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.
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 23-Jul-12 16:20pm
Edited 25-Jul-12 5:06am
v4
Comments
Sergey Alexandrovich Kryukov at 23-Jul-12 23:54pm
   
Not enough information.
--SA
nbtthief at 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
0 Sergey Alexandrovich Kryukov 354
1 Richard MacCutchan 310
2 OriginalGriff 275
3 Vinay Mistry 163
4 Jared Sanow 145
0 Sergey Alexandrovich Kryukov 5,939
1 OriginalGriff 4,885
2 CPallini 2,473
3 Abhinav S 1,507
4 Richard MacCutchan 1,437


Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 25 Jul 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