Solved

OnMouseMove

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

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: 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.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

630 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