Print Page | Close Window

RibbonBar button not updating

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11138
Printed Date: 01 March 2025 at 2:55am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RibbonBar button not updating
Posted By: devil20
Subject: RibbonBar button not updating
Date 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 ?



Replies:
Posted By: Oleg
Date 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


Posted By: rdhd
Date 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 );



Posted By: devil20
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net