CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Posts
    143

    LButtonDown Outside Dialog?

    How can i get LButtonDown events outside of a dialog - meaning that i want the messages to be sent to the dialog regardless of whether the mouse is inside that dialog. I tried to use GetCapture, but i'm not getting WM_LBUTTONDOWN or WM_NCLBUTTONDOWN if the mouse is outside the dialog. Any ideas? Thanks!

  2. #2
    Join Date
    Sep 2000
    Location
    Munich (Germany)
    Posts
    764
    hook the mouse

    SetWindowsHook with idHook as WH_MOUSE

    john.
    Do you develop for PocketPCs? Try this tool for CeDatabases

    CeDatabase Manager 2.0

  3. #3
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917
    Will not suffice if this is not a global hook (in library). Even if Justavian uses SetWindowsHookEx (SetWindowsHook is obsolete for 32bit windows) it will monitor mouse within application window... If we only knew if this is dialog based app or not...

    If it is dialog based application it will be almost equivalent of handling mouse messages for client and non-client areas of the main window.

    WH_MOUSE_LL – low level mouse hook will work but only for 2000/XP 9x and Me is not supported
    Last edited by JohnCz; January 18th, 2003 at 03:58 PM.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

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

Featured