🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15451

Re: about get window by pos.

#15451
From: Siney San
Date: Sat, 28 Jun 2003 10:12
42 lines
2178 bytes
According to the MDSN:
"ChildWindowFromPointEx"
.......
      CWP_ALL Does not skip any child windows
      CWP_SKIPINVISIBLE Skips invisible child windows
      CWP_SKIPDISABLED Skips disabled child windows
      CWP_SKIPTRANSPARENT Skips transparent child windows


and write code like below:

HWND TMainForm::GetRealWindow(POINT ptPoint) //Get real sub wnd
{
 HWND hparent = WindowFromPoint(ptPoint);
  ::ScreenToClient(hparent,&ptPoint);
  HWND hchild=NULL;
  hchild=ChildWindowFromPointEx(hparent,ptPoint,CWP_ALL);
  while(!hchild && hchild!=hparent)
  {
    hparent=hchild;
    ::ScreenToClient(hparent,&ptPoint);
    hchild=ChildWindowFromPointEx(hparent,ptPoint,CWP_ALL);
  }
  return hchild;
}

but alsoe can't get any grayed disable, invisible window?why?


>
> > But that api can't get gray window(disable).
>
> According to the documentation:
>
>     "The WindowFromPoint function does not retrieve the handle of a hidden
> or disabled window, even if the point is within the window. An application
> should use the ChildWindowFromPoint function for a nonrestrictive search."
>
>
> Gambit
>
>
Technical Details
Message-ID: <3efd6a06@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3efbf96b@newsgroups.borland.com> <3efc70d0@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5a7ad1e748c52c2b
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-28 03:50:32 PST
Reply-To: "Siney San" <siney@yeah.net>
From: "Siney San" <siney@yeah.net>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3efbf96b@newsgroups.borland.com> <3efc70d0@newsgroups.borland.com>
Subject: Re: about get window by pos.
Date: Sat, 28 Jun 2003 18:12:08 +0800
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 202.100.9.1
Message-ID: <3efd6a06@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1056795142 202.100.9.1 (28 Jun 2003 03:12:22 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail