Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - RibbonBar button not updating
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

RibbonBar button not updating

 Post Reply Post Reply
Author
Message
devil20 View Drop Down
Groupie
Groupie
Avatar

Joined: 29 June 2006
Location: UK
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote devil20 Quote  Post ReplyReply Direct Link To This Post Topic: RibbonBar button not updating
    Posted: 21 June 2008 at 3:49am
Hi
 
I have created Ribbon bar and created some buttons using CXTPControlButton class. I need to do some update on button in software using ON_UPDATE_COMMAND_UI handler.
 
But buttons are not updating in case of i already add code for Enable state. If i move mouse on button or minize application then it is updating this buttons.
 
I had also checked CPU usage but my application is 3D so it is using 20 to 30 percent CPU in taskManager.
 
So what should be problem ? Anyone can give me suggestion ?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 June 2008 at 9:15am
Hi,
Think you send too mach messages - maybe its WM_PAINT or WM_TIMER and CWinApp don't enter to Idle state to send WM_IDLEUPDATECMDUI. 
Try to monitor your messages with Spy.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 899
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 21 June 2008 at 3:05pm
Make sure the manual update flag is not set. If it is, CJ will not call OnCmdMsg and your message map entry will not be called. If the ribbon site is the mainframe, your mainframe message map should have the entry.
 

pControl->SetFlags( pControl->GetFlags() & ~xtpFlagManualUpdate );

Back to Top
devil20 View Drop Down
Groupie
Groupie
Avatar

Joined: 29 June 2006
Location: UK
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote devil20 Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 12:37am
Hi
 
 
Yes i am using 3 Timers and interval is too short of timers. If i switch off timer then it working perfect. Currently i have done solution using make manually update in one of timer using
 
 
 
GetCommandBars()->UpdateCommandBars();
 
 
 
that's working perfect for me
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.