dscwpmsg intercept window close

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: David McDivitt (x12code-del_at_del-yahoo.com)
Date: 01/21/05


Date: Thu, 20 Jan 2005 18:26:56 -0600

I need to prevent an application from closing. I downloaded the dscwpmsg
example from allapi.net as well as other examples. My hope was to discard
WM_CLOSE messages. I am able to intercept and discard some messages, but not
WM_CLOSE. I have Win2K on this machine.

The program places an icon in the tray with prevent and unload on the menu.
When prevent is checked, top level windows are searched for desired text and
if found a hook is placed on that window.

The only thing I've found to do system wide hooks is dscwpmsg. Unfortunately
dscwpmsg provides a copy of messages, so changing them is not possible, and
not passing them along the chain is not possible. Kill methods are provided
which look for certain messages, though. Help would be appreciated. Thanks



Relevant Pages

  • Re: dscwpmsg intercept window close
    ... I am able to intercept and discard some messages, ... >The only thing I've found to do system wide hooks is dscwpmsg. ... I think dscwpmsg uses a WH_CALLWNDPROC hook, ... apply the usual cautions for non-familiar sites :-) ...
    (microsoft.public.vb.general.discussion)
  • Re: dscwpmsg intercept window close
    ... I am able to intercept and discard some messages, ... >The only thing I've found to do system wide hooks is dscwpmsg. ... I think dscwpmsg uses a WH_CALLWNDPROC hook, ... apply the usual cautions for non-familiar sites :-) ...
    (microsoft.public.vb.winapi)
  • dscwpmsg intercept window close
    ... I am able to intercept and discard some messages, ... top level windows are searched for desired text and ... if found a hook is placed on that window. ... The only thing I've found to do system wide hooks is dscwpmsg. ...
    (microsoft.public.vb.general.discussion)
  • dscwpmsg intercept window close
    ... I am able to intercept and discard some messages, ... top level windows are searched for desired text and ... if found a hook is placed on that window. ... The only thing I've found to do system wide hooks is dscwpmsg. ...
    (microsoft.public.vb.general.discussion)
  • dscwpmsg intercept window close
    ... I am able to intercept and discard some messages, ... top level windows are searched for desired text and ... if found a hook is placed on that window. ... The only thing I've found to do system wide hooks is dscwpmsg. ...
    (microsoft.public.vb.winapi)