Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2004, 02:25 AM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default VC++ - how to get mouse coordinates

i have some dynamically created CBitmapButtons in my CWizView(ViewArea). I need to capture the MouseMove messages when i move the mouse over this Bitmap Buttons. i am using CWizView::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) to capture the mouse events.
here the code
LRESULT CWizView::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{

// TODO: Add your specialized code here and/or call the base //class

 if(message == WM_COMMAND)
 {
 if(LOWORD(wParam) == 4)//to isentify 4th button
 {
     if(HIWORD(wParam) == BN_CLICKED)
     {
         AfxMessageBox("CLICKED");
      }
 }
 }
 return CScrollView::DefWindowProc(message, wParam, lParam);
}

here BN_CLICKED used to find out the click message, like wise how to capture mouse move message over the dynamiccaly created buttons.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to move the mouse in VC++ 2005 marcelo39 Visual C++ 0 April 25th, 2008 09:36 AM
Image Coordinates everest ASP.NET 1.0 and 1.1 Basics 1 October 18th, 2005 11:54 PM
convert VC++ 5.0 project to VC++ 6.0 MIDL ERR mdahd90943 Visual C++ 0 May 26th, 2005 08:57 AM
How to capture mouse coordinates in an IE window? APX Visual C++ 1 May 17th, 2005 03:01 AM
coordinates buzzfever Beginning VB 6 1 September 23rd, 2003 05:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.