Hi William,
Yep the dll is a can cause a lot of problems, We are testing it a lot and
hope to resolve most of the issues.
When EnumWindows is used the results are not that accurate and if there are
child windows associated with the application i may get the hwnd of the
child window. if my dll was launched by an exe with the caption "Testing for
HWND". i get the hmodule of this using GetModuleHandle(NULL). if i can get
the caption of this. I will get the hwnd of the parent window using
findwindow and using the caption.
BTW one of the childwindows attached to this application, is attached by my
dll itself..
Regards
Abhishek
"William DePalo [MVP VC++]" <wi***********@mvps.orgwrote in message
news:u5**************@TK2MSFTNGP03.phx.gbl...
"Abhishek" <sh***@activelement.comwrote in message
news:e5**************@TK2MSFTNGP03.phx.gbl...
>firstly thanks for replying,
You are welcome.
>I have a dll that is being called by an app,
A dll is a library that contains functions which may be called (or called
back)
>the application may change but my dll will always be called since it is a
system wide hook.
System wide hooks are big hammers. Swing wide of the mark and innocents
get hurt. :-)
>I need to know the window caption of the app that loaded my dll.
You write "_the_ window caption" but an application which triggers a hook
may have many windows. Which do you want?
Why not take a step back and describe what you want to do rather than how
you want to do it?
Regards,
Will