⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 startdlg.cpp

📁 这是VISUAL C++ 6.0环境下编译的ECG测试程序
💻 CPP
字号:
// STARTDLG.cpp : implementation file
//

#include "stdafx.h"
#include "ECGTest.h"
#include "STARTDLG.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSTARTDLG dialog


CSTARTDLG::CSTARTDLG(CWnd* pParent /*=NULL*/)
	: CDialog(CSTARTDLG::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSTARTDLG)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CSTARTDLG::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSTARTDLG)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSTARTDLG, CDialog)
	//{{AFX_MSG_MAP(CSTARTDLG)
	ON_WM_SIZE()
	ON_WM_TIMER()
	ON_WM_PAINT()
	ON_WM_CTLCOLOR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSTARTDLG message handlers

BOOL CSTARTDLG::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	GetWindowRect(&sdlg_rect);
	
	sdlg_rect -= sdlg_rect.TopLeft();
	MyRgn.CreateRoundRectRgn(sdlg_rect.left+5,sdlg_rect.top+30,sdlg_rect.right-5,sdlg_rect.bottom-3,150,150);
	SetWindowRgn(MyRgn,TRUE);
	SetTimer(2,2500,NULL);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CSTARTDLG::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	
}

void CSTARTDLG::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	KillTimer(2);
	OnCancel();
	CDialog::OnTimer(nIDEvent);
}

void CSTARTDLG::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here
	CRect crect;
	GetClientRect(crect);
	CBrush brush(RGB(255,100,10));
	dc.FillRect(crect,&brush);
//	dc.SetBkColor(RGB(255,0,0));
	// Do not call CDialog::OnPaint() for painting messages
}

HBRUSH CSTARTDLG::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
	// TODO: Change any attributes of the DC here
	if(nCtlColor==CTLCOLOR_STATIC)
	{
		pDC->SetBkColor(RGB(255,100,10));
	}
	// TODO: Return a different brush if the default is not desired
	return hbr;
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -