#72 Ability to override IsIdleMessage()

wont-fix
None
5
2014-02-23
2007-08-05
Anonymous
No

IsIdleMessage is declared as non-overridable in CMessageLoop, but there's a need to override it to add another messages that should not cause idle processing. For example, if I have WM_TIMER message sent very intensively in my application I would like the idle processing mechanism to ignore it.

Discussion

    • assigned_to: nobody --> nenadstefanovic
     
    • status: open --> wont-fix
    • Group: --> Next Release (example)
     
  • Reluctant to change CMessageLoop after all this time... Back when WTL started, 4 bytes in vtable for every app were not insignificant. I don't know for today...

    This is rare and specific situation. You can solve it like this:
    class CMainFrame
    {
    bool m_bTimer;

    LRESULT OnTimer(...)
    {
        m_bTimer = true;
        ...
    }
    
    BOOL OnIdle()
    {
        if(m_bTimer)
        {
            m_bTimer = false;
            return FALSE;
        }
        ...
    }
    

    };