🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to get a window's coordinates?

#3938
From: Helmut Giese
Date: Wed, 05 Apr 2006 20:12
35 lines
2246 bytes
On Wed, 05 Apr 2006 11:11:46 -0700, Bob Gonder
<notbg@notmindspring.invalid> wrote:

>Helmut Giese wrote:
>
>>Well, needs some more experiments :(
>
>You might try iterating the client window with
>
>    for( point.x=10;  x<MaxClient.x-10;  point.x+=10 )
>    for( point.y=10;  x<MaxClient.y-10;  point.y+=10 )
>
>     if( (menuitem = MenuItemFromPoint( hwnd, hmenu, point )) != -1 )
>    {	//We have menu item number menuitem at location point
>	if( menuitem == menuitemwewant )
>	{	// we have a point within the item we want
>	}
>    }

Hi Bob,
thanks for the idea, but my problem is just that I don't have a
'hmenu' (and neither the hwnd to go with it).

I have some window managed by Tk (it's a window because I can get its
hwnd). It's not a menu ('IsMenu' says no), it does not _have_ a menu
(GetMenu returns 0), it doesn't have a parent (GetParent says so) - I
figured maybe this thing I have is a child of someone else - but I can
query it e.g. for its active index.

A bit weird. For the moment I ran out of ideas what ot try next, so
the project is put on hold. Hm, I _knew_ why I wrote a bit earlier in
this thread 
	it's not clear who is going to win
Best regards
Helmut Giese
Technical Details
Message-ID: <44341c9e.17062687@forums.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44319b6a.32745546@forums.borland.com> <4431a703$1@newsgroups.borland.com> <44323f3e.1124992@forums.borland.com> <4432b151@newsgroups.borland.com> <4432cef6.24197000@forums.borland.com> <4432eb44@newsgroups.borland.com> <4433e164.1830859@forums.borland.com> <3j1832ltm893aucqnf8achkihbmdao0k27@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4578913d357812e3
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: hgiese@ratiosoft.com (Helmut Giese)
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to get a window's coordinates?
Date: Wed, 05 Apr 2006 20:12:14 GMT
Message-ID: <44341c9e.17062687@forums.borland.com>
References: <44319b6a.32745546@forums.borland.com> <4431a703$1@newsgroups.borland.com> <44323f3e.1124992@forums.borland.com> <4432b151@newsgroups.borland.com> <4432cef6.24197000@forums.borland.com> <4432eb44@newsgroups.borland.com> <4433e164.1830859@forums.borland.com> <3j1832ltm893aucqnf8achkihbmdao0k27@4ax.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: 141.51.159.134
X-Trace: newsgroups.borland.com 1144267818 141.51.159.134 (5 Apr 2006 13:10:18 -0700)
Lines: 35
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail