Solved

OnMouseMove

Posted on 2001-06-18
2
270 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

910 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

17 Experts available now in Live!

Get 1:1 Help Now