diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/pakviewfiles.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/pakviewfiles.cpp')
| -rw-r--r-- | hammer/pakviewfiles.cpp | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/hammer/pakviewfiles.cpp b/hammer/pakviewfiles.cpp new file mode 100644 index 0000000..3f87681 --- /dev/null +++ b/hammer/pakviewfiles.cpp @@ -0,0 +1,89 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +// PakViewFiles.cpp : implementation file +// + +#include "stdafx.h" +#include "hammer.h" +#include "PakDoc.h" +#include "PakViewFiles.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPakViewFiles + +IMPLEMENT_DYNCREATE(CPakViewFiles, CListView) + +CPakViewFiles::CPakViewFiles() +{ +} + +CPakViewFiles::~CPakViewFiles() +{ +} + + +BEGIN_MESSAGE_MAP(CPakViewFiles, CListView) + //{{AFX_MSG_MAP(CPakViewFiles) + // NOTE - the ClassWizard will add and remove mapping macros here. + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPakViewFiles drawing + +void CPakViewFiles::OnDraw(CDC* pDC) +{ + CDocument* pDoc = GetDocument(); + // TODO: add draw code here +} + +///////////////////////////////////////////////////////////////////////////// +// CPakViewFiles diagnostics + +#ifdef _DEBUG +void CPakViewFiles::AssertValid() const +{ + CListView::AssertValid(); +} + +void CPakViewFiles::Dump(CDumpContext& dc) const +{ + CListView::Dump(dc); +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CPakViewFiles message handlers + +void CPakViewFiles::OnInitialUpdate() +{ + CListView::OnInitialUpdate(); + CListCtrl& lc = GetListCtrl(); + + // modify the list control's attributes + DWORD dwStyle = GetWindowLong(lc.m_hWnd, GWL_STYLE); + SetWindowLong(lc.m_hWnd, GWL_STYLE, (dwStyle & ~LVS_TYPEMASK) | + LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_REPORT | // LVS_ICON | + // LVS_NOITEMDATA | + LVS_SORTASCENDING); + + // add some headers + + // 1. name of entry + lc.InsertColumn(0, "Name", LVCFMT_LEFT, 150, colName); + // 2. size of entry + lc.InsertColumn(1, "Size", LVCFMT_RIGHT, 80, colSize); + // 3. type of entry + lc.InsertColumn(2, "Type", LVCFMT_LEFT, 180, colType); +} |