Article View: comp.os.ms-windows.programmer.misc
Article #1986Re: Bringing Application Windows to the top
From: Tom W. Brown
Date: Thu, 17 Dec 1992 17:13
Date: Thu, 17 Dec 1992 17:13
27 lines
1534 bytes
1534 bytes
In article <1992Dec17.122321.20939@cs.nott.ac.uk>, mak@vulcan.xtel.co.uk (Martijn Koster) writes: |> |> Hi, |> I`ve got fairly simple question: |> |> Given a HWND, how can I bring an Application window to the top? Try SetActiveWindow(hwnd) to bring the window specified by 'hwnd' to the top and making it the active window. |> To do this I check for a previous instance on startup, and if there |> is one I use EnumWindows to step through the windows looking for |> the one belonging to the previous instance. As you mention, this works -- however since you are looking for a window that this application (albeit another instance) has created you could save a little effort by using FindWindow() with the registered name for the window class. ---------------------------------------------------------------------------- Tom Brown | "She turned me into a newt... PE Nelson Systems | ... I got better" twbrown@pe-nelson.com | Monty Python and the Holy Grail ----------------------------------------------------------------------------
Technical Details
Message-ID:
<719@lax.lax.pe-nelson.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrownReferences:
<1992Dec17.122321.20939@cs.nott.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!lax.pe-nelson.com!lax!twbrown From: twbrown@PE-Nelson.COM (Tom W. Brown) Newsgroups: comp.os.ms-windows.programmer.misc Subject: Re: Bringing Application Windows to the top Message-ID: <719@lax.lax.pe-nelson.com> Date: 17 Dec 92 17:13:10 GMT References: <1992Dec17.122321.20939@cs.nott.ac.uk> Sender: news@lax.pe-nelson.com Organization: PE-Nelson Lines: 27