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

📄 debgdlg.cpp

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

#include "stdafx.h"
#include "TestForm.h"
#include "DebgDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// DebgDlg dialog


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


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


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

/////////////////////////////////////////////////////////////////////////////
// DebgDlg message handlers

void DebgDlg::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==0x030)		//设备调试
	{
		bitmap.LoadBitmap(IDB_DEBG);
		dcComp.CreateCompatibleDC(&dc);	
		dcComp.SelectObject(&bitmap);
		
		//贴位图
		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 + -