473,322 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Get Window handle from point

Hi, first sorry on awkward english.

I'll try to illustrate my problem:
(dont know how will this look on your scrren)

|--Dialog----------------------------------------------------------------------------|
|
|
| |-------groupbox----
-----------------------------------------------------| |
| |
| |
| |
| |
| | |-------------------------------|
| |
| | | Button P(x,y) |
| |
| | |-------------------------------|
| |
| |
| |
| |
| |
|
|-------------------------------------------------------------------------------|
|
|
|
|
|
|-----------------------------------------------------------------------------------------|
P(x,y) represents (point) position of cursor with coordinates x,y
, and that point
lies on button.

Button and groupbox are childs from dialog.

My problem is how to get handle form Button.

i tryed something like:
(this is only part of code)

HWND hwDlg;
HWND hwGroup;
HWND hwButt;

hwGroup = :: WindowFromPoint(p);
/* this is working, i get valid handle*/

hwDlg = ::GetParent(hwGroup);
/* this is also working */

hwButt = ::RealChildWindowFromPoint(hwDlg,p);
/* but here i always get NULL */

as i understand from msdn RealChildWindowFromPoint should return child
handle if
window(in this case button) if point is "over" window , and window is
in transparent area of groupbox .

any advice is most welcome.

Jan 9 '06 #1
8 10403

"Sinisa" <si*****@inet.hr> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...

You need to ask in a Windows newsgroup. The C+ language knows nothing about
windows or mouse coordinates.

-Howard
Jan 9 '06 #2
Howard wrote:
"Sinisa" <si*****@inet.hr> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...

You need to ask in a Windows newsgroup. The C+ language knows nothing about
windows or mouse coordinates.


....and we know nothing of the C+ language either! ;-)
[yeah, I know it's a typo...just couldn't resist!]

Cheers,
--ag
--
Artie Gold -- Austin, Texas
http://goldsays.blogspot.com
http://www.cafepress.com/goldsays
"If you have nothing to hide, you're not trying!"
Jan 9 '06 #3

"Artie Gold" <ar*******@austin.rr.com> wrote in message
news:42*************@individual.net...
Howard wrote:
"Sinisa" <si*****@inet.hr> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...

You need to ask in a Windows newsgroup. The C+ language knows nothing
about windows or mouse coordinates.


...and we know nothing of the C+ language either! ;-)
[yeah, I know it's a typo...just couldn't resist!]

Cheers,
--ag


What...this isn't the C+ newsgroup??? Oh, crap... no wonder my programs
aren't working!

-Howard

Jan 9 '06 #4
"Howard" <al*****@hotmail.com> wrote in message
news:7e*********************@bgtnsc04-news.ops.worldnet.att.net...

"Artie Gold" <ar*******@austin.rr.com> wrote in message
news:42*************@individual.net...
Howard wrote:
"Sinisa" <si*****@inet.hr> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...

You need to ask in a Windows newsgroup. The C+ language knows nothing
about windows or mouse coordinates.


...and we know nothing of the C+ language either! ;-)
[yeah, I know it's a typo...just couldn't resist!]

Cheers,
--ag


What...this isn't the C+ newsgroup??? Oh, crap... no wonder my programs
aren't working!


I'm developing the C-squared language. A massive project
requiring much energy.

-Mike
Jan 10 '06 #5
Mike Wahler <mk******@mkwahler.net> wrote:
I'm developing the C-squared language. A massive project
requiring much energy.


Mike's C-squared = MC^2
Maybe you should just call it E.

--
Marcus Kwok
Jan 10 '06 #6
On Tue, 10 Jan 2006 14:15:58 +0000 (UTC), ri******@gehennom.net
(Marcus Kwok) wrote:
Mike Wahler <mk******@mkwahler.net> wrote:
I'm developing the C-squared language. A massive project
requiring much energy.


Mike's C-squared = MC^2
Maybe you should just call it E.


E already exists. http://en.wikipedia.org/wiki/E_programming_language
Jan 10 '06 #7

"Marcus Kwok" <ri******@gehennom.net> wrote in message
news:dq**********@news-int.gatech.edu...
Mike Wahler <mk******@mkwahler.net> wrote:
I'm developing the C-squared language. A massive project
requiring much energy.


Mike's C-squared = MC^2
Maybe you should just call it E.


That was the point of my joke. (Someone else
has already created 'D').
-Mike
Jan 10 '06 #8
"W Marsh" <wa*********@gmail.com> wrote in message
news:hh********************************@4ax.com...
On Tue, 10 Jan 2006 14:15:58 +0000 (UTC), ri******@gehennom.net
(Marcus Kwok) wrote:
Mike Wahler <mk******@mkwahler.net> wrote:
I'm developing the C-squared language. A massive project
requiring much energy.


Mike's C-squared = MC^2
Maybe you should just call it E.


E already exists. http://en.wikipedia.org/wiki/E_programming_language


Ack. Working at the speed of light, and I'm
still too late. :-)

-Mike
Jan 10 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brad Jones | last post by:
<Previously posted in microsoft.public.dotnet.framework.windowsforms> Hi all. Any suggestions here would be appreciated. Thanks for reading. I'm primarly a C++ developer but I've been trying to...
3
by: Logan McKinley | last post by:
I need to draw a dot where ever the user clicks (which will be on either the form or a couple dynamically placed picture boxes). I thought the following code should work: //--- static public...
12
by: Bonj | last post by:
i'm trying to create a class that will contain all the features of instantiating a window and showing it. I've got the SetWindowLong / GetWindowLong pair to succesfully store the 'this' pointer in...
8
by: Tom | last post by:
I am using VB.NET to control another program. I have the program's window hwnd; however, I need to be able to set the focus to that other programs window so I can send it some keystrokes. I thought...
10
by: Ed Bitzer | last post by:
One option of the messagebox object indicates it can be placed over a selected window rather than just appearing centered on the desktop. The function is "Overloads Public Shared Function...
0
by: Sinisa | last post by:
Hi, first sorry on awkward english. I'll try to illustrate my problem: (dont know how will this look on your scrren) ...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
4
by: drodrig | last post by:
Hi. I am trying to close/kill all processes that show visible windows on Windows XP. So far I've created a script that uses win32gui.EnumWindows to iterate through all windows, check for which...
0
by: kloplop321 | last post by:
I found this code(vb only) and it does about the same thing(in vb, not vb .NET 2005) Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.