Article View: borland.public.cppbuilder.nativeapi
Article #3652Re: Using a window handle
From: Remy Lebeau (TeamB)
Date: Thu, 11 May 2006 16:47
Date: Thu, 11 May 2006 16:47
30 lines
2426 bytes
2426 bytes
"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:
<44636b16@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!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>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,85bceed53b519705 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> 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> Subject: Re: Using a window handle Date: Thu, 11 May 2006 09:47:10 -0700 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <44636b16@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1147366166 68.69.17.41 (11 May 2006 09:49:26 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail