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

📄 testdlg.cpp

📁 一个用于无刷直流电动机的驱动与控制程序.里面所用的采集卡的型号为MC08.
💻 CPP
字号:
// TestDlg.cpp : implementation file
//

#include "stdafx.h"
#include "TestForm.h"
#include "TestDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// TestDlg dialog


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


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


BEGIN_MESSAGE_MAP(TestDlg, CDialog)
	//{{AFX_MSG_MAP(TestDlg)
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// TestDlg message handlers

void TestDlg::OnPaint() 
{
	CPaintDC dc(this); // device context for painting
	
	// TODO: Add your message handler code here	
	CTestFormApp *pApp=(CTestFormApp *)AfxGetApp();
	int hitnumber=pApp->m_nHitNumber;	
	CRect m_ClientRect;
	CDC dcComp;
	CBitmap bitmap;	
	GetClientRect(m_ClientRect);

	if (hitnumber==0x010)	//试验项目
	{
		bitmap.LoadBitmap(IDB_TEST);
		dcComp.CreateCompatibleDC(&dc);	
		dcComp.SelectObject(&bitmap);
		//BITMAP bmInfo;
		//bitmap.GetBitmap(&bmInfo);
		//bitmap.GetObject(sizeof(bmInfo),&bmInfo);	
		//dc.SetStretchBltMode(COLORONCOLOR);
		//dc.StretchBlt(0,0,m_ClientRect.Width()-50,m_ClientRect.Height(),&dcComp,0,0,bmInfo.bmWidth,bmInfo.bmHeight,SRCCOPY);
	
		dc.BitBlt(20,0,m_ClientRect.Width(),m_ClientRect.Height(),&dcComp,0,0,SRCCOPY);
	}
	// Do not call CDialog::OnPaint() for painting messages
}

⌨️ 快捷键说明

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