Article View: comp.windows.ms.programmer
Article #887Keeping a window "almost" in front
From: James Seidman
Date: Thu, 13 Dec 1990 21:41
Date: Thu, 13 Dec 1990 21:41
19 lines
1309 bytes
1309 bytes
I'm writing a utility program which I'd like to have (optionally) keep itself in front of all other programs. I could, of course, just do a SetWindowPos() with hWndInsertAfter set to NULL. The only problem with this idea, though, is that it gets ugly with screen savers such as Magic, Screen Peace, and IdleWild. So, I decided to be real clever: I set hWndInsertAfter equal to GetFocus(), figuring that at least most of the time the window with the focus would be in front. But doing this makes Windows hang as soon as it tries it! I'm sure I'm doing something obvious and stupid here, but I can't for the life of me figure out what it is. Any pointers would be appreciated! -- Jim Seidman (Drax), the accidental engineer. "There's a certain freedom to being completely screwed." - The Freshman UUCP: ames!vsi1!hsv3!jls Internet: hsv3.UUCP!jls@apple.com
Technical Details
Message-ID:
<6252@hsv3.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!vsi1!hsv3!jlsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!vsi1!hsv3!jls From: jls@hsv3.UUCP (James Seidman) Newsgroups: comp.windows.ms.programmer Subject: Keeping a window "almost" in front Message-ID: <6252@hsv3.UUCP> Date: 13 Dec 90 21:41:12 GMT Reply-To: jls@hsv3.UUCP (James Seidman) Organization: Video Seven / Headland Technology Lines: 19