?? userlistview.cpp
字號:
// userlistview.cpp : implementation file
//
#include "stdafx.h"
#include "..\gamehigh.h"
#include "..\include\userlistview.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CUserListView
extern CGameHighApp theApp;
extern CFaceList* gpFaceList;
IMPLEMENT_DYNCREATE(CUserListView, CListView)
CUserListView::CUserListView()
{
pUserInfoList =NULL;
pFaceImgList =NULL;
}
CUserListView::~CUserListView()
{
SAFE_CHECKPOINTER(pUserInfoList)
{
delete pUserInfoList;
pUserInfoList =NULL;
}
}
BEGIN_MESSAGE_MAP(CUserListView, CView)
//{{AFX_MSG_MAP(CUserListView)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CUserListView drawing
void CUserListView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CUserListView diagnostics
#ifdef _DEBUG
void CUserListView::AssertValid() const
{
CView::AssertValid();
}
void CUserListView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CUserListView message handlers
void CUserListView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
//GetListCtrl().InsertColumn(
CListCtrl& theCtrl = GetListCtrl();
theCtrl.InsertColumn(0,"戰斗時間",LVCFMT_CENTER,60);
theCtrl.InsertColumn(0,"戰斗次數",LVCFMT_CENTER,60);
theCtrl.InsertColumn(0,"職位",LVCFMT_CENTER,40);
theCtrl.InsertColumn(0,"門派",LVCFMT_CENTER,40);
theCtrl.InsertColumn(0,"和",LVCFMT_CENTER,30);
theCtrl.InsertColumn(0,"輸",LVCFMT_CENTER,30);
theCtrl.InsertColumn(0,"贏",LVCFMT_CENTER,30);
theCtrl.InsertColumn(0,"積分",LVCFMT_CENTER,40);
theCtrl.InsertColumn(0,"級別",LVCFMT_CENTER,40);
theCtrl.InsertColumn(0,"財富",LVCFMT_CENTER,40);
theCtrl.InsertColumn(0,"網速",LVCFMT_CENTER,40);
theCtrl.InsertColumn(0,"中文名",LVCFMT_CENTER,50);
theCtrl.InsertColumn(0,"用戶名",LVCFMT_CENTER,50);
theCtrl.InsertColumn(0," ",LVCFMT_CENTER,30);
DWORD dwStype=GetWindowLong(theCtrl.GetSafeHwnd(),GWL_STYLE);
dwStype&=~LVS_TYPEMASK; //Remove the current stype flags
dwStype|=LVS_REPORT; //Add the List stype
SetWindowLong(theCtrl.GetSafeHwnd(),GWL_STYLE,dwStype); //Set it back into the list view
SAFE_CHECKPOINTER(gpFaceList)
{
if(NULL == pFaceImgList)
{
pFaceImgList =gpFaceList->GetImageList4();
}
}
SAFE_CHECKPOINTER(pFaceImgList)
{
theCtrl.SetImageList(pFaceImgList,LVSIL_SMALL);
int nCount =pFaceImgList->GetImageCount();
}
SetRedraw(true);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -