Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Oct : Re: Howto retrieve form handle when a given control handle under the form

www.cryer.info
Managed Newsgroup Archive

Re: Howto retrieve form handle when a given control handle under the form

Subject:Re: Howto retrieve form handle when a given control handle under the form
Posted by:"Venu" (ven..@hotmail.com)
Date:Tue, 24 Oct 2006 10:34:38 +0530

Hi,

The function doesnt seems to work for mdi child forms. The function
retrieves
the mdi parent forms windows handle.


Venu

"Bill Dekleris" <quasar@hol.gr> wrote in message
news:45373ea8@newsgroups.borland.com...
> Try this :
>
> uses windows;
>
> function GetParentFormHandle(childHandle: THandle): THandle;
> begin
>     result := GetParent(childHandle);
>
>     while result <> 0 do
>        if GetParent(result) <> 0 then
>           result := GetParent(result)
>        else
>           break;
> end;
>
>
> Bill Dekleris.
>
>
> Venu wrote:
> > How to retrieve the forms handle when a given control handle under the
form
>
>
> --------------------------------------------------------------------------
---------------
>
>
> http://www.infosnap.eu
>
> Home page of InfoSnap, the powerful, all-purpose information and
> knowledge-base  manager.
>
> --------------------------------------------------------------------------
---------------

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive