资源简介
这是用vc ++编写的画板程序,可以画直线、圆、矩形等,功能比较稳定,支持键盘快捷键

代码片段和文件信息
// AsmDlg.cpp : implementation file
//
#include “stdafx.h“
#include “power.h“
#include “AsmDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAsmDlg dialog
CAsmDlg::CAsmDlg(CView *pView)
{
m_pView=pView;
m_bPausing=false;
m_bFirstStart=true;
m_offPlotToDlg=CRect(0000);
}
BOOL CAsmDlg::Create()
{
m_bFirstStart=true;
m_bCanSize=false;
return CDialog::Create(CAsmDlg::IDD);
}
void CAsmDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAsmDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAsmDlg CDialog)
//{{AFX_MSG_MAP(CAsmDlg)
ON_BN_CLICKED(IDC_ASMPRINTPREVIEW OnAsmprintpreview)
ON_BN_CLICKED(IDC_ASMPRINT OnAsmprint)
ON_BN_CLICKED(IDC_ASMSTART OnAsmstart)
ON_BN_CLICKED(IDC_ASMPAUSE OnAsmpause)
ON_WM_SIZE()
ON_WM_TIMER()
ON_WM_PAINT()
ON_BN_CLICKED(IDC_ASMDATASTORE OnAsmdatastore)
ON_BN_CLICKED(IDC_ASMDATASLOAD OnAsmdatasload)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAsmDlg message handlers
void CAsmDlg::OnAsmprintpreview()
{
// TODO: Add your control notification handler code here
m_pView->PostMessage(WM_ASMPRINTORPREVIEWASMPRINTPREVIEW);
}
void CAsmDlg::OnAsmprint()
{
// TODO: Add your control notification handler code here
m_pView->PostMessage(WM_ASMPRINTORPREVIEWASMPRINT);
}
void CAsmDlg::OnAsmstart()
{
// TODO: Add your control notification handler code here
m_lStartTime=timeGetTime();
long curtime=0;
double y=0.0;
m_asmrealtime.Reset();
m_asmrealtime.AddPoint(0curtime y);
SetTimer(11000NULL);
if(m_bFirstStart)
{
CButton *bt;
bt=(CButton *)GetDlgItem(IDC_ASMSTART);
m_bFirstStart=false;
bt->SetWindowText(“重新开始“);
}
else
{
CButton *bt;
bt=(CButton *)GetDlgItem(IDC_ASMPAUSE);
m_bPausing=false;
bt->SetWindowText(“暂停“);
}
}
void CAsmDlg::OnAsmpause()
{
// TODO: Add your control notification handler code here
CButton *bt;
bt=(CButton *)GetDlgItem(IDC_ASMPAUSE);
if(m_bPausing)
{
SetTimer(11000NULL);
m_bPausing=false;
bt->SetWindowText(“暂停“);
}
else
{
KillTimer(1);
m_bPausing=true;
bt->SetWindowText(“继续“);
}
}
BOOL CAsmDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
TRACE(“ OnInitDialog \n“);
m_bPausing=false; //暂停按钮现在为“非暂停”状态
CRect Rect;
//计算实时曲线区域坐标
CWnd *pd=(CWnd *)GetDlgItem(IDC_ASMREALTIME);
pd->GetClientRect(&Rect);//control logic coordinate
pd->ClientToScreen(&Rect);//screen coordinate
ScreenToClient(&Rect);//CView logic coordinate
m_asmrealtime.m_bAutoScrollX=true;
//m_asmrealtime.m_bUseRightYAxis=false;//单Y轴(默认)
m_as
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-03-04 16:29 画板\
文件 7427 2010-03-29 21:50 画板\article.dsp
文件 723 2010-03-29 21:50 画板\article.dsw
文件 82944 2010-03-29 21:50 画板\article.ncb
文件 55808 2010-03-29 21:49 画板\article.opt
文件 6336 2010-03-29 21:49 画板\AsmDlg.cpp
文件 2349 2010-03-29 21:49 画板\AsmDlg.h
文件 45056 2010-03-29 21:49 画板\cplot.dll
文件 22456 2010-03-29 21:49 画板\cplot.lib
目录 0 2011-03-04 16:29 画板\Debug\
文件 131124 2010-03-29 21:53 画板\Debug\article.exe
文件 139328 2010-03-29 21:53 画板\Debug\clPlot.dll
文件 13214 2010-03-29 21:53 画板\Debug\clPlot.exp
文件 22206 2010-03-29 21:53 画板\Debug\clPlot.lib
文件 128962 2010-03-29 21:53 画板\Debug\clPlot.obj
文件 320512 2010-03-29 21:51 画板\Debug\clPlot.pdb
文件 7365 2010-03-29 21:51 画板\Debug\plot.obj
文件 6580468 2010-03-29 21:51 画板\Debug\plot.pch
文件 796 2010-03-29 21:51 画板\Debug\plot.res
文件 7888 2010-03-29 21:51 画板\Debug\power.res
文件 117854 2010-03-29 21:51 画板\Debug\StdAfx.obj
文件 246784 2010-03-29 21:51 画板\Debug\vc60.idb
文件 430080 2010-03-29 21:51 画板\Debug\vc60.pdb
文件 2414 2010-03-29 21:49 画板\MainFrm.cpp
文件 1450 2010-03-29 21:49 画板\MainFrm.h
目录 0 2011-03-04 16:29 画板\plot\
文件 43923 2010-03-29 21:50 画板\plot\clPlot.cpp
文件 12307 2010-03-29 21:50 画板\plot\clPlot.h
文件 4339 2010-03-29 21:50 画板\plot\MemDC.h
文件 4295 2010-03-29 21:50 画板\plot\plot.001
文件 17956 2010-03-29 21:50 画板\plot\plot.aps
............此处省略39个文件信息
- 上一篇:c语言课程设计 学生考勤系统报告
- 下一篇:mfc聊天程序 网络编程用到的
相关资源
- VC++ 多线程文件读写操作
- 移木块游戏,可以自编自玩,vc6.0编写
- VC++MFC小游戏实例教程(实例)+MFC类库
- VC++实现CMD命令执行与获得返回信息
- qt 实现画板
- VC++基于OpenGL模拟的一个3维空间模型
- 基于VC++的SolidWorks二次开发SolidWorks
- 派克变换VC++源码(附文档)
- VC++ 串口
- VC++ 大富翁4_大富翁游戏源码
- VC++ 摄像头视频采集与回放源程序
- 转 VC++ 实现电子邮件(Email)发送
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- VC++ 服务程序编写及安装与卸载
- VC++6.0番茄西红柿VAXvirsual assist X完美破
- 基于改进的fcm算法的图像分割vc++
- VC++6.0 绿色版,免安装,非常好用。
- Microsoft Visual C++ 2005 Redistributable Pack
- VC++MFC课程设计的学生成绩管理系统
- 大智慧365DLL插件设计
- VC++6.0汉化包
- VC++完整商业界面源码(再上传)
- VC++编程技术600个大型项目源码.rar
- VC++实现RSA加密算法
- VC++ 中国象棋经典游戏源代码
- 郁金香VC++游戏辅助视频教程
- C语言进阶源码---基于graphics实现图书
- 摄影测量相对定向VC++程序
- VC++数字图像处理典型算法及实现
- VC++酒店客房管理系统 MFC
评论
共有 条评论