⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 managelistctrl.cpp

📁 ZPAV (H265) PC(X86) demo ZPAV (H265) 是 音视频 压缩解压 协议
💻 CPP
字号:

/*
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//   Copyright (C) 2006-2008  Beijing,  pengzhen (pengzhenxp@yahoo.com.cn)   //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
*/

// ManageListCtrl1.cpp : implementation file
//

#include "stdafx.h"
#include "H265V.h"
#include "ManageListCtrl.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CManageListCtrl

CManageListCtrl::CManageListCtrl()
{
}

CManageListCtrl::~CManageListCtrl()
{
}


BEGIN_MESSAGE_MAP(CManageListCtrl, CListCtrl)
	//{{AFX_MSG_MAP(CManageListCtrl)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CManageListCtrl message handlers


void CManageListCtrl::ListSetInfo( CString* lpColumnTitle , int nCol , int* nColWidth  )
{

	int i = 200; while( (DeleteColumn(0)) && (i--) ) ; 

	SetTextColor( RGB(0,0,255));   

    for( i=0 ; i< nCol ; i++) 
	{ 
		InsertColumn(i, lpColumnTitle[i], LVCFMT_LEFT, nColWidth[i] );
	}

	SetExtendedStyle( LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_CHECKBOXES | 
		              LVS_EX_ONECLICKACTIVATE | LVS_EX_UNDERLINEHOT );

}

void CManageListCtrl::ListSetInfo( CString* lpColumnTitle , int nCol )
{


	int nColWidth[200] ={0}; //column width 

	for( int i=0 ; i< nCol ; i++)  nColWidth[i] = 60  ;

	ListSetInfo( lpColumnTitle ,  nCol ,  nColWidth  ) ;

}


void CManageListCtrl::ListAddString( CString lpStr, int nItem, int nSubItem )
{

	SetItem(nItem, nSubItem, LVIF_TEXT, lpStr, 0, 0, 0, 0);
	
}

void CManageListCtrl::ListAddString( CString * lpStr , int nItem, int nColCount ) 
{

	DeleteItem(  nItem );

	InsertItem(nItem, TEXT(""), 0);

	for(int nSubItem=0; nSubItem<nColCount; nSubItem++)
	{
		
		ListAddString( lpStr[nSubItem] ,  nItem,  nSubItem ) ;

	}

}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -