• 大小: 59KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-26
  • 语言: C/C++
  • 标签: MFC  单文档  心电图  

资源简介

MFC单文档模拟心电图程序,设计到CScrollView双缓冲绘图,动态调整ScrollView滚动区域等知识点

资源截图

代码片段和文件信息

// ChartSetting.cpp : implementation file
//

#include “stdafx.h“
#include “CScrollChart.h“
#include “ChartSetting.h“
#include “MainFrm.h“
#include “CScrollChartView.h“

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

/////////////////////////////////////////////////////////////////////////////
// CChartSetting dialog
UINT g_uUpdateRateTime = 100;

CChartSetting::CChartSetting(CWnd* pParent /*=NULL*/)
: CDialog(CChartSetting::IDD pParent)
{
//{{AFX_DATA_INIT(CChartSetting)
//}}AFX_DATA_INIT
}


void CChartSetting::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChartSetting)
//}}AFX_DATA_MAP
}

BOOL CChartSetting::OnInitDialog()
{
CDialog::OnInitDialog();

CString strText;
strText.Format(_T(“%d“) g_uUpdateRateTime);
SetDlgItemText(IDC_EDIT_RATE strText);
return FALSE;
}


BEGIN_MESSAGE_MAP(CChartSetting CDialog)
//{{AFX_MSG_MAP(CChartSetting)
ON_BN_CLICKED(IDC_BUTTON1 OnApplySetting)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChartSetting message handlers

void CChartSetting::OnApplySetting() 
{
// TODO: Add your control notification handler code here
CMainframe* pMainframe = (CMainframe*)AfxGetMainWnd();
ASSERT(pMainframe);
CCScrollChartView* pView = (CCScrollChartView*)pMainframe->GetActiveframe()->GetActiveView();
ASSERT(pView);

CString strText;
GetDlgItemText(IDC_EDIT_RATE strText);
g_uUpdateRateTime = _ttoi((LPCTSTR)strText);
pView->SetChartUpdateRate(g_uUpdateRateTime);
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-07-22 01:07  CScrollChart\
     文件        1659  2015-07-22 00:48  CScrollChart\ChartSetting.cpp
     文件        1229  2015-07-22 00:46  CScrollChart\ChartSetting.h
     文件       43132  2015-07-21 23:03  CScrollChart\CScrollChart.aps
     文件        2713  2015-07-22 01:06  CScrollChart\CScrollChart.clw
     文件        4222  2015-07-21 17:07  CScrollChart\CScrollChart.cpp
     文件        4884  2015-07-21 21:43  CScrollChart\CScrollChart.dsp
     文件         547  2015-07-21 17:07  CScrollChart\CScrollChart.dsw
     文件        1422  2015-07-21 17:07  CScrollChart\CScrollChart.h
     文件      107520  2015-07-22 01:07  CScrollChart\CScrollChart.ncb
     文件       58880  2015-07-22 01:07  CScrollChart\CScrollChart.opt
     文件        1829  2015-07-22 01:07  CScrollChart\CScrollChart.plg
     文件       11457  2015-07-21 23:03  CScrollChart\CScrollChart.rc
     文件        1862  2015-07-21 17:07  CScrollChart\CScrollChartDoc.cpp
     文件        1541  2015-07-21 17:07  CScrollChart\CScrollChartDoc.h
     文件        2633  2015-07-22 01:00  CScrollChart\CScrollChartView.cpp
     文件        1990  2015-07-22 00:41  CScrollChart\CScrollChartView.h
     文件        2116  2015-07-22 00:42  CScrollChart\MainFrm.cpp
     文件        1446  2015-07-22 00:42  CScrollChart\MainFrm.h
     文件        4134  2015-07-21 17:07  CScrollChart\ReadMe.txt
     目录           0  2015-07-22 01:07  CScrollChart\Release\
     文件       32768  2015-07-22 01:07  CScrollChart\Release\CScrollChart.exe
     目录           0  2015-07-21 17:07  CScrollChart\res\
     文件        1078  2015-07-21 17:07  CScrollChart\res\CScrollChart.ico
     文件         404  2015-07-21 17:07  CScrollChart\res\CScrollChart.rc2
     文件        1078  2015-07-21 17:07  CScrollChart\res\CScrollChartDoc.ico
     文件         828  2015-07-21 23:03  CScrollChart\resource.h
     文件        4716  2015-07-22 00:52  CScrollChart\ScrollChart.cpp
     文件        1970  2015-07-21 23:43  CScrollChart\ScrollChart.h
     文件         214  2015-07-21 17:07  CScrollChart\StdAfx.cpp
     文件        1054  2015-07-21 17:07  CScrollChart\StdAfx.h
............此处省略0个文件信息

评论

共有 条评论