Hi Luthfi,
May I ask you for small example. What you advised to me, seems be really the
"winner". Only I am not
familiar with that type of programing. I found something on Greatis'
WinDowse program under "Window".
It is the "Process ID". If I can get this info, how to program it, it will
be 1000% enough for that, what I am
looking for.
Thanks,
Peter
----- Original Message -----
From: "Betta International" <betta_...@yahoo.com>
To: "Moderated List for the Discussion of Delphi Programming
excludingDatabase-related topics" <delphi@elists.org>
Sent: Sunday, October 10, 2010 4:21 AM
Subject: Re: Recognition ov application window
Hi Peter,
After a quick look to Win32 SDK, I think you already have the winner here.
After you install a mouse hook (see SetWindowsHookEx - WH_MOUSE) your
application will get notifications in the form of this record:
typedef struct tagMOUSEHOOKSTRUCT {
POINT pt;
HWND hwnd;
UINT wHitTestCode;
DWORD dwExtraInfo;
}
"pt" tells you the coordinate of the mouse, and "hwnd" tells you window
handle that is receiving the mouse message (i.e. directly under the cursor).
Now you can check if "pt" is within your application windows territory or
not. If so, you then you check if hwnd is your window or not (compare result
from win32 api GetWindowThreadProcessId of that hwnd against your
application process id).
Regards,
Luthfi B Hakim
--- On Sat, 10/9/10, Peter Kapas <pka...@sbcglobal.net> wrote:
From: Peter Kapas <pka...@sbcglobal.net>
Subject: Re: Recognition ov application window
To: Delphi@elists.org
Date: Saturday, October 9, 2010, 9:16 PM
Hi Francois,
Thanks, I already tried it. There are a few standard mouse
functions to simplify that,
but the major problem is, when the application window is
partly covered by the other
Windows applications and I cannot mask the area to say "I
do not see
my application, set-up indicator to False, if for seeing
that is True).
---
Peter
---------------------------
> I would like to find method how to recognize, the
mouse is over my
> application window. If that window is partly covered
by other application,
> I want to recognize that situation, in other words,
that time, I want see
> some indicator, which tells me, between mouse cursor
and my application
> window is something. How to do it? (I am using
Delphi 4).
Just an idea, not tested.
Install a mouse hook to get the mouse movements whatever
application is
above your's. Then knowing the area(s) where you
application is, you can
compute if the mouse is within or not, even if your app is
behind another
other one.
_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi