getlist.cpp

来自「Visual C++ 网络通信编程实用案例精选 的配套光盘」· C++ 代码 · 共 65 行

CPP
65
字号
// GetList.cpp : implementation file
//

#include "stdafx.h"
#include "GetList.h"

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

/////////////////////////////////////////////////////////////////////////////
// CGetList

CGetList::CGetList():m_nCount(0)
{

}

CGetList::~CGetList()
{
}


BEGIN_MESSAGE_MAP(CGetList, CListCtrl)
	//{{AFX_MSG_MAP(CGetList)
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGetList message handlers

int CGetList::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CListCtrl::OnCreate(lpCreateStruct) == -1)
		return -1;
	
    BOOL success = m_OleTarget.Register(this);
    if(!success )
      MessageBox("Ole Register Drop Target Failed");             
	
	m_OleTarget.SetParent(this);

	return 0;
}


//*****************************************************************************
// CGetList::AddUrl()
// Purpose: [ OleTarget 俊辑 Drop 皋技瘤啊 惯积窍看阑锭 贸府窍绰 风凭]
// Parameters:	
// [strUrl] : 靛贰弊 登绢 甸绢柯 Url
// Returns:	none
//*****************************************************************************
void CGetList::AddUrl(CString strUrl)
{
	InsertItem(m_nCount,(LPCTSTR)strUrl);

	m_nCount++;
}


⌨️ 快捷键说明

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