Print Page | Close Window

IsIdleMessage handling

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=7068
Printed Date: 27 September 2024 at 9:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: IsIdleMessage handling
Posted By: Acooper
Subject: IsIdleMessage handling
Date Posted: 07 May 2007 at 2:50pm
Hello,

I am having an issue with my application where a OnUpdate event is getting fired constantly for a menu item.

I found this post:  https://forum.codejock.com/forum_posts.asp?TID=6090

...which help explains my issue.

I did override the CWinApp::IsIdleMessage method like such:

BOOL CMyApp::IsIdleMessage(MSG *pMsg)
{
   return FALSE;
}

This has solved the issue of the menu Update event from continually firing.  However, I now have an issue where my ToolBar items are not getting refreshed properly.  Whenever I click a ToolBar item, the button stays painted the click background color of the button, and not getting set back to the normal background color of the ToolBar items.

Is there some logic I need to add to IsIdleMessage that will handle this, and are there other messages that I should be processing?

Thanks in advance.
- Andrew



Replies:
Posted By: Acooper
Date Posted: 07 May 2007 at 3:22pm
It looks like I was able to solve my issue.

I removed the IsIdleMessage override, and simply checked the CCmdUI object from Update event to check if there is a valid m_pMenu object.

Regards,
Andrew



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