资源简介
C++ 曲线图 双缓冲绘图 区域图 柱形图 内存图片的保存
共同学习,资源共享 学习总结
取之于网络付之于网络
代码片段和文件信息
#include “StdAfx.h“
#include “ChartDraw.h“
#include “math.h“
#include
CListDataListChart;
CChartDraw::CChartDraw(void)
{
m_nIndexN = NULL;
m_nIndex = NULL;
m_nGapLeft = 50;//曲线图的四方距离
m_nGapRight = 10;
m_nGapTop = 20;
m_nGapBottom = 30;
m_nGradWidth = 10;
nTicks = 10;
nSubTicks = 5;//温度计刻度标记
m_nLTop = 10;
m_nLBottom = 30;
}
CChartDraw::~CChartDraw(void)
{
if(&memBitmap)
{
memBitmap.Deleteobject();
}
if(memDC.GetSafeHdc())
{
memDC.DeleteDC();
}
}
void CChartDraw::InitChart(CRect rect)
{
m_BackGroundColor = RGB(000);
m_BorderColor = RGB(255225255);
m_GradColor = RGB(255255255);
m_FormColor = RGB(129129129);//RGB(64224208);//RGB(1288080);
m_TXTColor = RGB(255255255);
m_nLeftRight = 5;
m_nPolyTail = 20;
m_nMarkLenS = 10;
m_nMarkLenM = 20;
m_ChartData.m_MaxLimit = 90.00;
m_ChartData.m_MinLimit = 0;
m_ChartData.m_HightLimit = 45.00;
m_ChartData.m_LowLimit = 15.00;
m_ChartData.m_ChHAColor = RGB(15500);
m_ChartData.m_ChLAColor = RGB(01550);
m_ChartData.m_ChColor = RGB(00155);
m_DrawScreenRect = CRect(rect);
m_DrawMemRect.top = 0;
m_DrawMemRect.left = 0;
m_DrawMemRect.right = m_DrawScreenRect.Width();
m_DrawMemRect.bottom = m_DrawScreenRect.Height();
m_SlideRect.top = m_DrawMemRect.top + m_nLTop;
m_SlideRect.left = m_DrawMemRect.left + (m_DrawMemRect.Width()*2)/5;
m_SlideRect.right = m_DrawMemRect.right - (m_DrawMemRect.Width()*2)/5;
m_SlideRect.bottom = m_DrawMemRect.bottom - m_nLBottom;
m_nRadiusframe = m_SlideRect.Width()/8;
m_pbSolideCenter = m_SlideRect.CenterPoint();
m_pbSolideCenter.y += m_SlideRect.Height()/2 - m_nRadiusframe*2;
m_ptSolideCenter = m_SlideRect.CenterPoint();
m_ptSolideCenter.y -= m_SlideRect.Height()/2 - m_nRadiusframe*2;
int nTmpWHarea;
nTmpWHarea = rect.Width()* rect.Height();
//四个窗口
if(nTmpWHarea <= 10000 && nTmpWHarea > 5000)//800*600
{
m_nHeight = -3;
m_nHeight0 = -10;
}
else if(nTmpWHarea <= 20000 && nTmpWHarea > 10000)//800*600
{
m_nHeight = -2;
m_nHeight0 = -8;
}
else if(nTmpWHarea <= 40000 && nTmpWHarea > 20000)//800*600
{
m_nHeight = -1;
m_nHeight0 = -6;
}
else if(nTmpWHarea <= 60000 && nTmpWHarea > 40000)//800*600
{
m_nHeight = -1;
m_nHeight0 = -4;
}
else if(nTmpWHarea <= 80000 && nTmpWHarea > 60000)//800*600
{
m_nHeight = -1;
m_nHeight0 = -2;
}
else if(nTmpWHarea <= 120000 && nTmpWHarea > 80000)//800*600
{
m_nHeight = 0;
m_nHeight0 = m_nHeight;
}
else if(nTmpWHarea <= 80000 && nTmpWHarea > 120000)
{
m_nHeight = 1;
m_nHeight0 = m_nHeight;
}
else if(nTmpWHarea <= 160000 && nTmpWHarea > 120000)//1024* 768
{
m_nHeight = 4;
m_nHeight0 = m_nHeight;
}
else if(nTmpWHarea <= 200000 && nTmpWHarea > 160000)//1024* 768
{
m_nHeight = 6;
m_nHeight0 = m_nHeight;
}
else if(nTmpWHarea
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 41462 2012-04-15 20:46 MyDrawChart1\ChartDraw.cpp
文件 3904 2012-04-15 20:46 MyDrawChart1\ChartDraw.h
文件 6352 2012-04-15 20:52 MyDrawChart1\Debug\BuildLog.htm
文件 203996 2012-04-15 20:49 MyDrawChart1\Debug\ChartDraw.obj
文件 20735 2012-04-15 20:49 MyDrawChart1\Debug\Live.obj
文件 67 2012-04-15 20:52 MyDrawChart1\Debug\mt.dep
文件 2912256 2012-04-15 20:52 MyDrawChart1\Debug\MyDrawChart.exe
文件 146 2012-04-15 20:49 MyDrawChart1\Debug\MyDrawChart.exe.em
文件 212 2012-04-15 20:49 MyDrawChart1\Debug\MyDrawChart.exe.em
文件 145 2012-04-15 20:52 MyDrawChart1\Debug\MyDrawChart.exe.intermediate.manifest
文件 5691124 2012-04-15 20:52 MyDrawChart1\Debug\MyDrawChart.ilk
文件 22822 2012-04-15 20:49 MyDrawChart1\Debug\MyDrawChart.obj
文件 13434880 2012-04-15 20:49 MyDrawChart1\Debug\MyDrawChart.pch
文件 10890240 2012-04-15 20:52 MyDrawChart1\Debug\MyDrawChart.pdb
文件 37196 2012-04-15 20:52 MyDrawChart1\Debug\MyDrawChart.res
文件 103757 2012-04-15 20:50 MyDrawChart1\Debug\MyDrawChartDlg.obj
文件 333750 2012-04-15 20:49 MyDrawChart1\Debug\stdafx.obj
文件 707584 2012-04-15 20:50 MyDrawChart1\Debug\vc80.idb
文件 700416 2012-04-15 20:50 MyDrawChart1\Debug\vc80.pdb
文件 682 2012-04-13 18:07 MyDrawChart1\Live.cpp
文件 392 2012-04-13 18:07 MyDrawChart1\Live.h
文件 60072 2012-04-15 20:52 MyDrawChart1\MyDrawChart.aps
文件 2149 2012-04-13 09:38 MyDrawChart1\MyDrawChart.cpp
文件 534 2012-04-13 09:38 MyDrawChart1\MyDrawChart.h
文件 10087424 2012-04-15 20:52 MyDrawChart1\MyDrawChart.ncb
文件 6757 2012-04-15 20:52 MyDrawChart1\MyDrawChart.rc
文件 886 2012-04-13 09:38 MyDrawChart1\MyDrawChart.sln
..A..H. 31744 2012-04-15 20:52 MyDrawChart1\MyDrawChart.suo
文件 5777 2012-04-13 18:05 MyDrawChart1\MyDrawChart.vcproj
文件 1427 2012-04-13 18:08 MyDrawChart1\MyDrawChart.vcproj.KJ-5193AC24A30B.admin.user
............此处省略15个文件信息
相关资源
- 《数据结构》清华大学C语言版内部课
- C++语言程序设计学生用书
- c实现的sift算法源代码
- 数字签名算法,c++实现,RSA的算法
- Visual C++ 2008 x86 Runtime Setup
- c++实现局域网文件传送基于socket
- C++ Google地图API源码
- FTP客户端与服务器的MFC实现
- c++ssk皮肤文件使用方法
- c语言编写的hmm的程序
- C89(ISO/IEC 9899 1990)中文版 GB/T 15272
- 《Qt中的C++技术》
- 完整的C++贪吃鱼游戏
- 常用算法程序集(C语言描述) 第三版
- cpp-Craft使用现代OpenGL用C语言编写的一
- 基于UDP协议的聊天程序 MFC环境下的
- ARP协议获取所有局域网内活动主机的
- C++培训课程资料1
- C++编写的邮局选址问题
- 停车场管理系统C语言报告
- C++全英文授课课件
- c++音乐播放器
- MFC简单邮件收发系统
- 基于ivector的声纹验证demo
- C++程序设计谭浩强PDF完整版
- 基于OpenSSL的RSA加解密的C语言实现
- Visual C++音频-视频技术开发与实战1-
- VC++计算器源代码
- Boost.Asio C++ Network Programming(2nd) az
- Accelerated C++ 无水印pdf
评论
共有 条评论