bphidenodecnt.cpp
来自「故障诊断工作涉及的领域相当广泛」· C++ 代码 · 共 85 行
CPP
85 行
// bphidenodecnt.cpp : implementation file
//
#include "stdafx.h"
#include "richtest.h"
#include "bphidenodecnt.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// bphidenodecnt dialog
bphidenodecntdlg::bphidenodecntdlg(unsigned int cnt,unsigned where,unsigned int* pinfo,CWnd* pParent /*=NULL*/)
: CDialog(bphidenodecntdlg::IDD, pParent)
{
//{{AFX_DATA_INIT(bphidenodecnt)
// NOTE: the ClassWizard will add member initialization here
this->pinfo=pinfo;
num0=where;
this->cnt=cnt;
//}}AFX_DATA_INIT
}
void bphidenodecntdlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(bphidenodecnt)
// NOTE: the ClassWizard will add DDX and DDV calls here
for(unsigned int i=0;i<cnt;i++)
DDX_Text(pDX,i+IDC_EDIT1,*(pinfo+i+num0));
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(bphidenodecntdlg, CDialog)
//{{AFX_MSG_MAP(bphidenodecnt)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// bphidenodecnt message handlers
BOOL bphidenodecntdlg::OnInitDialog()
{static char buf[3];
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CWnd *pwnd,*pwnde;
CString nlayer="";;
for(unsigned int i=0;i<cnt;i++)
{ nlayer.Empty();
pwnd=GetDlgItem(i+IDC_STATIC1);
pwnde=GetDlgItem(i+IDC_EDIT1);
if(pwnd)
{
gcvt(1+i,3,buf);
nlayer="第";
nlayer+=CString(buf);
nlayer+="层节点数量";
pwnd->SetWindowText(nlayer);
}
}
if(i+IDC_STATIC1<IDC_STATIC10)
{for(unsigned int j=i;j+IDC_STATIC1<IDC_STATIC10+1;j++)
{
pwnd=GetDlgItem(j+IDC_STATIC1);
CString nameagent="";
pwnd->SetWindowText(nameagent);
pwnd=GetDlgItem(j+IDC_EDIT1);
pwnd->EnableWindow(FALSE);
}
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?