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

WM_NCACTIVATE and WM_ACTIVATE

433 views
Skip to first unread message

Jim

unread,
Nov 30, 2008, 11:05:56 PM11/30/08
to

I am trying to create a MDI like UI for my app. One thing I can't seem
to duplicate to my liking is how the child windows in a MDI app show
the title bar as active when it is active. Snooping with WinSpector
Spy I see, as I expected, that I don't get WM_ACTIVATE or WM_NCACTIVATE
when the child window is activated (gets the focus). I snooped on a
MDI application and see that the window that shows the child windows
are getting WM_ACTIVATE and WM_NCACTIVATE messages.

The Styles and Extended Styles are the same as the MDI app (other than
the WS_EX_MDICHILD of course). How does the MDI manager make children
of the Client window look like Top Level Windows and send WM_ACTIVATE
and WM_NCACTIVATE messages?

Thanks,
Jim
--
www.mustangpeak.net

Jim

unread,
Nov 30, 2008, 11:29:03 PM11/30/08
to
Never mind, figured it out. Just send the WM_NCACTIVATE message myself.

Jim
--
www.mustangpeak.net

Alex Blekhman

unread,
Dec 1, 2008, 3:44:40 AM12/1/08
to
"Jim" wrote:
>
> I am trying to create a MDI like UI for my app. One thing I
> can't seem to duplicate to my liking is how the child windows in
> a MDI app show the title bar as active when it is active.

MDI uses WM_MDIACTIVATE message to activate its children. Probably
the default handler (i.e. DefMDIChildProc) calls SetActiveWindow.

HTH
Alex


Jim

unread,
Dec 1, 2008, 7:38:51 AM12/1/08
to
Alex Blekhman wrote:

Tried that with out any luck. SetActiveWindow is documented to work
for Top Level Windows.

Jim
--
www.mustangpeak.net

0 new messages