home *** CD-ROM | disk | FTP | other *** search
- // wherevw.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "whereami.h"
- #include "wherevw.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CWhereamiView
-
- IMPLEMENT_DYNCREATE(CWhereamiView, CFormView)
-
- CWhereamiView::CWhereamiView()
- : CFormView(CWhereamiView::IDD)
- {
- //{{AFX_DATA_INIT(CWhereamiView)
- m_Horiz = "";
- m_Vert = "";
- //}}AFX_DATA_INIT
- }
-
- CWhereamiView::~CWhereamiView()
- {
- }
-
- void CWhereamiView::DoDataExchange(CDataExchange* pDX)
- {
- CFormView::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CWhereamiView)
- DDX_Text(pDX, IDC_HORIZ, m_Horiz);
- DDX_Text(pDX, IDC_VERT, m_Vert);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CWhereamiView, CFormView)
- //{{AFX_MSG_MAP(CWhereamiView)
- ON_WM_MOUSEMOVE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CWhereamiView message handlers
-
-
- void CWhereamiView::OnMouseMove(UINT nFlags, CPoint point)
- {
- // TODO: Add your message handler code here and/or call default
-
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
- char XPosition[10];
- char YPosition[10];
-
- itoa ( point.x, XPosition, 10 );
- itoa ( point.y, YPosition, 10 );
-
- m_Horiz = XPosition;
- m_Vert = YPosition;
-
- UpdateData(FALSE);
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- CFormView::OnMouseMove(nFlags, point);
- }
-