Article View: borland.public.cppbuilder.nativeapi
Article #3643Re: Using a window handle
From: Malcolm Smith
Date: Wed, 10 May 2006 21:19
Date: Wed, 10 May 2006 21:19
65 lines
3032 bytes
3032 bytes
Remy,
The HWND is coming into my DLL from the Cleanup Manager, not going out.
HRESULT STDMETHODCALLTYPE TDevCleanCtrlImpl::ShowProperties(HWND hwnd)
{
// we are caching the form in case the user shows it more than once
if( !frmFileDetails )
frmFileDetails = new TfrmFileDetails( NULL, FVolume, FFileSearch,
FFileStates );
if( frmFileDetails )
frmFileDetails->ShowModal();
return S_OK;
}
So how do I use the HWND in my form to tell it that the Cleanup Manager is
the parent form ?
I tried setting Application->Handle but that didn't make any difference.
--
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:44621e0c$1@newsgroups.borland.com...
>
> "Malcolm Smith" <mjfreelancing@optusnet.com.au> wrote in message
> news:4461e528@newsgroups.borland.com...
>
>> I cannot work out how to make use of the hwnd parameter correctly.
>
> According to the documentation:
>
> IEmptyVolumeCache::ShowProperties Method
>
> http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/ifaces/iemptyvolumecache/showproperties.asp
>
> hwnd
> [in] Parent window to be used when displaying the UI.
>
>
> Did you try passing in the Handle of your form as the parent window?
>
>> For example, if a user minimizes my form (which is currently modal) I'm
>> not sure how to make the calling (microsoft) window also minimize.
>
> It should minimize automatically if the window that ShowProperties()
> displays is a child of your form's window.
>
>> And, if a user restores either form to make sure they both restore.
>
> Child windows are automatically shown when their parent window is shown.
>
>
> Gambit
>
>
Technical Details
Message-ID:
<446259de@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!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>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> Subject: Re: Using a window handle Date: Thu, 11 May 2006 07:19:53 +1000 Lines: 67 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: <446259de@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1147296222 211.30.161.48 (10 May 2006 14:23:42 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail