126 lines
3.3 KiB
C++
126 lines
3.3 KiB
C++
// opexec2drsptestgrlistview.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "geomative.h"
|
|
#include "opexec2drsptestgrlistview.h"
|
|
#include "Constant.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
extern int g_iCurrListColIndex;
|
|
extern int g_iCurrListColOrder;
|
|
extern int CALLBACK ListStrCompare(LPARAM lParam1, LPARAM lParam2, LPARAM lSortObject);
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// COpExec2DRSPTestGrListView
|
|
|
|
IMPLEMENT_DYNCREATE(COpExec2DRSPTestGrListView, CListView)
|
|
|
|
COpExec2DRSPTestGrListView::COpExec2DRSPTestGrListView()
|
|
{
|
|
}
|
|
|
|
COpExec2DRSPTestGrListView::~COpExec2DRSPTestGrListView()
|
|
{
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(COpExec2DRSPTestGrListView, CListView)
|
|
//{{AFX_MSG_MAP(COpExec2DRSPTestGrListView)
|
|
// NOTE - the ClassWizard will add and remove mapping macros here.
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// COpExec2DRSPTestGrListView drawing
|
|
|
|
void COpExec2DRSPTestGrListView::OnDraw(CDC* pDC)
|
|
{
|
|
CDocument* pDoc = GetDocument();
|
|
// TODO: add draw code here
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// COpExec2DRSPTestGrListView diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void COpExec2DRSPTestGrListView::AssertValid() const
|
|
{
|
|
CListView::AssertValid();
|
|
}
|
|
|
|
void COpExec2DRSPTestGrListView::Dump(CDumpContext& dc) const
|
|
{
|
|
CListView::Dump(dc);
|
|
}
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// COpExec2DRSPTestGrListView message handlers
|
|
|
|
BOOL COpExec2DRSPTestGrListView::PreCreateWindow(CREATESTRUCT& cs)
|
|
{
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
cs.style &= ~LVS_TYPEMASK;
|
|
cs.style |= LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS;
|
|
|
|
return CListView::PreCreateWindow(cs);
|
|
}
|
|
|
|
void COpExec2DRSPTestGrListView::OnInitialUpdate()
|
|
{
|
|
CListView::OnInitialUpdate();
|
|
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
CString strColTitle;
|
|
int iColIndex = (int)VAL_ZERO;
|
|
|
|
GetListCtrl().SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP
|
|
| LVS_EX_ONECLICKACTIVATE | LVS_EX_GRIDLINES);
|
|
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_ECODE);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
|
/*
|
|
iColIndex++;
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_CSTATE);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
|
*/
|
|
iColIndex++;
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_MDATE);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
|
|
|
iColIndex++;
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_MTIME);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
|
|
|
iColIndex++;
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_OMVALUE);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 100);
|
|
|
|
iColIndex++;
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_OMSTATUS);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
|
|
|
|
|
iColIndex++;
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_OM1VALUE);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 100);
|
|
|
|
iColIndex++;
|
|
strColTitle.Empty();
|
|
strColTitle.LoadString(IDS_DB_GR_OM1STATUS);
|
|
GetListCtrl().InsertColumn(iColIndex, strColTitle, LVCFMT_LEFT, 150);
|
|
}
|