Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
userlistview.cpp
Package: 1731.rar [view]
Upload User: swkcbjrc
Upload Date: 2016-04-02
Package Size: 45277k
Code Size: 3k
Category:
Game Program
Development Platform:
Visual C++
- // userlistview.cpp : implementation file
- //
- #include "stdafx.h"
- #include "..gamehigh.h"
- #include "..includeuserlistview.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);
- }