Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ATL: How to get mouse event?

Posted on 1998-06-30
2
Medium Priority
?
322 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 80 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

704 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