⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testmousemoveview.cpp

📁 170话费催交系统
💻 CPP
字号:
// testmousemoveView.cpp : implementation of the CTestmousemoveView class
//

#include "stdafx.h"
#include "testmousemove.h"

#include "testmousemoveDoc.h"
#include "testmousemoveView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CTestmousemoveView

IMPLEMENT_DYNCREATE(CTestmousemoveView, CView)

BEGIN_MESSAGE_MAP(CTestmousemoveView, CView)
	//{{AFX_MSG_MAP(CTestmousemoveView)
	ON_WM_MOUSEMOVE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTestmousemoveView construction/destruction

CTestmousemoveView::CTestmousemoveView()
{
	// TODO: add construction code here

}

CTestmousemoveView::~CTestmousemoveView()
{
}

BOOL CTestmousemoveView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CTestmousemoveView drawing

void CTestmousemoveView::OnDraw(CDC* pDC)
{
	CTestmousemoveDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CTestmousemoveView diagnostics

#ifdef _DEBUG
void CTestmousemoveView::AssertValid() const
{
	CView::AssertValid();
}

void CTestmousemoveView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CTestmousemoveDoc* CTestmousemoveView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTestmousemoveDoc)));
	return (CTestmousemoveDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CTestmousemoveView message handlers

void CTestmousemoveView::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	char ls_str[50];
	CString strValue;
	CRect tmprect;
	//point(
	sprintf(ls_str,"x=%ld, y=%ld, nflags=%d",point.x,point.y,nFlags);
	//sprintf(ls_str,"11");
	strValue=ls_str;
	//MessageBox("提示",strValue);
	 //this->hwmd.GetWindowRect(tmprect);
//	HWndTT = CreateWindowExA(WS_EX_TOPMOST, TOOLTIPS_CLASS,0,TTF_CENTERTIP,CW_USEDEFAULT,CW_USEDEFAULT,&
//CW_USEDEFAULT,CW_USEDEFAULT, 0, 0,Handle(GetApplication()),0);
//DestroyWindow(hWndTT);
//SendMessageA(hWndTT,TTM_RELAYEVENT,0,Msg);
/*TOOLINFO ToolInfo

ToolInfo.cbSize = 40
ToolInfo.uFlags = Flag 
ToolInfo.hWnd = Handle(ControlObject)
ToolInfo.hInstance = 0
ToolInfo.uID = ToolID
ToolID++
ToolInfo.lpszText = LocalAlloc(0,80)

POST LocalFree(ToolInfo.lpszText)

lStrCpy(ToolInfo.lpszText,Left(tip,80))

Rect lrect

lrect.Left = 0
lrect.top = 0
lrect.right = UnitsToPixels(ControlObject.Width,XUnitsToPixels!)
lrect.bottom = UnitsToPixels(ControlObject.Height,YUnitsToPixels!)

ToolInfo.Rect = lrect

If ToolTipMsg(hWndTT,TTM_ADDTOOL, 0, ToolInfo) = 0 Then
MessageBox("出错","不能注册对象!",StopSign!,Ok!)
	Return(-1)
End If
Return(ToolID - 1)*/
	CView::OnMouseMove(nFlags, point);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -