亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? dlggetpath.cpp

?? the same function with explore of SHBrowseForFolder example
?? CPP
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/////////////////////////////////////////////////////////////////////////////
//
// DlgGetPath.cpp : implementation file
//
//PURPOSE
//	Display a dialog to allow the user to select a file path.
//
//AUTHOR
//	John McTainsh (john@mctainsh.com)
//
//THING TO DO
//	1)	Display the recycle bin appropiatly.
//	2)	Display the contents of the recycle bin with out S- numbers.
//	3)	Sort items when added except for "Entire Network"
//	4)	Check on a more complex network.
//	5)	Get icons for the network items.
//	6)	Determine why icon disappears from the ALT-TAB bar when active?
//	7)	Handle WNetEnumResource for more than 16384 bytes of data.
//	8)	Use SHGetFileInfo to load the correct icons to display.
//
//VERSION HISTORY
//	Ver 1.0 - 21.5.99
//		*Inital release.
//
//  Ver 2.0 - 10.7.99
//		*Corrected Bug identified by Sven Wiegand when locating Drives.
//		*Added Set Path option to expand to the tree to 
//		 the inital path on startup.
//
//BOGUS COPYRIGHT NOTICE
//	Copyright 1999 (C) John McTainsh.
//	I am happy for any developer to use this dialog. I think it is pretty
//	cool and suites my purposes. Feel free to copy and alter whatever
//	you please. Keep me informed of any good things you do to it
//	and also what it has been used for (for my ego).
//
//	This is shareware and can be copied or distrabuted without my concent,
//	permision or knowledge. It would be uncool to use it without putting
//	my name in the credits (ego) but that is up to you.
//
//	This code is provide as is. If it dont work or dont do what it should
//	then dont come crying to me. It is full of bugs (undocumented features)
//	which you the user/developer must find to use it.
//
//	Remember, you to can become a Jedi master (VC++ developer) if you can
//	resist the temptations of the dark side of the force (VB).
//
//	PS
//		Comments regarding my spelling will NOT be kindly recieved.
//	PSS
//		All the best software is written by New Zealanders.
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Resource.h"								//Definitions for resource ID's
#include "DlgGetPath.h"								//Definition to get path

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


/////////////////////////////////////////////////////////////////////////////
//Handy local functions.
TCHAR*	MakeObjectDynamic( LPTSTR szData );
CString WindowName( CString sName );
bool	ParsePath( CString sPath, int nLevel, CString *const psDirName );

#define NETWORK_NEIGHBOUR   _T("Network Neighborhood")


/////////////////////////////////////////////////////////////////////////////
// CDlgGetPath dialog
CDlgGetPath::CDlgGetPath(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgGetPath::IDD, pParent)
{
	TRACE( _T("CDlgGetPath::CDlgGetPath(%p)\n"), pParent );
	//{{AFX_DATA_INIT(CDlgGetPath)
	//}}AFX_DATA_INIT
	m_hNetworkRoot = NULL;
}


void CDlgGetPath::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgGetPath)
	DDX_Control(pDX, IDC_TREE, m_Tree);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgGetPath, CDialog)
	//{{AFX_MSG_MAP(CDlgGetPath)
	ON_NOTIFY(TVN_SELCHANGED, IDC_TREE, OnSelchangedTree)
	ON_NOTIFY(TVN_ITEMEXPANDING, IDC_TREE, OnItemexpandingTree)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()



/////////////////////////////////////////////////////////////////////////////
//FUNCTION
//	Parse the path and extract the given directory or drive name.
//	nLevel 0 will return the drive number or "" for a network name.
//CREATED
//	10-7-1999  11:37:47
//PARAMS
//	sPath		Full path to parse.
//	nLevel		Level to return 0 = the root or drive name.
//	psDirName	returned directory name
//RETURNS
//	true	if a directory or drive name was returned.
//	false	if no more directorys
bool ParsePath( CString sPath, int nLevel, CString *const psDirName )
{
	ASSERT( psDirName );
	//find first match
	int nStart = 0;									//Location in sPath to search from
	while( nLevel )
	{
		nStart = sPath.Find( _T('\\'), nStart );
		if( nStart < 0 )
			return false;
		nLevel--;
		nStart++;
	}
	//We now have the start point to find the end.
	int nEnd = sPath.Find( _T('\\'), nStart );
	if( nEnd < 0 )
		*psDirName = sPath.Mid( nStart );
	else
		*psDirName = sPath.Mid( nStart, nEnd-nStart);
	return true;
}




/////////////////////////////////////////////////////////////////////////////
//FUNCTION
//	Setup inital Dialog Data.
//CREATED
//	8-5-1999  19:57:09
//RETURNS
//	See help
BOOL CDlgGetPath::OnInitDialog() 
{
	TRACE( _T("CDlgGetPath::OnInitDialog()\n") );
	CDialog::OnInitDialog();

	//
	//Setup the Image lists
	//
	if( !m_ImageListTree.Create( IDB_FILE_TYPES, 17, 1, RGB( 255, 255, 255 ) ) )
		TRACE( _T("Image list creation fault") );
	m_Tree.SetImageList( &m_ImageListTree, TVSIL_NORMAL );

	//
	//List the local drives
	//
	for( TCHAR cLetter = _T('A'); cLetter <= _T('Z'); cLetter++ )
	{
		CString sDrive = cLetter;
		sDrive += _T(":");						
		UINT nType = GetDriveType( sDrive + _T("\\") );
		if( DRIVE_REMOVABLE <= nType && nType <= DRIVE_RAMDISK )
			InsertItem( TVI_ROOT, NULL, sDrive, nType );
	}
	//Network neighbour hood
	m_hNetworkRoot = InsertItem( TVI_ROOT, NULL, NETWORK_NEIGHBOUR, DRIVE_RAMDISK+1 );

	//
	//Expand the Tree to the Inital Path.
	//
	int nLevel = 0;
	CString sDirName;
	HTREEITEM hCurrent = TVI_ROOT;					//Current item in the list being expanded.
	while( ParsePath( m_sPath, nLevel, &sDirName ) )
	{
		//Network or Drive expand
		if( !nLevel && sDirName.IsEmpty() )
				sDirName = NETWORK_NEIGHBOUR;
		//Search for the matching tree item and expand
		HTREEITEM hItem = m_Tree.GetChildItem( hCurrent );	
		while( hItem )
		{
			if( sDirName.CompareNoCase( m_Tree.GetItemText( hItem ) ) == 0 )
			{
				hCurrent = hItem;
				m_Tree.Expand( hCurrent, TVE_EXPAND );
				break;
			}
			hItem = m_Tree.GetNextSiblingItem( hItem );
		}
		nLevel++;
	}
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}


///////////////////////////////////////////////////////////////////////////////
//DESCRIPTION:
//	Insert an Item in to the List
//CREATED:
//	10-5-1999  13:49:20
//PARAMS:
//	hParent		Parent to Attach to.
//	sText		Text to Add.
//	iImage		Image.
//RETURN:
//	Handle of Item created
HTREEITEM CDlgGetPath::InsertItem( HTREEITEM hParent, NETRESOURCE *const pNetResource, CString sText, int iImage, int iImageSelected /* = -1 */ )
{
	TRACE( _T("CDlgGetPath::InsertItem(%p,%p,%s +++ )\n"), hParent, pNetResource, sText );
	sText = WindowName( sText );
	TVINSERTSTRUCT InsertStruct;
	InsertStruct.hParent		= hParent;	
	InsertStruct.hInsertAfter	= TVI_LAST;
	InsertStruct.itemex.mask	= TVIF_IMAGE | TVIF_TEXT | TVIF_CHILDREN | 
								  TVIF_SELECTEDIMAGE | TVIF_PARAM;
	InsertStruct.itemex.pszText	= sText.GetBuffer( sText.GetLength() );  sText.ReleaseBuffer();
	InsertStruct.itemex.iImage	= iImage;
	InsertStruct.itemex.cChildren= 1;
	InsertStruct.itemex.lParam	= (LPARAM)pNetResource;
	if( iImageSelected == -1 )
		InsertStruct.itemex.iSelectedImage = iImage;
	else
		InsertStruct.itemex.iSelectedImage = iImageSelected;
	return m_Tree.InsertItem( &InsertStruct );
}


/////////////////////////////////////////////////////////////////////////////
//FUNCTION
//	Called in request to expand an item in the tree.
//CREATED
//	8-5-1999  19:57:09
//PARAMS
//	sPath	Path to use for populating from
//	hParent	Where to add the data
//RETURNS
//	True if some children were added
bool CDlgGetPath::PopulateTree( CString sPath, HTREEITEM hParent ) 
{
	TRACE( _T("CDlgGetPath::PopulateTree( %s )\n"), sPath );
	bool bGotChildren = false;						//True if a child is added.	
	//
	//Populate Network neighbourhood tree (Entire network and Local-Computers)
	//
	if( hParent == m_hNetworkRoot )
	{
		bGotChildren = EnumNetwork( hParent );
	}
	//
	//Network item(Search deep into the network)
	//
	else if( m_Tree.GetItemData( hParent ) )
	{
		bGotChildren = EnumNetwork( hParent );
	}
	
	//
	//Search for files and populate the CTreeCtrl
	//
	else
	{
		CFileFind finder;
		BOOL bWorking = finder.FindFile( sPath+_T("*.*") );
		while (bWorking)   
		{
			bWorking = finder.FindNextFile();
			if( finder.IsDots() )
				continue;
			if( finder.IsDirectory() )
			{
				InsertItem( hParent, NULL, finder.GetFileName(), DRIVE_NO_ROOT_DIR, DRIVE_UNKNOWN );
				bGotChildren = true;
			}
		}
	}

	//
	//Remove the [+] if no children
	//
	if( !bGotChildren )
	{
		TVITEM item		= { 0 };
		item.mask		= TVIF_HANDLE | TVIF_CHILDREN;
		item.hItem		= hParent;
		item.cChildren	= 0;
		m_Tree.SetItem( &item );
	}
	return bGotChildren;
}


/////////////////////////////////////////////////////////////////////////////
//FUNCTION
//	Get the Part from a given selection point.
//CREATED
//	8-5-1999  22:29:00
//PARAMS
//	hItem	Item to Get Path for.
//RETURNS
//	Full path as a string.
CString CDlgGetPath::GetItemPath( HTREEITEM hItem ) 
{
	TRACE( _T("CDlgGetPath::GetItemPath(%p)\n"), hItem );

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月婷婷综合在线| 欧美四级电影网| 国产揄拍国内精品对白| 日韩不卡一二三区| 日韩高清在线观看| 免费av网站大全久久| 日本一区中文字幕| 美腿丝袜在线亚洲一区 | 美腿丝袜在线亚洲一区 | 成人永久看片免费视频天堂| 国产麻豆视频一区| 国产福利一区二区三区视频 | www.66久久| 97se亚洲国产综合自在线| 成人av在线播放网址| 成人99免费视频| 91福利资源站| 欧美一区二区在线免费播放 | 蜜桃精品视频在线观看| 极品少妇xxxx偷拍精品少妇| 国内精品久久久久影院薰衣草 | 成人97人人超碰人人99| 99久久精品国产一区二区三区 | 日韩理论电影院| 一区二区三区四区在线免费观看| 一区二区日韩电影| 青青草91视频| 国产91精品入口| 在线看日本不卡| 91麻豆精品国产91久久久久久久久 | 精品福利一区二区三区| 久久精品亚洲麻豆av一区二区| 中文字幕 久热精品 视频在线| 亚洲欧美另类在线| 日韩激情视频在线观看| 国产伦精品一区二区三区在线观看 | 亚洲国产乱码最新视频 | 日韩一区二区在线免费观看| 亚洲精品在线电影| 一区在线观看免费| 日韩国产高清影视| 成人免费看视频| 欧美三级视频在线观看| 精品国产伦一区二区三区免费| 中文字幕精品一区二区三区精品| 亚洲精品成a人| 精品亚洲免费视频| 在线观看视频一区| 日产国产欧美视频一区精品| 精品一区二区日韩| 一本一道久久a久久精品| 欧美成人在线直播| 亚洲日本成人在线观看| 免费成人美女在线观看.| 成人av网站在线| 69久久夜色精品国产69蝌蚪网| 国产亚洲欧美日韩俺去了| 亚洲综合丁香婷婷六月香| 国产精品影视网| 欧美在线色视频| 中文字幕不卡在线| 秋霞午夜av一区二区三区| 91丨九色porny丨蝌蚪| 日韩欧美另类在线| 亚洲一区二区成人在线观看| 国产精一区二区三区| 精品视频1区2区| 中文字幕一区二区三区在线播放| 美女视频黄a大片欧美| 91福利视频网站| 国产香蕉久久精品综合网| 日韩精品一卡二卡三卡四卡无卡| 99久久综合狠狠综合久久| 欧美白人最猛性xxxxx69交| 亚洲第一激情av| 91色九色蝌蚪| 中文乱码免费一区二区| 韩国精品久久久| 91精品国产综合久久香蕉麻豆| 自拍偷自拍亚洲精品播放| 国产精品一区二区视频| 日韩你懂的在线播放| 一区二区久久久| 亚洲欧美另类小说| 国产成人午夜电影网| 日韩精品一区二区三区在线观看| 亚洲国产va精品久久久不卡综合| 99精品热视频| 国产精品网站一区| 国产成人免费av在线| 精品国产乱码久久久久久夜甘婷婷 | 91在线视频播放地址| 国产欧美一区二区在线| 国产一区久久久| 精品乱人伦小说| 激情综合网av| 久久久蜜桃精品| 国产精品一区2区| 久久久国际精品| 国产成人在线观看| 欧美国产一区二区| 成人黄色免费短视频| 国产精品免费久久久久| 大白屁股一区二区视频| 中文字幕第一区综合| 成人午夜电影网站| 国产精品高潮久久久久无| 成人黄色大片在线观看| 1000部国产精品成人观看| 99精品在线免费| 一区二区三区电影在线播| 欧美日韩综合一区| 视频一区二区国产| 欧美成人性福生活免费看| 精品一区精品二区高清| 久久久久久久久蜜桃| 成人激情综合网站| 亚洲人成精品久久久久| 欧美天堂亚洲电影院在线播放| 性欧美疯狂xxxxbbbb| 欧美一区二区三区视频在线观看 | 粉嫩一区二区三区性色av| 国产精品情趣视频| 日本高清不卡视频| 亚洲国产精品嫩草影院| 日韩精品专区在线影院观看| 国内外精品视频| 国产精品污污网站在线观看| 色视频一区二区| 男人的天堂亚洲一区| 国产日韩欧美制服另类| 色婷婷精品大在线视频| 三级一区在线视频先锋 | 亚洲午夜久久久久久久久电影院| 欧美视频在线观看一区| 美国av一区二区| 中文字幕在线不卡国产视频| 欧美日韩在线亚洲一区蜜芽| 久久99精品久久久久久国产越南 | 日韩一级大片在线| 国产成人小视频| 亚洲黄网站在线观看| 日韩精品在线看片z| 99久久综合99久久综合网站| 丝袜诱惑亚洲看片| 国产免费观看久久| 欧美日韩极品在线观看一区| 狠狠色综合色综合网络| 亚洲美女精品一区| 欧美成va人片在线观看| 91热门视频在线观看| 久久国产视频网| 有坂深雪av一区二区精品| 精品久久久网站| 色狠狠av一区二区三区| 国产在线播放一区三区四| 一区二区三区中文字幕精品精品| 欧美一区二区三区播放老司机| 成人妖精视频yjsp地址| 免费观看在线综合色| 综合婷婷亚洲小说| wwwwww.欧美系列| 欧洲国内综合视频| 国产a久久麻豆| 石原莉奈一区二区三区在线观看| 中文字幕在线一区| 精品奇米国产一区二区三区| 91福利精品视频| 成人动漫av在线| 麻豆精品在线观看| 亚洲不卡av一区二区三区| 日本一区二区电影| 亚洲精品一区二区三区99| 在线视频亚洲一区| hitomi一区二区三区精品| 极品少妇xxxx偷拍精品少妇| 亚洲高清视频的网址| 亚洲色图欧美在线| 欧美极品美女视频| 久久综合久久综合九色| 91精品国产综合久久精品app| 97久久人人超碰| 国产a级毛片一区| 久久99精品国产.久久久久久| 舔着乳尖日韩一区| 亚洲一区在线观看视频| 中文字幕一区二区三区乱码在线| 精品捆绑美女sm三区| 日韩一区二区麻豆国产| 欧美喷潮久久久xxxxx| 一本大道综合伊人精品热热 | 欧美日韩一区二区三区视频| 99在线精品一区二区三区| 国产精品亚洲视频| 国产一区不卡在线| 国产一区在线观看麻豆| 国产一区二区在线观看视频| 麻豆成人久久精品二区三区红| 调教+趴+乳夹+国产+精品| 午夜精品久久久久久久久久|