Solved

OnMouseMove

Posted on 2001-06-18
2
268 Views
Last Modified: 2013-11-20
Hi,

I tryed to implemten OnMouseMove(xx), in my programm, but the function "OnMouseMove" is not called, when the mouse is moved.. What have I forgot to implemten ?

CB
0
Comment
Question by:win32
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 20 total points
ID: 6201292
if u implement OnMouseMove manually without using the wizard u may forgot the message map.
when u add message handler usualy u need to add 3 things:
1. declare the function on header
2. add the messager handler on MESSAGE MAP on cpp
3. implementation the function

1.afx_msg void OnMouseMove(UINT nFlags, CPoint point);

2.BEGIN_MESSAGE_MAP(CZ3View, CScrollView)
.
.
ON_WM_MOUSEMOVE() //this is what u might forgot...

3.void CMyView::OnMouseMove(UINT nFlags, CPoint point)
{
//implementation code comes here
}

good luck
0
 

Expert Comment

by:gilad_no
ID: 6201993
If you are using multiple windows, you might want to use SetCapture to catch all keyboard & mouse input of your window.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

10 Experts available now in Live!

Get 1:1 Help Now