Results 1 to 1 of 1

Thread: Check if clicked in active word document instead main Word Window

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Posts
    91

    Cool 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:
    1. public function CallBack(...) 'fires when a general mouseclick happens
    2.   ' I have made a function to check  which is the active window, and gets the handle
    3.   Dim ClassName as string
    4.   'This function contains a GetClassName API
    5.   ClassName = NameActiveWindow(Hendel)
    6.  if ClassName <> "OpusApp" then
    7.    'We are not in a Word App so exit
    8.    exit function
    9.  end if
    10.  
    11.  '-Do some  actions
    12.  ...
    13. end function

    So i want to expand the above function, especially the ClassName test
    Last edited by lvermeersch; Nov 17th, 2005 at 05:24 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width