![]() |
RibbonBar button not updating |
Post Reply ![]() |
Author | |
devil20 ![]() Groupie ![]() ![]() Joined: 29 June 2006 Location: UK Status: Offline Points: 38 |
![]() ![]() ![]() ![]() ![]() 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 ?
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
rdhd ![]() Senior Member ![]() ![]() Joined: 13 August 2007 Location: United States Status: Offline Points: 899 |
![]() ![]() ![]() ![]() ![]() |
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 ); |
|
![]() |
|
devil20 ![]() Groupie ![]() ![]() Joined: 29 June 2006 Location: UK Status: Offline Points: 38 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |