Solved

ATL: How to get mouse event?

Posted on 1998-06-30
2
318 Views
Last Modified: 2013-11-20
I am developing an ActiveX control in VC++ ATL2.1.

I could not get WM_LBUTTONUP message when mouse button is released outside the control's client area.

( I could receive it when button is released within the client area)

How to receive it?

Thanks for any help.

Regards,
njug
0
Comment
Question by:njug
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
Norbert earned 20 total points
ID: 1318567
There is a function SetCapture
It exists as SDK function , CWnd Function and CWindow Function.
You have to call it on WM_LBUTTONDOWN so all mouse messages are going to your window regardles if the mouse is inside or outside your window
to release the capture call ReleaseCapture when capture is no more needed
Probably in WM_LBUTTONUP message handler

0
 

Author Comment

by:njug
ID: 1318568
Thanks a lot!

It worked!

Regards,
njug
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question