Mark,

The hook proc needs to be in a DLL because the WinAPI docs says so.  I think
that is to allow it to remap the DLL into the other process' address space -
just a guess.

In you case, you could FindWindow to get the handle, and in the hook proc,
look for a WM_SETTEXT message for the window handle.


Dennis.


> >What sort of App are you monitoring?  Why can't you use the
> > handle returned by FindWindow, and continue to use the handle.
> > Why do you need to know
>
> Well, the application I'm watching is WinAMP.  I have a util that edits my
> email sig with the current playing CD, and I'm adding the functionality to
> report the current playing mp3 (as requested by a user).  Now,
> the only way
> I can see to find out the current mp3 (without actually writing a
> plugin) is
> to monitor WinAMPs window title, which displays "13. Song title - WinAmp"
> where the number is the track number.
>
> I can just use a ttimer and watch for a change every second or
> so, which is
> what I will be doing unless I find a better way.  Why does the hook proc.
> need to be in a DLL?


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to