Article View: borland.public.cppbuilder.nativeapi
Article #3653Re: Using a window handle
From: Malcolm Smith
Date: Thu, 11 May 2006 20:09
Date: Thu, 11 May 2006 20:09
54 lines
3088 bytes
3088 bytes
Yes, Remy. I understand. It's a strange contract since the Cleanup Manager window is quite small. Thanks for your input. -- Malcolm Smith MJ Freelancing http://www.mjfreelancing.com Associate Editor C++Builder Developers Journal http://www.bcbjournal.com "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:44636b16@newsgroups.borland.com... > > "Malcolm Smith" <mjfreelancing@optusnet.com.au> wrote in message > news:44631fb8$1@newsgroups.borland.com... > >> It turned out to be incorrect behaviour - my form become embedded >> in the cleanup manager (as described in the help file). > > That is what it is supposed to do. A window can't have a parent window > and > still be its own top-level window. If you need your dialog window to > remain > its own popup window, then you have to use a NULL parent window. But then > your popup window won't have any ties to the Cleanup Manager's window. > >> Is there any way I can make the cleanup manager auto >> minimize/restore if a user minimizes my form ? > > If your DLL is passed in an HWND parent window, you need to use it as a > parent window. That is the contract that the DLL needs to follow, since > that is the way the interface is spec'ed out to operate. > > With that said, one thing you can consider doing is to have > ShowProperties() > call EnumWindows() and GetWindowThreadProcessId() to build up a list of > all > the HWND handles that belong to the calling process. When your popup form > is minimized/restored, you can run through the list minimizing/restoring > those windows as needed. In order to detect when the user > minimizes/restores those windows directly, you would have to subclass them > via SetWindowLong(GWL_WNDPROC) to catch all messages that are issued to > them. > > > Gambit > >
Technical Details
Message-ID:
<44639a15@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4461e528@newsgroups.borland.com> <44621e0c$1@newsgroups.borland.com> <446259de@newsgroups.borland.com> <446260ad$1@newsgroups.borland.com> <44631fb8$1@newsgroups.borland.com> <44636b16@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,85bceed53b519705 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Malcolm Smith" <mjfreelancing@optusnet.com.au> From: "Malcolm Smith" <mjfreelancing@optusnet.com.au> Newsgroups: borland.public.cppbuilder.nativeapi References: <4461e528@newsgroups.borland.com> <44621e0c$1@newsgroups.borland.com> <446259de@newsgroups.borland.com> <446260ad$1@newsgroups.borland.com> <44631fb8$1@newsgroups.borland.com> <44636b16@newsgroups.borland.com> Subject: Re: Using a window handle Date: Fri, 12 May 2006 06:09:53 +1000 Lines: 56 Organization: MJ Freelancing X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 211.30.161.48 Message-ID: <44639a15@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1147378197 211.30.161.48 (11 May 2006 13:09:57 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail