debgdlg.cpp
来自「一个用于无刷直流电动机的驱动与控制程序.里面所用的采集卡的型号为MC08.」· C++ 代码 · 共 68 行
CPP
68 行
// 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 + =
减小字号Ctrl + -
显示快捷键?