故障记录分析仪源码。完美型!
c++源程序如下:
- // 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);
- }
-
- }
复制代码
所有资料51hei提供下载:
61549840WGL.rar
(8.36 MB, 下载次数: 97)
|