Article View: borland.public.cppbuilder.nativeapi
Article #13953Re: Always On Top
From: Remy Lebeau (TeamB)
Date: Tue, 09 Sep 2003 19:09
Date: Tue, 09 Sep 2003 19:09
28 lines
1947 bytes
1947 bytes
"Mike King" <emailMK@excite.com> wrote in message
news:3f5e22d5$1@newsgroups.borland.com...
> __fastcall TForm2::TForm2(TComponent* Owner)
> : TForm(Owner)
> {
> SetWindowPos(Handle,
> HWND_TOPMOST,
> 0,0,0,0,
> SWP_NOMOVE |
> SWP_NOSIZE
> );
> }
You may also need to intercept the WM_SETFOCU and WM_KILLFOCUS messages so
that you can call SetWindowPos() again whenever the form has focus shifted
away from it and then returned, just in case other windows called
SetWindowPos() for themselves and overlap yours.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
Technical Details
Message-ID:
<3f5e2533@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f5df558@newsgroups.borland.com> <3f5e05b8$1@newsgroups.borland.com> <3f5e1390@newsgroups.borland.com> <3f5e1c14$1@newsgroups.borland.com> <3f5e22d5$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1acbe53880abfff X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-09 12:10:07 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f5df558@newsgroups.borland.com> <3f5e05b8$1@newsgroups.borland.com> <3f5e1390@newsgroups.borland.com> <3f5e1c14$1@newsgroups.borland.com> <3f5e22d5$1@newsgroups.borland.com> Subject: Re: Always On Top Date: Tue, 9 Sep 2003 12:09:11 -0700 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f5e2533@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1063134515 207.175.226.26 (9 Sep 2003 12:08:35 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail