Right.cpp
上传用户:szcysw
上传日期:2013-03-11
资源大小:6752k
文件大小:2k
- // Right.cpp : implementation file
- //
- #include "stdafx.h"
- #include "MyExplorer.h"
- #include "Right.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CRight
- IMPLEMENT_DYNCREATE(CRight, CView)
- CRight::CRight()
- {
- }
- CRight::~CRight()
- {
- }
- BEGIN_MESSAGE_MAP(CRight, CView)
- //{{AFX_MSG_MAP(CRight)
- ON_WM_CREATE()
- ON_WM_SIZE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CRight drawing
- void CRight::OnDraw(CDC* pDC)
- {
- CDocument* pDoc = GetDocument();
- // TODO: add draw code here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CRight diagnostics
- #ifdef _DEBUG
- void CRight::AssertValid() const
- {
- CView::AssertValid();
- }
- void CRight::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CRight message handlers
- int CRight::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (CView::OnCreate(lpCreateStruct) == -1)
- return -1;
-
- //建立m_ShellList
- if (!m_ShellList.Create(WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN
- | LVS_REPORT | LVS_SHAREIMAGELISTS | LVS_EDITLABELS,
- CRect(0,0,0,0), this, IDC_LISTCTRL))
- {
- TRACE0("Failed to create list control.n");
- return -1;
- }
-
- m_ShellList.BuildDefaultColumns();
- m_ShellList.SubclassHeader(1);
- return 0;
- }
- void CRight::OnSize(UINT nType, int cx, int cy)
- {
- CView::OnSize(nType, cx, cy);
- m_ShellList.MoveWindow(0,0,cx,cy);
- }