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

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

?? treeview.cpp

?? 7z 移植到windows mobile上,完整的程序并能運(yùn)行,包括了pthread 多線程庫(kù)移植windows mobile上的使用及實(shí)例.
?? CPP
字號(hào):
?//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//
//  MODULE:		treeview.cpp
//
//  PURPOSE:    Contains functions that maintain the treeview control
//
//  PLATFORMS: 	Windows CE
//
//  FUNCTIONS:
//		InitTreeViewImageLists()
//		InitTreeViewItems()
//
//  COMMENTS:
//
//
#include "stdafx.h"


//Globals
HIMAGELIST himl;			// handle of the image list

HTREEITEM AddItemToTree(HWND, LPTSTR, HTREEITEM, BOOL);


//
//  FUNCTION:   DoMain(void)
//
//  PURPOSE:    This is the main message loop for the application.  It
//              retrieves messages from the application's message queue and
//              dispatches the messages to the appropriate window procedure.
//
//  PARAMETERS:
//      none
//
//  RETURN VALUE:
//      (int) Returns the value passed to PostQuitMessage().
//
//  COMMENTS:
//

int DoMain( void )
{
	MSG msg;

	while (GetMessage(&msg, NULL, 0, 0))
	{
		TranslateMessage(&msg);   // Translates virtual key codes
		DispatchMessage(&msg);    // Dispatches message to window procedure
	}

	return ((int) msg.wParam);
}


//
//  FUNCTION:   ErrorHandlerEx(WORD, LPSTR)
//
//  PURPOSE:    Calls GetLastError() and uses FormatMessage() to display the
//              textual information of the error code along with the file
//              and line number.
//
//  PARAMETERS:
//      wLine    - line number where the error occured
//      lpszFile - file where the error occured
//
//  RETURN VALUE:
//      none
//
//  COMMENTS:
//      This function has a macro ErrorHandler() which handles filling in
//      the line number and file name where the error occured.  ErrorHandler()
//      is always used instead of calling this function directly.
//

void ErrorHandlerEx( WORD wLine, LPTSTR lpszFile )
{
	TCHAR  szBuffer[256];
	TCHAR  szBuffer2[256];

	wsprintf(szBuffer, TEXT("An %ld error occured."), GetLastError());
	// Display the error message
	wsprintf(szBuffer2, TEXT("Generic, Line=%d, File=%s"), wLine, lpszFile);
	MessageBox(NULL, szBuffer2, szBuffer, MB_ICONEXCLAMATION | MB_OK);
	return;
}



//
//  FUNCTION:   DetermineVersion()
//
//  PURPOSE:    Returns whether the program is running on WinNT, Win32s,
//              or Win95.
//
//  PARAMETERS:
//      none
//
//  RETURN VALUE:
//      (VERSION) Returns WINNT, WIN32S, WIN95 or Pegasus
//
//  COMMENTS:
//

VERSION DetermineVersion(void)
{

#if !defined (_WIN32_WCE_EMULATION) && !defined(_WIN32_WCE)
	DWORD dwVersion;
	dwVersion = GetVersion();
	if (dwVersion < 0x80000000)
		return (WINNT);
	else
		if (LOBYTE(LOWORD(dwVersion)) < 4)
			return (WIN32S);
		else
			return (WIN95);
#else
	return (WINNT);
#endif
}

//
//  FUNCTION:   InitTreeViewImageLists(HWND)
//
//  PURPOSE:    Here we load the bitmaps and create image lists for the item
//              images and the state images.
//
//  PARAMETERS:
//      hwndTV  - Handle of the treeview that these image lists are being added
//                to.
//
//  RETURN VALUE:
//      (BOOL) Returns TRUE if the image lists are added successfully, FALSE
//             otherwise.
//
//  COMMENTS:
//

BOOL InitTreeViewImageLists(HWND hwndTV)
{
	HBITMAP	   hbmp;			// handle of the bitmaps to add

	// Create the image list for the item pictures
	if ((himl = ImageList_Create(CX_BITMAP, CY_BITMAP, ILC_MASK, NUM_BITMAPS, 0)) == NULL)
		return FALSE;
	// Add the bitmaps to the list
	hbmp = LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1));	
	if (-1 == ImageList_AddMasked(himl, hbmp, RGB(0, 255, 0)))
	{
		ErrorHandler();
		return FALSE;
	}
	// Clean up the GDI objects
	DeleteObject(hbmp);
	// Fail if not all the images were added
	if (ImageList_GetImageCount(himl) < NUM_BITMAPS+1)
		return FALSE;

	// Associate the image list with the treeview control
	TreeView_SetImageList(hwndTV, himl, TVSIL_NORMAL);
	
	return TRUE;
}


