Files
coco df489d5640 a
2026-07-03 16:05:30 +08:00

110 lines
2.8 KiB
C++

// dispcerspgrapdlg.cpp : implementation file
//
#include "stdafx.h"
#include "geomative.h"
#include "dispcerspgrapdlg.h"
#include "TdChannel.h"
#include "RspCETd.h"
#include "RspCETdRecord.h"
#include "dispgrapcersptdview.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDispCERSPGrapDlg dialog
CDispCERSPGrapDlg::CDispCERSPGrapDlg(CRspCETd* const pRspCETd, CWnd* pParent)
: CDialog(CDispCERSPGrapDlg::IDD, pParent)
{
m_pRspCETd = pRspCETd;
m_pDispGrapCERSPTdView = NULL;
}
CDispCERSPGrapDlg::CDispCERSPGrapDlg(CWnd* pParent /*=NULL*/)
: CDialog(CDispCERSPGrapDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CDispCERSPGrapDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CDispCERSPGrapDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDispCERSPGrapDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDispCERSPGrapDlg, CDialog)
//{{AFX_MSG_MAP(CDispCERSPGrapDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDispCERSPGrapDlg message handlers
BOOL CDispCERSPGrapDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
int iChIndex = (int)VAL_ZERO;
int iIndex = (int)VAL_ZERO;
CTdChannel* pTdChannel = NULL;
CRect rectClient;
DWORD dwStyle = AFX_WS_DEFAULT_VIEW;
iChIndex = (int)VAL_ZERO;
iChIndex = (int)VAL_ZERO;
while (iChIndex < m_pRspCETd->m_tdChaList.GetCount())
{
pTdChannel = NULL;
pTdChannel = (CTdChannel*)(m_pRspCETd->m_tdChaList.GetAt(m_pRspCETd->m_tdChaList.FindIndex(iChIndex)));
iChIndex++;
}
CRuntimeClass* pClass = (CRuntimeClass*)RUNTIME_CLASS(CDispGrapCERSPTdView);
m_pDispGrapCERSPTdView = (CDispGrapCERSPTdView*)pClass->CreateObject();
rectClient.SetRectEmpty();
this->GetClientRect(rectClient);
m_pDispGrapCERSPTdView->m_pTdChannel = pTdChannel;
m_pDispGrapCERSPTdView->Create(NULL, NULL, dwStyle, rectClient, this, CDispCERSPGrapDlg::IDD);
m_pDispGrapCERSPTdView->OnInitialUpdate();
m_pDispGrapCERSPTdView->EnableWindow(TRUE);
m_pDispGrapCERSPTdView->ShowWindow(SW_SHOW);
m_pDispGrapCERSPTdView->Invalidate();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CDispCERSPGrapDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_RETURN)
{
return TRUE;
}
if(pMsg->message==WM_KEYDOWN && pMsg->wParam==VK_ESCAPE)
{
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}