Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Feb : SW_MAXIMIZE no activate?

www.cryer.info
Managed Newsgroup Archive

SW_MAXIMIZE no activate?

Subject:SW_MAXIMIZE no activate?
Posted by:"JF" (nospamdeedee@nospam.daa)
Date:Fri, 18 Feb 2005 20:06:57

I have a window inside a panel. Why? because the panel is the window's
parent (I used setparent).  This works fine..however..

When I maximize the form inside the panel using:
ShowWindow(HandleOfWin, sw_maximize);

The window inside the panel maximizes but sets focus to the window! I want
to maximize, but not set focus.
Is there a way to do that? my temporary work around is to just set focus
back to my form after sending that sw_maximize message. This isn't the best
solution though, because that makes the window flash and have a temporary
flicker.

I see in the windows API help that there is a
-SW_SHOWMINNOACTIVE
but no
-SW_SHOWMAXNOACTIVE

I don't know why they would have SW_Maximize in the API if it's no different
than SW_SHOWMAXIMIZED. I would have thought sw_maximize might have maximized
the window without setting focus to it.

Is there some other way using another API message, so I can maximize a
window without setting focus or activating it?

Replies:

www.cryer.info
Managed Newsgroup Archive