• 大小: 4.44KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-27
  • 语言: 其他
  • 标签: 其他  

资源简介


MFC控件绘二维坐标,包括放大缩小,鼠标平移,坐标点tip。

资源截图

代码片段和文件信息

// hnPointsShow.cpp : 实现文件
//

#include “stdafx.h“
#include “hniTE.h“
#include “hnPointsShow.h“
#include 
#include “MainFrm.h“
// hnPointsShow

IMPLEMENT_DYNAMIC(hnPointsShow CStatic)

hnPointsShow::hnPointsShow()
{
InitialVars();
}

hnPointsShow::~hnPointsShow()
{
for (int i = 0; i < m_points.size(); i++)
{
delete []m_points[i].x;
delete []m_points[i].y;
}
m_points.swap(std::vector());
}


BEGIN_MESSAGE_MAP(hnPointsShow CStatic)
ON_WM_PAINT()
ON_WM_LBUTTONDOWN()
ON_WM_MOUSEMOVE()
ON_WM_MOUSEWHEEL()
ON_WM_LBUTTONUP()
ON_WM_RBUTTONDOWN()
ON_WM_RBUTTONUP()
ON_WM_LBUTTONDBLCLK()
ON_WM_MOUSEHOVER()
ON_WM_MOUSELEAVE()
END_MESSAGE_MAP()

// hnPointsShow 消息处理程序




void hnPointsShow::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: 在此处添加消息处理程序代码
// 不为绘图消息调用 CStatic::OnPaint()
DrawCoordinate(dc);
}

void hnPointsShow::DrawCoordinate(CPaintDC &dc)
{
CRect rt;
GetClientRe

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件       12605  2018-03-23 15:19  hnPointsShow.cpp
     文件        2155  2018-03-23 15:21  hnPointsShow.h

评论

共有 条评论