Article View: borland.public.cppbuilder.nativeapi
Article #5765Bring Window to the Top
From: PC Hua
Date: Wed, 13 Jul 2005 00:31
Date: Wed, 13 Jul 2005 00:31
24 lines
1709 bytes
1709 bytes
Hi, In my program I'm using a SDL-window (from open source SDL). I'm using its handle to bring it over a TForm window: SetWindowPos( Handle, HWND_TOPMOST, 0,0,0,0, SWP_NOMOVE| SWP_NOSIZE); I've tried HWND_TOP and HWND_NOTOPMOST (also SetForegroundWindow()) and it didn't work. So, I use HWND_TOPMOST. Since I want the TForm window to come up as soon as the user click on it (i.e. SDL window should not stay on top). Then I added following line: SetWindowPos( Handle, HWND_NOTOPMOST, 0,0,0,0, SWP_NOMOVE| SWP_NOSIZE); Everything was working fine. But I just found out that the 2nd SetWindowPos( HWND_NOTOPMOST) has no effect on XP and the SDL-window stays on top :-( Any other way to bring a window with its handle to top? thanks Phuoc Can HUA -- - - - - - - - - - - - - - - - - - - - - I'm using BCB5 on XP Home Edition.
Technical Details
Message-ID:
<opstts20iipmxkmr@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,19abfa92834f1fcd,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: borland.public.cppbuilder.nativeapi Subject: Bring Window to the Top From: PC Hua <home-AT-huaonline.DOT.com> Content-Type: text/plain; format=flowed; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Wed, 13 Jul 2005 10:31:38 +1000 Message-ID: <opstts20iipmxkmr@newsgroups.borland.com> User-Agent: Opera7.21/Win32 M2 build 3218 NNTP-Posting-Host: 203.194.21.162 X-Trace: newsgroups.borland.com 1121214699 203.194.21.162 (12 Jul 2005 17:31:39 -0700) Lines: 24 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail