473,473 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 10417

"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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.