Article View: borland.public.cppbuilder.nativeapi
Article #758Re: How to ... ?
From: Asger Joergensen
Date: Fri, 25 Jan 2008 12:18
Date: Fri, 25 Jan 2008 12:18
29 lines
1922 bytes
1922 bytes
Hi Jos
Jos says:
> On Thu, 24 Jan 2008 13:41:36 -0800, "Remy Lebeau \(TeamB\)"
> <no.spam@no.spam.com> wrote in borland.public.cppbuilder.nativeapi:
>
> >> A program displays some status information. I want it
> >> to be "Always On Top" without taking focus for input.
> >> Can it be done?
> >
> >Sure. "Stay on Top" and "input focus" are two separate things. Just
> >because a window is on top does not mean that the user can't still click on
> >other windows.
>
> But how? I can find no functions which force a window on top. And I
> think it is easy to take focus, but not to deny focus.
SetWindowPos(Form2->Handle,
HWND_TOPMOST,
Form2->Left, // horizontal position
Form2->Top, // vertical position SWP_NOREDRAW |
Form2->Width, // width
Form2->Height, // height
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE
);
Kind regards
Asger
Technical Details
Message-ID:
<MPG.2203f216630e254a989a19@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<871ip39v9f1nqt1f3i2pk22bpfifsl6p3t@4ax.com> <479905e2$1@newsgroups.borland.com> <pbajp3d5r5g754trs4jdqh8e28srn3cq1u@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,92f426904d27d7ce X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Asger Joergensen <junk@Asger-P.dk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How to ... ? Date: Fri, 25 Jan 2008 13:18:52 +0100 Message-ID: <MPG.2203f216630e254a989a19@newsgroups.borland.com> References: <871ip39v9f1nqt1f3i2pk22bpfifsl6p3t@4ax.com> <479905e2$1@newsgroups.borland.com> <pbajp3d5r5g754trs4jdqh8e28srn3cq1u@4ax.com> Organization: Asger-P MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit User-Agent: MicroPlanet-Gravity/2.70.2067 NNTP-Posting-Host: 83.73.201.25 X-Trace: newsgroups.borland.com 1201263528 83.73.201.25 (25 Jan 2008 04:18:48 -0700) Lines: 29 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail