Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

OnMouseMove

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
win32
Asked:
win32
1 Solution
 
Meir RivkinFull stack Software EngineerCommented:
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
 
gilad_noCommented:
If you are using multiple windows, you might want to use SetCapture to catch all keyboard & mouse input of your window.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now