FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Shutdown messages

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
jvr



Joined: 19 Nov 2007
Posts: 10

PostPosted: Tue Mar 04, 2008 1:30 pm    Post subject: Shutdown messages Reply with quote

I cannot capture the messages WM_QUERYENDSESSION and WM_ENDSESSION.
Are they previously captured by DFL?

Code:
 
static this()
{
    Application.addMessageFilter(new MsgFilterer);
}


Code:

  class MsgFilterer : IMessageFilter
  {
    bool preFilterMessage(inout Message msg)
    {
      bool ret = false;

      if(msg.msg == WM_QUERYENDSESSION)
      {
        ret = true;
        msg.result = TRUE;
      }
      else if(msg.msg == WM_ENDSESSION)
      {
        if(msg.wParam != 0)
        {
          Application.exit();
        }

        ret = true;
        msg.result = FALSE;
      }

      return(ret);
    }
  }
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Tue Mar 04, 2008 3:45 pm    Post subject: Re: Shutdown messages Reply with quote

DFL shouldn't be affecting it. The problem could be maybe those messages are "sent" rather than "posted". Sent messages go directly to the window proc.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group