//
//  FUNCTION:   InitTreeViewItems(HWND)
//
//  PURPOSE:    Here is where items are initially added to the tree.
//
//  PARAMETERS:
//      hwndTV  - Handle of the treeview to add images to.
//
//  RETURN VALUE:
//      (BOOL) Returns TRUE if the items were added successfully, FALSE
//             otherwise.
//
//  COMMENTS:
//      For now all we do is add the current drives attached to the system.
//
//

BOOL InitTreeViewItems(HWND hwndTV)
{
	// GetDrives calls GetLogicalDriveStrings() which is not supported
	// Win32s.  So, if this is not NT/95 just add the C drive.
	if (WIN32S != g_version )
	{
		GetDrives(hwndTV);
	}
	else
	{
		AddItemToTree(hwndTV, TEXT("\\"), NULL, TRUE);
	}
	
	return TRUE;	
}


//
//  FUNCTION:   AddItemToTree(HWND, LPSTR, int, int)
//
//  PURPOSE:    Here is where the item is actually inserted into the tree.  The
//              position on the tree is also determined.
//
//  PARAMETERS:
//      hwndTV     - handle of the treeview to add the item to
//      lpszItem   - string to add to the tree
//		htiParent  - handle of the tree item that will be this item's parent
//		fDirectory - TRUE if this item is a directory
//
//  RETURN VALUE:
//      (HTREEITEM) Returns the handle of the item once it's been added to the
//                  tree. Otherwise it returns NULL.
//
//  COMMENTS:
//

HTREEITEM AddItemToTree(HWND hwndTV, LPTSTR lpszItem, HTREEITEM htiParent,BOOL fDirectory)
{
	
	TV_ITEM          tvi;
	TV_INSERTSTRUCT  tvins;
	HTREEITEM        hti;

	// Filter out the "." and ".." directories.
	if (!lstrcmpi(lpszItem, TEXT(".")) || !lstrcmpi(lpszItem, TEXT("..")))
		return (HTREEITEM)TRUE;

    // Start by initializing the structures
	memset(&tvi, 0, sizeof(TV_ITEM));
	memset(&tvins,0, sizeof(TV_INSERTSTRUCT));
	tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;

	// If it's a directory, add a child count so the expand button shows
	if (fDirectory)
	{
		tvi.mask |= TVIF_CHILDREN;
		tvi.cChildren = 1;
	}

	if(fDirectory||IsChoiceFile(lpszItem,L"7z")||IsChoiceFile(lpszItem,L"zip"))
	{
	// Set the text of the item
	tvi.pszText = lpszItem;
	tvi.cchTextMax = lstrlen(lpszItem);

	// Give the item the appropriate image
	if (fDirectory){
		tvi.iSelectedImage = tvi.iImage = IMAGE_CLOSED;
	} else {
		_tcsrev(lpszItem);
		if (_tcsncicmp(lpszItem, _T("exe."),4))
			tvi.iSelectedImage = tvi.iImage =  IMAGE_DOCUMENT;
		else if (_tcsncicmp(lpszItem, _T("7z."),3))
			tvi.iSelectedImage = tvi.iImage =  IMAGE_LOGO7Z;
		else
			tvi.iSelectedImage = tvi.iImage =  IMAGE_EXE;
		
		_tcsrev(lpszItem);
	}

	tvins.item = tvi;
	tvins.hInsertAfter = TVI_SORT;

	// Set the parent item based on the specified level
	if (!htiParent)
		tvins.hParent = TVI_ROOT;
	else
		tvins.hParent = htiParent;

	// Add the item to the tree view control
	hti = (HTREEITEM) SendMessage(hwndTV, TVM_INSERTITEM, 0,(LPARAM)(LPTV_INSERTSTRUCT) &tvins);
	}
    // Return the handle to the item
	return hti;
}


//
//  FUNCTION:   BuildDirectory(HWND, TV_ITEM, LPTSTR)
//
//  PURPOSE:    Takes an item in the treeview and builds the path to the item
//
//  PARAMETERS:
//      hwndTV  - handle of the treeview control
//      tvi     - item to build the path for
//      lpszDir - string to place the path into
//
//  RETURN VALUE:
//      Returns TRUE if the path is built successfully, FALSE otherwise.
//
//  COMMENTS:
//

