Solved

OnMouseMove

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 90
sumNumber challenge 16 122
Prevent this page from creating additional dialogs. 3 532
either24  challenge 19 97
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…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

773 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