473,387 Members | 1,510 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,387 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 10413

"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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.