Article View: comp.windows.ms.programmer
Article #3463Re: Strange things about PeekMessage ...
From: Paul Bonneau
Date: Fri, 28 Jun 1991 18:20
Date: Fri, 28 Jun 1991 18:20
39 lines
1818 bytes
1818 bytes
In article <1991Jun26.120949.2873@informatik.uni-erlangen.de> testurm@immd4.informatik.uni-erlangen.de (Torsten Sturm) writes:
>Hi, i've got a problem about PeekMessage :
>
>(I used PeekMessage in a normal while-look a lot, so I
> thought I know all about it ???)
>
>What I want to do is something like this :
>
>for(......)
>{
>/* see, if other apps wish to do something and "eat" all mesg. for this
> appl. */
> PeekMessage(&msg,hWnd,0,0,PM_REMOVE);
>
>.... do some calculating stuff (no SDK calls)....
>}
>
>
>The result is, that only messages, which are directly sent to other
>window procedures come thru to other apps(I can see this with clock.exe
>or cpuuse.exe from cica), such as WM_PAINT or WM_TIMER.
>But I can't for instance click upon and activate another application.
>
I would guess that by eating all messages for the apo in
question, that you are disabling the process whereby windows
activate another application. Perhaps the lack of response
to the WM_NCHITTEST message is causing the problem. To get
more of a feeling for the problem, try using spy on the other
app you are clicking on and record the messages when the
initial conditions are: (ie before you click on the other
app)
a) another "normal" app is active (notepad or
something like that, and
b) your app is active.
Hope this helps.
cheers - Paul Bonneau.
Technical Details
Message-ID:
<1991Jun28.182028.6668@hyper.hyper.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneauReferences:
<1991Jun26.120949.2873@informatik.uni-erlangen.de>Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau From: bonneau@hyper.hyper.com (Paul Bonneau) Subject: Re: Strange things about PeekMessage ... Message-ID: <1991Jun28.182028.6668@hyper.hyper.com> Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,) Organization: HyperCube Inc. References: <1991Jun26.120949.2873@informatik.uni-erlangen.de> Date: Fri, 28 Jun 1991 18:20:28 GMT