109 lines
2.5 KiB
C++
109 lines
2.5 KiB
C++
// appdevolacview.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "geomative.h"
|
|
#include "appdevolacview.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
extern int g_UIOffset;
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDevOLACView
|
|
|
|
IMPLEMENT_DYNCREATE(CAppDevOLACView, CListView)
|
|
|
|
CAppDevOLACView::CAppDevOLACView()
|
|
{
|
|
}
|
|
|
|
CAppDevOLACView::~CAppDevOLACView()
|
|
{
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CAppDevOLACView, CListView)
|
|
//{{AFX_MSG_MAP(CAppDevOLACView)
|
|
// NOTE - the ClassWizard will add and remove mapping macros here.
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDevOLACView drawing
|
|
|
|
void CAppDevOLACView::OnDraw(CDC* pDC)
|
|
{
|
|
CDocument* pDoc = GetDocument();
|
|
// TODO: add draw code here
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDevOLACView diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CAppDevOLACView::AssertValid() const
|
|
{
|
|
CListView::AssertValid();
|
|
}
|
|
|
|
void CAppDevOLACView::Dump(CDumpContext& dc) const
|
|
{
|
|
CListView::Dump(dc);
|
|
}
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDevOLACView message handlers
|
|
|
|
void CAppDevOLACView::OnInitialUpdate()
|
|
{
|
|
CListView::OnInitialUpdate();
|
|
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
CString strTitle;
|
|
int iIndex = (int)VAL_ZERO;
|
|
LVCOLUMN lvCol;
|
|
memset(&lvCol, VAL_ZERO, sizeof(LVCOLUMN));
|
|
|
|
lvCol.mask = LVCF_FMT;
|
|
lvCol.fmt = LVCFMT_RIGHT;
|
|
|
|
GetListCtrl().SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP
|
|
| LVS_EX_ONECLICKACTIVATE | LVS_EX_GRIDLINES);
|
|
|
|
m_pMngFrm = (CMDIChildWnd*)GetParentFrame();
|
|
|
|
GetListCtrl().InsertColumn(0, _T(""), LVCFMT_RIGHT, 100);
|
|
GetListCtrl().SetColumn(0, &lvCol);
|
|
|
|
strTitle.Empty();
|
|
strTitle.LoadString(IDS_STARTINGPOINT+g_UIOffset);
|
|
GetListCtrl().InsertColumn(1, strTitle, LVCFMT_LEFT, 100);
|
|
|
|
strTitle.Empty();
|
|
strTitle.LoadString(IDS_WIDTH+g_UIOffset);
|
|
GetListCtrl().InsertColumn(2, strTitle, LVCFMT_LEFT, 100);
|
|
|
|
iIndex = (int)VAL_ZERO;
|
|
while (iIndex < 20)
|
|
{
|
|
strTitle.Empty();
|
|
strTitle.Format(_T("M%d"), iIndex);
|
|
GetListCtrl().InsertItem(iIndex, strTitle);
|
|
iIndex++;
|
|
}
|
|
}
|
|
|
|
BOOL CAppDevOLACView::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);
|
|
}
|