資源簡介
一個類,附帶示波器界面示例程序。VC++編譯通過。

代碼片段和文件信息
//?DataShow.cpp?:?implementation?file
//
/************************************************************************/
/*?數據顯示類:
???作者:南京航空航天大學能源與動力學院?莊三少
???????????????????????????????????2009年1月11日??
???Email:viualsan@yahoo.cn
?????tel:13512524413?
友情發布:http://www.codefans.net
說明:
???本類無任何限制,可自由改動傳播。只需附上該段說明。??????????????????????????????????????????????????????????????????*/
/************************************************************************/
#include?“stdafx.h“
#include?“DataShow.h“
#include?
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CDataShow
CDataShow::CDataShow()
{
m_IsTimeShow=true;
m_time_color=RGB(2550255);
m_IsNoteOn=true;
m_sNote_text=“南京航空航天大學創建于?1952?年?10?月,座落于六朝古都南京。目前有兩校區.“;
m_IsEnlargeClose=false;
m_IsSelect_enlarge=false;
m_IsEnlarge=false;
m_IsMove=false;
????m_captureNum=0;
m_IsCaptureSaveBMP=3;
m_IsCaptureSaveBMP=false;
m_numofData=0;
m_numOfBMP=0;
m_linestyle=0;
m_lineWide=0;
m_color_note=RGB(0200180);
title_color=RGB(0250230);
text_color=RGB(255255255);
m_cross_color=RGB(0255255);
m_selectRect_color=RGB(25000);
m_pMousePoint.x=0;
m_pMousePoint.y=0;
m_dNumOfData=0;
m_selectRect_color=RGB(12230200);
//初始化主框畫筆
m_pdc_framRect.new_brush.CreateSolidBrush(RGB(0100100));
m_pdc_framRect.new_pen.CreatePen(00RGB(2552550));
//初始化數據框畫筆
m_pdc_data.new_brush.CreateSolidBrush(RGB(0100100));
m_pdc_data.new_pen.CreatePen(00RGB(2552550));
m_datacolor=RGB(2552550);
//參數化數據框畫筆
m_pdc_childRect.new_brush.CreateSolidBrush(RGB(000));
m_pdc_childRect.new_pen.CreatePen(00RGB(2552550));
m_pdc_childRect.c=RGB(000);
//參數化軸畫筆
m_pdc_axis.new_brush.CreateSolidBrush(RGB(0100100));
m_pdc_axis.new_pen.CreatePen(00RGB(2552550));
//初始化網格畫筆
m_pdc_grid.new_pen.CreatePen(20RGB(0255255));
m_High=500;
m_Low=0;
m_Top=500;
m_Bottom=0;
///////////////////
double?dx=m_High/200.0;
for?(int?i=0;i<200;i++)
{
m_Data_x[i]=dx*i;
m_Data_y[i]=sin(m_Data_x[i]/30)*150;
m_dNumOfData++;
}
m_start_POINT.x=m_Data_x[0];
m_start_POINT.y=m_Data_y[0];
m_end_point.x=m_Data_x[m_dNumOfData-1];
m_end_point.y=m_Data_y[m_dNumOfData-1];
m_IsCrossMove=true;
m_stitle_str=“visualsan@yahoo.cn??TEL:13512524413?南京航空航天大學——莊三少“;
m_sAxis_xstr=“時間軸“;
m_sAxis_ystr=“數據軸“;
m_dNum=(m_High?-?m_Low)/10;
m_dnum_top_bottom=(m_Top?-?m_Bottom)/10;
m_bIsGridOn=false;
m_GridControl=5;
m_x_start=-100;
m_y_start=-100;
m_x_end=500;
m_y_end=500;
m_xFactor=(m_x_end-m_x_start)/double(m_High-m_Low);
m_yFactor=(m_y_end-m_y_start)/double(m_Top-m_Bottom);
m_pdc_data.c=m_pdc_childRect.c;
m_pdc_data.new_brush.Deleteobject();
m_pdc_data.new_brush.CreateSolidBrush(RGB(000));
for?(i=0;i<20;i++)
{
m_Text[i]=“love“;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????43291??2009-04-22?18:50??DataShowClass\DataShow.cpp
?????文件???????7509??2009-04-22?18:50??DataShowClass\DataShow.h
?????文件?????161280??2009-01-12?17:12??DataShowClass\動態數據顯示類.doc
?????文件???????2268??2009-01-04?21:18??DataShowClass\數據示波器顯示\123.txt
?????文件??????43299??2009-04-22?18:51??DataShowClass\數據示波器顯示\DataShow.cpp
?????文件???????7583??2009-04-22?18:51??DataShowClass\數據示波器顯示\DataShow.h
?????文件?????163959??2009-08-13?10:29??DataShowClass\數據示波器顯示\Debug\數據顯示類.exe
?????文件???????2281??2009-01-04?21:39??DataShowClass\數據示波器顯示\in.txt
?????文件???????3627??2009-01-04?11:33??DataShowClass\數據示波器顯示\ReadMe.txt
?????文件???????1078??2009-01-04?11:33??DataShowClass\數據示波器顯示\res\數據顯示類.ico
?????文件????????402??2009-01-04?11:33??DataShowClass\數據示波器顯示\res\數據顯示類.rc2
?????文件???????2947??2009-01-12?01:54??DataShowClass\數據示波器顯示\resource.fd
?????文件???????2345??2009-01-12?01:54??DataShowClass\數據示波器顯示\resource.h
?????文件????????212??2009-01-04?11:33??DataShowClass\數據示波器顯示\StdAfx.cpp
?????文件???????1054??2009-01-04?11:33??DataShowClass\數據示波器顯示\StdAfx.h
?????文件???????2105??2009-04-22?18:51??DataShowClass\數據示波器顯示\數據顯示類.cpp
?????文件???????4793??2009-01-05?15:34??DataShowClass\數據示波器顯示\數據顯示類.dsp
?????文件????????545??2009-01-04?11:33??DataShowClass\數據示波器顯示\數據顯示類.dsw
?????文件???????1334??2009-04-22?18:46??DataShowClass\數據示波器顯示\數據顯示類.h
?????文件??????13569??2009-08-13?10:29??DataShowClass\數據示波器顯示\數據顯示類.plg
?????文件????????501??2009-01-12?02:00??DataShowClass\數據示波器顯示\數據顯示類.positions
?????文件???????8494??2009-01-12?01:54??DataShowClass\數據示波器顯示\數據顯示類.rc
?????文件??????10524??2009-04-22?18:46??DataShowClass\數據示波器顯示\數據顯示類Dlg.cpp
?????文件???????2347??2009-04-22?18:46??DataShowClass\數據示波器顯示\數據顯示類Dlg.h
?????目錄??????????0??2009-08-13?11:53??DataShowClass\數據示波器顯示\Debug
?????目錄??????????0??2009-08-13?11:16??DataShowClass\數據示波器顯示\res
?????目錄??????????0??2009-08-13?11:53??DataShowClass\數據示波器顯示
?????目錄??????????0??2009-08-13?11:16??DataShowClass
-----------?---------??----------?-----??----
???????????????487347????????????????????28
............此處省略1個文件信息
評論
共有 條評論