BOOL BuildDirectory(HWND hwndTV, TV_ITEM tvi, LPTSTR lpszDir)
{
    HTREEITEM hti;
	LPTSTR sz0, sz1;
	// Allocate some memory for the temp strings
	sz0 = (LPTSTR) LocalAlloc(LMEM_FIXED|LMEM_ZEROINIT,sizeof(TCHAR) * MAX_PATH);
	sz1 = (LPTSTR) LocalAlloc(LMEM_FIXED|LMEM_ZEROINIT,sizeof(TCHAR) * MAX_PATH);
    // Get the text for the first item
    tvi.mask |= TVIF_TEXT;
    tvi.pszText = sz0;
    tvi.cchTextMax =  MAX_PATH;
    if (!TreeView_GetItem(hwndTV, &tvi))
        return (FALSE);
    // Create the initial string
    wsprintf(sz1, TEXT("%s"), tvi.pszText);
	lstrcpy(lpszDir, sz1);
	hti = tvi.hItem;
    // Now add the parent directories if any
    while (hti = TreeView_GetParent(hwndTV, hti))
    {
        tvi.mask = TVIF_TEXT;
        tvi.hItem = hti;
        if (!TreeView_GetItem(hwndTV, &tvi))
            return (FALSE);
		lstrcpy(sz1, lpszDir);
		if (wcscmp(tvi.pszText,TEXT("\\")) == 0) //we are at the root.
			wsprintf(lpszDir, TEXT("%s%s"), tvi.pszText, sz1);
		else
			wsprintf(lpszDir, TEXT("%s\\%s"), tvi.pszText, sz1);
    }

	// Add the wildcard needed for FindFirstFile()
	lstrcpy(sz1, lpszDir);
	if (wcscmp(sz1,TEXT("\\")) == 0) //we are at the root.
		wsprintf(lpszDir, TEXT("%s*.*"), sz1);
	else
		wsprintf(lpszDir, TEXT("%s\\*.*"), sz1);
	// Free the strings now that we're done
	LocalFree(sz0);
	LocalFree(sz1);
    return (TRUE);
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜影院一区| 日本不卡一二三区黄网| 久久午夜免费电影| 91精品国产欧美一区二区| 欧美日韩精品专区| 欧美精品久久一区| 777午夜精品视频在线播放| 7777女厕盗摄久久久| 欧美一区二区精品| 久久久九九九九| 国产精品人人做人人爽人人添| 久久久久久黄色| 中文字幕一区三区| 一区二区三区四区国产精品| 亚洲一区成人在线| 日本在线不卡视频| 国产精品一区二区在线观看不卡| 国产乱码字幕精品高清av| 成人美女视频在线看| 9人人澡人人爽人人精品| 色噜噜狠狠色综合欧洲selulu| 欧美日韩一级片在线观看| 日韩午夜av电影| 国产欧美一区二区三区鸳鸯浴| 综合久久综合久久| 日韩1区2区3区| 成人黄色在线网站| 欧美日韩亚州综合| 国产片一区二区三区| 亚洲免费视频中文字幕| 美女www一区二区| 国产mv日韩mv欧美| 欧美精品一二三区| 久久久久久久久久久久久夜| 日韩一区在线看| 美女视频免费一区| 一本久久a久久精品亚洲| 欧美一区二区精品久久911| 中文字幕第一区| 日本不卡中文字幕| 91福利精品视频| 中文字幕第一区综合| 琪琪久久久久日韩精品| av一本久道久久综合久久鬼色| 69成人精品免费视频| 亚洲人一二三区| 国产精品一区二区久激情瑜伽| 91福利在线看| 亚洲视频你懂的| 国产成人免费视频网站| 欧美久久高跟鞋激| 亚洲三级电影网站| 国产91在线观看| 精品国产一区二区三区忘忧草| 一区二区三区 在线观看视频| 国产精品资源站在线| 日韩一区二区三区免费看| 亚洲欧美偷拍另类a∨色屁股| 国产美女视频91| 6080午夜不卡| 亚洲成人动漫在线观看| 日本高清免费不卡视频| 中文字幕巨乱亚洲| 国产成人aaa| 久久九九国产精品| 国产精品一区二区果冻传媒| 日韩手机在线导航| 免费人成网站在线观看欧美高清| 欧美午夜理伦三级在线观看| 亚洲欧美综合另类在线卡通| 成人在线视频一区| 亚洲国产精品高清| 成人免费视频app| 国产精品美女久久久久久久| 国产成人精品网址| 国产欧美精品区一区二区三区 | 日本一区二区高清| 国产永久精品大片wwwapp | 丁香亚洲综合激情啪啪综合| 欧美大胆一级视频| 国产在线精品一区二区夜色 | 国产资源在线一区| 精品福利在线导航| 国产酒店精品激情| 欧美国产国产综合| 不卡大黄网站免费看| 亚洲视频图片小说| 欧美色爱综合网| 日韩精品色哟哟| 精品国产三级a在线观看| 国产精品99久久久久久久女警 | 亚洲va欧美va人人爽| 欧美日韩一区二区三区高清| 日本美女一区二区三区| 久久久久久97三级| 91网站最新网址| 午夜在线电影亚洲一区| 欧美成人bangbros| 成人午夜在线播放| 亚洲国产精品欧美一二99| 日韩视频在线永久播放| 成人中文字幕在线| 午夜精品一区二区三区电影天堂| 欧美成人一区二区三区在线观看| 高清shemale亚洲人妖| 亚洲美女屁股眼交3| 制服丝袜国产精品| av影院午夜一区| 丝袜美腿亚洲综合| 中文字幕精品三区| 欧美一区二区在线不卡| 成人性生交大片免费看视频在线| 亚洲国产综合色| 国产三级精品视频| 在线播放91灌醉迷j高跟美女 | 夫妻av一区二区| 亚洲午夜激情网站| 欧美极品少妇xxxxⅹ高跟鞋| 精品视频一区三区九区| 国产精品888| 日韩av电影天堂| 亚洲欧美一区二区三区极速播放 | 亚瑟在线精品视频| 国产精品无遮挡| 欧美一区二区播放| 在线视频观看一区| 成人爽a毛片一区二区免费| 日本在线不卡视频| 午夜精品久久久| 亚洲天天做日日做天天谢日日欢| 7777精品伊人久久久大香线蕉最新版| 成人激情免费视频| 国产不卡视频一区二区三区| 日韩激情视频网站| 亚洲福利一区二区三区| 成人欧美一区二区三区白人| 久久久综合视频| 欧美成人福利视频| 91精品国产一区二区三区香蕉| 一本大道综合伊人精品热热| 国产乱子伦视频一区二区三区| 日韩福利视频导航| 性久久久久久久久久久久| 亚洲精品日产精品乱码不卡| 国产精品女同互慰在线看| 国产亚洲成aⅴ人片在线观看| 欧美不卡一区二区三区| 欧美一区二区三区公司| 在线播放视频一区| 91麻豆精品国产91久久久资源速度| 日本国产一区二区| 在线观看免费一区| 欧美美女视频在线观看| 欧美日韩一区二区在线视频| 欧美日韩一区三区四区| 欧美日韩精品免费观看视频| 欧美日韩另类一区| 欧美日韩一区不卡| 日韩亚洲欧美中文三级| 精品人在线二区三区| 欧美大片在线观看一区二区| 欧美大片在线观看一区| 久久久久久久久一| 国产精品久久久久三级| 中文字幕一区二区三区色视频 | 亚洲国产一区二区a毛片| 一区二区三区资源| 午夜精品久久久久久久99水蜜桃| 视频一区视频二区中文字幕| 日韩精品乱码av一区二区| 激情综合色播五月| 懂色中文一区二区在线播放| 91蜜桃传媒精品久久久一区二区| 在线一区二区视频| 日韩免费看网站| 国产亚洲一区二区三区在线观看 | 欧美一级久久久| 26uuu国产日韩综合| 国产精品久久久久久久久免费樱桃 | 蜜臀91精品一区二区三区| 国内国产精品久久| 99国产精品久久久| 欧美一区二区三区视频免费| 久久尤物电影视频在线观看| 最好看的中文字幕久久| 午夜视频一区在线观看| 国产一区二区三区不卡在线观看| 成人av中文字幕| 欧美一级视频精品观看| 国产精品视频一二| 午夜精品123| 成人午夜视频福利| 日韩一区二区三| 日韩伦理av电影| 久久国产剧场电影| 欧美综合欧美视频| 中日韩免费视频中文字幕| 天天色图综合网| voyeur盗摄精品| 2020国产精品|