// DicomVidView.cpp : implementation of the CDicomVidView class // #include "stdafx.h" #include "DICOMVid.h" #include "Document.h" #include "View.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDicomVidView IMPLEMENT_DYNCREATE(CDicomVidView, CListView) BEGIN_MESSAGE_MAP(CDicomVidView, CListView) //{{AFX_MSG_MAP(CDicomVidView) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}AFX_MSG_MAP // Standard printing commands ON_COMMAND(ID_FILE_PRINT, CListView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, CListView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, CListView::OnFilePrintPreview) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDicomVidView construction/destruction CDicomVidView::CDicomVidView() { // TODO: add construction code here } CDicomVidView::~CDicomVidView() { } BOOL CDicomVidView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return CListView::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// // CDicomVidView drawing void CDicomVidView::OnDraw(CDC* pDC) { CDicomVidDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); CListCtrl& refCtrl = GetListCtrl(); refCtrl.InsertItem(0, "Item!"); // TODO: add draw code for native data here } void CDicomVidView::OnInitialUpdate() { CListView::OnInitialUpdate(); // TODO: You may populate your ListView with items by directly accessing // its list control through a call to GetListCtrl(). } ///////////////////////////////////////////////////////////////////////////// // CDicomVidView printing BOOL CDicomVidView::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); } void CDicomVidView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void CDicomVidView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing } ///////////////////////////////////////////////////////////////////////////// // CDicomVidView diagnostics #ifdef _DEBUG void CDicomVidView::AssertValid() const { CListView::AssertValid(); } void CDicomVidView::Dump(CDumpContext& dc) const { CListView::Dump(dc); } CDicomVidDoc* CDicomVidView::GetDocument() // non-debug version is inline { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDicomVidDoc))); return (CDicomVidDoc*)m_pDocument; } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CDicomVidView message handlers void CDicomVidView::OnStyleChanged(int nStyleType, LPSTYLESTRUCT lpStyleStruct) { //TODO: add code to react to the user changing the view style of your window }