Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - IsIdleMessage handling
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

IsIdleMessage handling

 Post Reply Post Reply
Author
Message
Acooper View Drop Down
Newbie
Newbie


Joined: 11 January 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Acooper Quote  Post ReplyReply Direct Link To This Post Topic: IsIdleMessage handling
    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
Back to Top
Acooper View Drop Down
Newbie
Newbie


Joined: 11 January 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Acooper Quote  Post ReplyReply Direct Link To This Post 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
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.172 seconds.