Check if clicked in active word document instead main Word Window
I use Word automation in my VB6 application
-I want to check if the user mouseclicks in the actual document area of the active Word window. So far I can check with a DLL if the user clicks on the main Word Window (including the menu, and proppopupwindows, and i want to avoid this)
So i have a DLL that fires my VB CallBack function when a general click (can be on any external app) happens.
VB Code:
public function CallBack(...) 'fires when a general mouseclick happens
' I have made a function to check which is the active window, and gets the handle
Dim ClassName as string
'This function contains a GetClassName API
ClassName = NameActiveWindow(Hendel)
if ClassName <> "OpusApp" then
'We are not in a Word App so exit
exit function
end if
'-Do some actions
...
end function
So i want to expand the above function, especially the ClassName test