PointView.cpp
上传用户:azhong891
上传日期:2013-06-04
资源大小:197k
文件大小:2k
- // PointView.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Delaunay.h"
- #include "PointView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPointView
- IMPLEMENT_DYNCREATE(CPointView, CListView)
- CPointView::CPointView()
- {
- }
- CPointView::~CPointView()
- {
- }
- BEGIN_MESSAGE_MAP(CPointView, CListView)
- //{{AFX_MSG_MAP(CPointView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CPointView drawing
- void CPointView::OnDraw(CDC* pDC)
- {
- CDocument* pDoc = GetDocument();
- // TODO: add draw code here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CPointView diagnostics
- #ifdef _DEBUG
- void CPointView::AssertValid() const
- {
- CListView::AssertValid();
- }
- void CPointView::Dump(CDumpContext& dc) const
- {
- CListView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CPointView message handlers
- void CPointView::OnInitialUpdate()
- {
- CListView::OnInitialUpdate();
- /****************************************/
- CListCtrl &list=GetListCtrl();
- list.InsertColumn(0,"序号",LVCFMT_LEFT,50,0);
- list.InsertColumn(1,"坐标X",LVCFMT_LEFT,50,1);
- list.InsertColumn(2,"坐标Y",LVCFMT_LEFT,50,2);
- /* LV_ITEM li;
-
- li.mask=LVIF_TEXT;
- li.pszText="0";
- li.iItem=0;
- li.iSubItem=0;
- list.InsertItem(&li);
-
- li.pszText="10";
- li.iItem=0;
- li.iSubItem=1;
- list.SetItem(&li);
- li.pszText="10";
- li.iItem=0;
- li.iSubItem=2;
- list.SetItem(&li);*/
- /*list.InsertItem((0,"first");
- list.InsertItem(1,"Second");*/
- /***********************************************/
- }
- BOOL CPointView::PreCreateWindow(CREATESTRUCT& cs)
- {
- cs.style|=LVS_REPORT;
- return CListView::PreCreateWindow(cs);
- }