Solved

ATL: How to get mouse event?

Posted on 1998-06-30
2
262 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
2 Comments
 
LVL 3

Accepted Solution

by:
Norbert earned 20 total points
Comment Utility
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
Comment Utility
Thanks a lot!

It worked!

Regards,
njug
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now