113 lines
2.7 KiB
C++
113 lines
2.7 KiB
C++
// DialListMeasuGR.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "geomative.h"
|
|
#include "DialListMeasuGR.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CDialListMeasuGR dialog
|
|
|
|
extern CGeoMativeApp theApp;
|
|
CDialListMeasuGR::CDialListMeasuGR(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CDialListMeasuGR::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CDialListMeasuGR)
|
|
// NOTE: the ClassWizard will add member initialization here
|
|
//}}AFX_DATA_INIT
|
|
m_iSptType = -1;
|
|
}
|
|
|
|
|
|
void CDialListMeasuGR::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CDialListMeasuGR)
|
|
DDX_Control(pDX, IDC_LIST_GR, m_listData);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CDialListMeasuGR, CDialog)
|
|
//{{AFX_MSG_MAP(CDialListMeasuGR)
|
|
ON_WM_SHOWWINDOW()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CDialListMeasuGR message handlers
|
|
|
|
BOOL CDialListMeasuGR::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
// TODO: Add extra initialization here
|
|
CString strColTitle;
|
|
|
|
int iColIndex = 0;
|
|
|
|
m_listData.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP
|
|
| LVS_EX_ONECLICKACTIVATE | LVS_EX_GRIDLINES);
|
|
|
|
m_listData.InsertColumn(iColIndex++, _T("ID"),LVCFMT_LEFT,100);
|
|
|
|
// strColTitle.Empty();
|
|
// strColTitle.LoadString(IDS_MEASU_GR_P1+g_UIOffset);
|
|
|
|
m_listData.InsertColumn(iColIndex++, _T("P1(Ω)"), LVCFMT_CENTER, 190);
|
|
|
|
// strColTitle.Empty();
|
|
// strColTitle.LoadString(IDS_MEASU_GR_STATUS+g_UIOffset);
|
|
m_listData.InsertColumn(iColIndex++, _T("Status"), LVCFMT_CENTER, 190);
|
|
|
|
// strColTitle.Empty();
|
|
// strColTitle.LoadString(IDS_MEASU_GR_P2+g_UIOffset);
|
|
m_listData.InsertColumn(iColIndex++, _T("P2(Ω)"), LVCFMT_CENTER, 190);
|
|
|
|
// strColTitle.Empty();
|
|
// strColTitle.LoadString(IDS_MEASU_GR_STATUS+g_UIOffset);
|
|
m_listData.InsertColumn(iColIndex++, _T("Status"), LVCFMT_CENTER, 190);
|
|
InitiShowGR();
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void CDialListMeasuGR::InitiShowGR()
|
|
{
|
|
if (0 == m_iSptType)
|
|
{
|
|
m_listData.InsertItem(0, _T("AB"));
|
|
if (0 == theApp.m_ucIsMultiChannel )
|
|
m_listData.InsertItem(1, _T("MN"));
|
|
|
|
}
|
|
}
|
|
|
|
void CDialListMeasuGR::OnShowWindow(BOOL bShow, UINT nStatus)
|
|
{
|
|
CDialog::OnShowWindow(bShow, nStatus);
|
|
|
|
// TODO: Add your message handler code here
|
|
|
|
if (TRUE == bShow)
|
|
{
|
|
CRect rect;
|
|
GetClientRect(&rect);
|
|
|
|
rect.left += 5;
|
|
rect.top += 5;
|
|
rect.right -= 5;
|
|
rect.bottom -= 5;
|
|
m_listData.MoveWindow(&rect);
|
|
}
|
|
|
|
|
|
}
|
|
|