Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tracking the active application and window

0 views
Skip to first unread message

S. Brent Faulkner

unread,
Mar 31, 1997, 3:00:00 AM3/31/97
to

A "simple" window/application activation question...

If a user clicks on my application's main window how can I restore focus
and/or activation to the window which just lost activation?

To simplify my application I have a dialog with a button on it. When the
user clicks the button I want to perform some action and then restore focus
to where it was before the user clicked. It appears that WM_ACTIVATE is
only useful when the window being deactivated is within the same thread as
the window gaining activation. It also appears that sometimes the
WM_ACTIVATEAPP message received contains a NULL task handle (thread id).

Anyone have an idea how to do this?

Thanks.

--Brent
------------------------------------------------------------------------
S. Brent Faulkner
br...@golden.net (home)
br...@allross.com (business)

Ed Slingland

unread,
Apr 1, 1997, 3:00:00 AM4/1/97
to

Have you looked at WM_KILLFOCUS message?

--
Ed
Reply to eslin...@usa.net
My reported email address is bogus to prevent 'spamverts'.

S. Brent Faulkner <br...@golden.net> wrote in article
<01bc3e5e$fe7db370$efa806cf@katmandu>...

S. Brent Faulkner

unread,
Apr 1, 1997, 3:00:00 AM4/1/97
to

Ed Slingland <--ed.sli...@inference.com> wrote in article
<01bc3ec5$e3a08ac0$1503598c@slinglandpc>...

> Have you looked at WM_KILLFOCUS message?
>
I'm considering installing a windows hook to track WM_KILLFOCUS (and
possibly WM_SETFOCUS) messages, but was wondering if there was a simpler
way than using a hook.

--Brent


0 new messages