Hi Gunnar,

I think I tried it, but I go back to check, what was wrong with that.

Thanks,
Peter

--- On Mon, 10/25/10, Gunnar Blumert <gun...@blumert.de> wrote:

From: Gunnar Blumert <gun...@blumert.de>
Subject: Re: Recognition ov application window
To: "Moderated List for the Discussion of Delphi Programming 
excludingDatabase-related topics" <delphi@elists.org>
Date: Monday, October 25, 2010, 1:12 AM

Hi Peter,

to get the current process ID, just call GetCurrentProcessID()

-Gunnar

----- Original Message ----- From: "Peter Kapas" <pka...@sbcglobal.net>
To: "Moderated List for the Discussion of Delphi 
ProgrammingexcludingDatabase-related topics" <delphi@elists.org>
Sent: Monday, October 25, 2010 6:47 AM
Subject: Re: Recognition ov application window


> 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
Gunnar Blumert Softwareentwicklung
Waldstr. 117
25712 Burg (Dithmarschen)
Germany
Tel. +49-(0)4825-2892 (14.00-16.00h)
Fax: +49-(0)4825-1217
Email gun...@blumert.de
www.blumert.de

_______________________________________________
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

Reply via email to