📄 ddcj.cpp
字号:
// DDCJ.cpp : implementation file
//
#include "stdafx.h"
#include "wgl_32.h"
#include "DDCJ.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDDCJ dialog
CDDCJ::CDDCJ(CWnd* pParent /*=NULL*/)
: CDialog(CDDCJ::IDD, pParent)
{
//{{AFX_DATA_INIT(CDDCJ)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDDCJ::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDDCJ)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDDCJ, CDialog)
//{{AFX_MSG_MAP(CDDCJ)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDDCJ message handlers
BOOL CDDCJ::OnInitDialog()
{
CDialog::OnInitDialog();
GetDlgItem(IDC_RESULT)->GetWindowRect(&m_ResultRect);
ScreenToClient(&m_ResultRect);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDDCJ::OnPaint()
{
CPaintDC dc(this); // device context for painting
char temp[20];
dc.SetBkMode(TRANSPARENT);
if(fFaultJL == -1)
dc.TextOut(m_ResultRect.left+20, m_ResultRect.top+40, "故障距离未知!");
else
{
sprintf(temp, "故障距离=%-.2fKM", fFaultJL);
dc.TextOut(m_ResultRect.left+20, m_ResultRect.top+40, temp);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -