青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

啤酒

一個(gè)空白者

 

隨筆!

//////////////////////////////////////////////////////////////////////////////////////////?
這樣可以選中呀
int nItem = -1;
?nItem = m_listApp.GetNextItem(nItem, LVNI_SELECTED);
?m_listApp.DeleteItem(nItem);
////////////////////////////////////////////////////////////////////////////////////////////
1。彈出方式菜單
// The code fragment shows how to get the File menu from the
// application window and displays it as a floating popup menu
// when the right mouse button is clicked in view.
// CMyView is a CView-derived class.
void CMyView::OnRButtonDown(UINT nFlags, CPoint point) 
{
??CView::OnRButtonDown(nFlags, point);

??CMenu* menu_bar = AfxGetMainWnd()->GetMenu();
??CMenu* file_menu = menu_bar->GetSubMenu(0); 
??ASSERT(file_menu);

??file_menu->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, 
????point.y, this);
}
2。圖標(biāo)設(shè)置
BOOL CListCtrlDemoDlg::InitImageList()
{
?// Create 256 color image lists
?HIMAGELIST hList = ImageList_Create(32,32, ILC_COLOR8 |ILC_MASK , 8, 1);
?m_cImageListNormal.Attach(hList);
?hList = ImageList_Create(16, 16, ILC_COLOR8 | ILC_MASK, 8, 1);
?m_cImageListSmall.Attach(hList);

?


?// Load the large icons
?CBitmap cBmp;

?

?cBmp.LoadBitmap(IDB_IMAGES_NORMAL);
?m_cImageListNormal.Add(&cBmp, RGB(255,0, 255));
?cBmp.DeleteObject();

?

?// Load the small icons
?cBmp.LoadBitmap(IDB_IMAGES_SMALL);
?m_cImageListSmall.Add(&cBmp, RGB(255,0, 255));

?

?// Attach them
?m_cListCtrl.SetImageList(&m_cImageListNormal, LVSIL_NORMAL);
?m_cListCtrl.SetImageList(&m_cImageListSmall, LVSIL_SMALL);

?

?return TRUE;

}
3。插入圖標(biāo)
/////////////////////////////////////////////////////////////////////////////
void CListCtrlDemoDlg::InsertItems()
{
?//刪除所有的當(dāng)前條目?jī)?nèi)容
?m_cListCtrl.DeleteAllItems();

?

?//用LV_ITEM結(jié)構(gòu)指向要插入的條目
?LVITEM lvi;
?CString strItem;
?for (int i = 0; i < m_nItems; i++)
?{
??// Insert the first item
??lvi.mask =? LVIF_IMAGE | LVIF_TEXT;
??strItem.Format(_T("Item %d"), i);
?
??lvi.iItem = i;

?

??lvi.iSubItem = 0;
??lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
??lvi.iImage = i%8;??// There are 8 images in the image list
??m_cListCtrl.InsertItem(&lvi);

?

??// Set subitem 1
??strItem.Format(_T("%d"), 10*i);
??lvi.iSubItem =1;
??lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
??m_cListCtrl.SetItem(&lvi);

?

??// Set subitem 2
??strItem.Format(_T("%s"), COleDateTime::GetCurrentTime().Format(_T("Created: %I:%M:%S %p, %m/%d/%Y")));
??lvi.iSubItem =4;
??lvi.pszText = (LPTSTR)(LPCTSTR)(strItem);
??m_cListCtrl.SetItem(&lvi);

?

?}
}
4。刪除條目
void CMmDlg::OnDelete()
{
?int i,iState;

?int nItemSelected=m_mm_host_ListCtrl.GetSelectedCount();//得到所選表項(xiàng)數(shù)

?int nItemCount=m_mm_host_ListCtrl.GetItemCount();//得到表項(xiàng)總數(shù)

?if(nItemSelected<1)//如果沒(méi)有選中行,退出
??return;

?for(i=nItemCount-1;i>=0;i--)
?{

??iState=m_mm_host_ListCtrl.GetItemState(i,LVIS_SELECTED);

??if(iState!=0)
???m_mm_host_ListCtrl.DeleteItem(i);
?}
}
5。擊活條目

void CMmDlg::OnClickList(NMHDR* pNMHDR, LRESULT* pResult)
{
?// TODO: Add your control notification handler code here
?int nItem = -1;
?
?LPNMITEMACTIVATE lpNMItemActivate = (LPNMITEMACTIVATE)pNMHDR;

?if(lpNMItemActivate != NULL)
?{
??nItem = lpNMItemActivate->iItem;
?}

?//CString str;
?//str.Format("%d",nItem);
?//MessageBox(str);

?*pResult = 0;
}

posted @ 2006-08-30 14:48 啤酒 閱讀(386) | 評(píng)論 (1)編輯 收藏

CListCtrl使用技巧

//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
排序算發(fā)
// SortTextItems	- Sort the list based on column text// Returns		- Returns truefor success// nCol			- column that contains the text to be sorted// bAscending		- indicate sort order// low			- row to start scanning from - default row is 0// high			- row to end scan. -1 indicates last row
字符串
/////////////////////////// BOOL CMyListCtrl::SortTextItems( int nCol, BOOL bAscending,? int low /*= 0*, int high /*= -1* ) { if( nCol >= ((CHeaderCtrl*)GetDlgItem(0))->GetItemCount() ) return FALSE; if( high == -1 ) high = GetItemCount() - 1; int lo = low; int hi = high; CString midItem; if( hi <= lo ) return FALSE; midItem = GetItemText( (lo+hi)/2, nCol ); // loop through the list until indices crosswhile( lo <= hi ) { // rowText will hold all column text for one row CStringArray rowText; // find the first element that is greater than or equal to?// the partition element starting from the left Index.if( bAscending ) while( ( lo < high ) && ( GetItemText(lo, nCol) < midItem ) ) ++lo; elsewhile( ( lo < high ) && ( GetItemText(lo, nCol) > midItem ) ) ++lo; // find an element that is smaller than or equal to?// the partition element starting from the right Index.if( bAscending ) while( ( hi > low ) && ( GetItemText(hi, nCol) > midItem ) ) --hi; elsewhile( ( hi > low ) && ( GetItemText(hi, nCol) < midItem ) ) --hi; // if the indexes have not crossed, swap// and if the items are not equalif( lo <= hi ) { // swap only if the items are not equalif( GetItemText(lo, nCol) != GetItemText(hi, nCol)) { // swap the rows LV_ITEM lvitemlo, lvitemhi; int nColCount =? ((CHeaderCtrl*)GetDlgItem(0))->GetItemCount(); rowText.SetSize( nColCount ); int i; for( i=0; i<nColCount; i++) rowText[i] = GetItemText(lo, i); lvitemlo.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_STATE; lvitemlo.iItem = lo; lvitemlo.iSubItem = 0; lvitemlo.stateMask = LVIS_CUT | LVIS_DROPHILITED |? LVIS_FOCUSED |? LVIS_SELECTED |? LVIS_OVERLAYMASK | LVIS_STATEIMAGEMASK; lvitemhi = lvitemlo; lvitemhi.iItem = hi; GetItem( &lvitemlo ); GetItem( &lvitemhi ); for( i=0; i<nColCount; i++) SetItemText(lo, i, GetItemText(hi, i)); lvitemhi.iItem = lo; SetItem( &lvitemhi ); for( i=0; i<nColCount; i++) SetItemText(hi, i, rowText[i]); lvitemlo.iItem = hi; SetItem( &lvitemlo ); } ++lo; --hi; } } // If the right index has not reached the left side of array// must now sort the left partition.if( low < hi ) SortTextItems( nCol, bAscending , low, hi); // If the left index has not reached the right side of array// must now sort the right partition.if( lo < high ) SortTextItems( nCol, bAscending , lo, high ); return TRUE; }

//////////////////////////////////////////////////////////

數(shù)值:
bool CMyListCtrl::SortNumericItems( int nCol, BOOL bAscending,int low/*=0*, int high/*=-1* )
{
	if( nCol >= ((CHeaderCtrl*)GetDlgItem(0))->GetItemCount() )
		return FALSE;

	if( high == -1 ) high = GetItemCount() - 1;

	int lo = low;
	int hi = high;
	CString midItem;

	if( hi <= lo )
	      return FALSE;

	midItem = GetItemText( (lo+hi)/2, nCol );

	// loop through the list until indices crosswhile( lo <= hi )
	{
 		// rowText will hold all column text for one row
 		CStringArray rowText;

 		// find the first element that is greater than or equal to// the partition element starting from the left Index.if( bAscending )
  			//while( ( lo < high ) && (atoi(GetItemText(lo, nCol)) < midItem ) )
			/*!!!*  while( ( lo < high ) && ( CmpItems( GetItemText(lo, nCol) , midItem, nCol) < 0 ) )
   				++lo;
 		else//while( ( lo < high ) && (atoi(GetItemText(lo, nCol)) > midItem ) )
			/*!!!*  while( ( lo < high ) && ( CmpItems( GetItemText(lo, nCol) , midItem, nCol) > 0 ) )
   			++lo;

 		// find an element that is smaller than or equal to// the partition element starting from the right Index.if( bAscending )
  			//while( ( hi > low ) && (atoi(GetItemText(hi, nCol)) > midItem ) )
			/*!!!*  while( ( hi > low ) && ( CmpItems(GetItemText(hi, nCol) , midItem, nCol ) > 0 ) )
   				--hi;
 		else//while( ( hi > low ) && (atoi(GetItemText(hi, nCol)) < midItem ) )
			/*!!!*  while( ( hi > low ) && ( CmpItems(GetItemText(hi, nCol) , midItem, nCol ) < 0 ) )
   			--hi;

 		// if the indexes have not crossed, swap// and if the items are not equalif( lo <= hi )
 		{
			// swap only if the items are not equal//if(atoi(GetItemText(lo, nCol)) != atoi(GetItemText(hi, nCol)) )
			/*!!!*  if( CmpItems (GetItemText(lo, nCol) , GetItemText(hi, nCol), Col  ) != 0) {
	   			// swap the rows
	   			LV_ITEM lvitemlo, lvitemhi;

	   			int nColCount = ((CHeaderCtrl*)GetDlgItem(0))->GetItemCount();
	   			rowText.SetSize( nColCount );

	   			int i;
	   			for( i=0; i < nColCount; i++)
	      			rowText[i] = GetItemText(lo, i);

	   			lvitemlo.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_STATE;
	   			lvitemlo.iItem = lo;
	   			lvitemlo.iSubItem = 0;
	   			lvitemlo.stateMask = LVIS_CUT | LVIS_DROPHILITED |
	      					LVIS_FOCUSED |  LVIS_SELECTED |
	      					LVIS_OVERLAYMASK | LVIS_STATEIMAGEMASK;
	   			lvitemhi = lvitemlo;
	   			lvitemhi.iItem = hi;

	   			GetItem( &lvitemlo );
	   			GetItem( &lvitemhi );

	   			for( i=0; i< nColCount; i++)
	      			SetItemText(lo, i, GetItemText(hi, i) );

	   			lvitemhi.iItem = lo;
	   			SetItem( &lvitemhi );

	   			for( i=0; i< nColCount; i++)
	      			SetItemText(hi, i, rowText[i]);

	   			lvitemlo.iItem = hi;
	   			SetItem( &lvitemlo );
	  		}

	  		++lo;
	  		--hi;
	 	}
	}

	// If the right index has not reached the left side of array// must now sort the left partition.if( low < hi )
 		SortNumericItems( nCol, bAscending , low, hi);

	// If the left index has not reached the right side of array// must now sort the right partition.if( lo < high )
 		SortNumericItems( nCol, bAscending , lo, high );

	return TRUE;
}








//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////// int i = 0;
CString str;
str.Format("%d",i*10);
// 序號(hào)for(i=0;i<10;i++)
?{? ??
??????str.Format("%d",i*10);
?? m_mm_host_ListCtrl.InsertItem(i, str, 0);
??????m_mm_host_ListCtrl.SetItemText(i, 1, str);??????m_mm_host_ListCtrl.SetItemText(i, 2, str);??????m_mm_host_ListCtrl.SetItemText(i, 3, str);}
/////////////////////////////////

void CMmDlg::OnDelete()
{
?int i,iState;

?int nItemSelected=m_mm_host_ListCtrl.GetSelectedCount();//所選表項(xiàng)數(shù) 
?int nItemCount=m_mm_host_ListCtrl.GetItemCount();//表項(xiàng)總數(shù) 
?if(nItemSelected<1)
??return;
?for(i=nItemCount-1;i>=0;i--)
?{
??iState=m_mm_host_ListCtrl.GetItemState(i,LVIS_SELECTED); 
??if(iState!=0) 
???m_mm_host_ListCtrl.DeleteItem(i);
?}
}
////////////////////////////////////////////////////////////////
CListCtrl使用技巧[轉(zhuǎn)]








/////////////////////////////////////////////////////////////////
?

1. CListCtrl 風(fēng)格

????? LVS_ICON: 為每個(gè)item顯示大圖標(biāo)
????? LVS_SMALLICON: 為每個(gè)item顯示小圖標(biāo)
????? LVS_LIST: 顯示一列帶有小圖標(biāo)的item
????? LVS_REPORT: 顯示item詳細(xì)資料
????? 直觀的理解:windows資源管理器,“查看”標(biāo)簽下的“大圖標(biāo),小圖標(biāo),列表,詳細(xì)資料”
				
?

2. 設(shè)置listctrl 風(fēng)格及擴(kuò)展風(fēng)格

????? LONG lStyle;
????? lStyle = GetWindowLong(m_list.m_hWnd, GWL_STYLE);//獲取當(dāng)前窗口style
????? lStyle &= ~LVS_TYPEMASK; //清除顯示方式位
????? lStyle |= LVS_REPORT; //設(shè)置style
????? SetWindowLong(m_list.m_hWnd, GWL_STYLE, lStyle);//設(shè)置style
?
????? DWORD dwStyle = m_list.GetExtendedStyle();
????? dwStyle |= LVS_EX_FULLROWSELECT;//選中某行使整行高亮(只適用與report風(fēng)格的listctrl)
????? dwStyle |= LVS_EX_GRIDLINES;//網(wǎng)格線(只適用與report風(fēng)格的listctrl)
????? dwStyle |= LVS_EX_CHECKBOXES;//item前生成checkbox控件
????? m_list.SetExtendedStyle(dwStyle); //設(shè)置擴(kuò)展風(fēng)格
?
????? 注:listview的style請(qǐng)查閱msdn
????? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceshellui5/html/wce50lrflistviewstyles.asp
				
				?

3. 插入數(shù)據(jù)

				
				
				
				????? m_list.InsertColumn( 0, "ID", LVCFMT_LEFT, 40 );//插入列
????? m_list.InsertColumn( 1, "NAME", LVCFMT_LEFT, 50 );
????? int nRow = m_list.InsertItem(0, “11”);//插入行
????? m_list.SetItemText(nRow, 1, “jacky”);//設(shè)置數(shù)據(jù)
?

4. 一直選中item

				??? 選中style中的Show selection always,或者在上面第2點(diǎn)中設(shè)置LVS_SHOWSELALWAYS


5. 選中和取消選中一行

??? int nIndex = 0;
??? //選中
??? m_list.SetItemState(nIndex, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED);
??? //取消選中
??? m_list.SetItemState(nIndex, 0, LVIS_SELECTED|LVIS_FOCUSED);
?

6. 得到listctrl中所有行的checkbox的狀態(tài)

????? m_list.SetExtendedStyle(LVS_EX_CHECKBOXES);
????? CString str;
????? for(int i=0; i????? {
?????????? if( m_list.GetItemState(i, LVIS_SELECTED) == LVIS_SELECTED || m_list.GetCheck(i))
?????????? {
??????????????? str.Format(_T("第%d行的checkbox為選中狀態(tài)"), i);
??????????????? AfxMessageBox(str);
?????????? }
????? }
				
?

7. 得到listctrl中所有選中行的序號(hào)

				
						
????? 方法一:
????? CString str;
????? for(int i=0; i????? {
?????????? if( m_list.GetItemState(i, LVIS_SELECTED) == LVIS_SELECTED )
?????????? {
??????????????? str.Format(_T("選中了第%d行"), i);
??????????????? AfxMessageBox(str);
?????????? }
????? }
????? 方法二:
????? POSITION pos = m_list.GetFirstSelectedItemPosition();
????? if (pos == NULL)
?????????? TRACE0("No items were selected!\n");
????? else
????? {
?????????? while (pos)
?????????? {
??????????????? int nItem = m_list.GetNextSelectedItem(pos);
??????????????? TRACE1("Item %d was selected!\n", nItem);
??????????????? // you could do your own processing on nItem here
?????????? }
????? }
				
?

8. 得到item的信息

????? TCHAR szBuf[1024];
????? LVITEM lvi;
????? lvi.iItem = nItemIndex;
????? lvi.iSubItem = 0;
????? lvi.mask = LVIF_TEXT;
????? lvi.pszText = szBuf;
????? lvi.cchTextMax = 1024;
????? m_list.GetItem(&lvi);
????? 關(guān)于得到設(shè)置item的狀態(tài),還可以參考msdn文章
????? Q173242: Use Masks to Set/Get Item States in CListCtrl
?????????????? http://support.microsoft.com/kb/173242/en-us
				
						
?

9. 得到listctrl的所有列的header字符串內(nèi)容

????? LVCOLUMN lvcol;
????? char? str[256];
????? int?? nColNum;
????? CString? strColumnName[4];//假如有4列
????? nColNum = 0;
????? lvcol.mask = LVCF_TEXT;
????? lvcol.pszText = str;
????? lvcol.cchTextMax = 256;
????? while(m_list.GetColumn(nColNum, &lvcol))
????? {
?????????? strColumnName[nColNum] = lvcol.pszText;
?????????? nColNum++;
????? }
				
?

10. 使listctrl中一項(xiàng)可見,即滾動(dòng)滾動(dòng)條

??? m_list.EnsureVisible(i, FALSE);

11. 得到listctrl列數(shù)

??? int nHeadNum = m_list.GetHeaderCtrl()->GetItemCount();

12. 刪除所有列

??? ? 方法一:
???? ??? while ( m_list.DeleteColumn (0))
??? ?? 因?yàn)槟銊h除了第一列后,后面的列會(huì)依次向上移動(dòng)。
??? ? 方法二:
????? int nColumns = 4;
????? for (int i=nColumns-1; i>=0; i--)
????? ??? m_list.DeleteColumn (i);
				
?

13. 得到單擊的listctrl的行列號(hào)

????? 添加listctrl控件的NM_CLICK消息相應(yīng)函數(shù)
????? void CTest6Dlg::OnClickList1(NMHDR* pNMHDR, LRESULT* pResult)
????? {
?????????? // 方法一:
?????????? /*
?????????? DWORD dwPos = GetMessagePos();
?????????? CPoint point( LOWORD(dwPos), HIWORD(dwPos) );
??
?????????? m_list.ScreenToClient(&point);
??
?????????? LVHITTESTINFO lvinfo;
?????????? lvinfo.pt = point;
?????????? lvinfo.flags = LVHT_ABOVE;
????
?????????? int nItem = m_list.SubItemHitTest(&lvinfo);
?????????? if(nItem != -1)
?????????? {
??????????????? CString strtemp;
??????????????? strtemp.Format("單擊的是第%d行第%d列", lvinfo.iItem, lvinfo.iSubItem);
??????????????? AfxMessageBox(strtemp);
?????????? }
????????? */
??
????????? // 方法二:
????????? /*
?????????? NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
?????????? if(pNMListView->iItem != -1)
?????????? {
??????????????? CString strtemp;
??????????????? strtemp.Format("單擊的是第%d行第%d列",
??????????????????????????????? pNMListView->iItem, pNMListView->iSubItem);
??????????????? AfxMessageBox(strtemp);
?????????? }
????????? */
?????????? *pResult = 0;
????? }
?

14. 判斷是否點(diǎn)擊在listctrl的checkbox上

????? 添加listctrl控件的NM_CLICK消息相應(yīng)函數(shù)
????? void CTest6Dlg::OnClickList1(NMHDR* pNMHDR, LRESULT* pResult)
????? {
?????????? DWORD dwPos = GetMessagePos();
?????????? CPoint point( LOWORD(dwPos), HIWORD(dwPos) );
??
?????????? m_list.ScreenToClient(&point);
??
?????????? LVHITTESTINFO lvinfo;
?????????? lvinfo.pt = point;
?????????? lvinfo.flags = LVHT_ABOVE;
????
?????????? UINT nFlag;
?????????? int nItem = m_list.HitTest(point, &nFlag);
?????????? //判斷是否點(diǎn)在checkbox上
?????????? if(nFlag == LVHT_ONITEMSTATEICON)
?????????? {
??????????????? AfxMessageBox("點(diǎn)在listctrl的checkbox上");
?????????? }
?????????? *pResult = 0;
????? }
				
?

15. 右鍵點(diǎn)擊listctrl的item彈出菜單

????? 添加listctrl控件的NM_RCLICK消息相應(yīng)函數(shù)
????? void CTest6Dlg::OnRclickList1(NMHDR* pNMHDR, LRESULT* pResult)
????? {
?????????? NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
?????????? if(pNMListView->iItem != -1)
?????????? {
??????????????? DWORD dwPos = GetMessagePos();
??????????????? CPoint point( LOWORD(dwPos), HIWORD(dwPos) );
???
??????????????? CMenu menu;
??????????????? VERIFY( menu.LoadMenu( IDR_MENU1 ) );
??????????????? CMenu* popup = menu.GetSubMenu(0);
??????????????? ASSERT( popup != NULL );
??????????????? popup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this );
?????????? }
?????????? *pResult = 0;
? }
				
?
?

16. item切換焦點(diǎn)時(shí)(包括用鍵盤和鼠標(biāo)切換item時(shí)),狀態(tài)的一些變化順序

????? 添加listctrl控件的LVN_ITEMCHANGED消息相應(yīng)函數(shù)
????? void CTest6Dlg::OnItemchangedList1(NMHDR* pNMHDR, LRESULT* pResult)
????? {
?????????? NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
?????????? // TODO: Add your control notification handler code here
???
?????????? CString sTemp;
?
?????????? if((pNMListView->uOldState & LVIS_FOCUSED) == LVIS_FOCUSED &&
??????????? (pNMListView->uNewState & LVIS_FOCUSED) == 0)
?????????? {
??????????????? sTemp.Format("%d losted focus",pNMListView->iItem);
?????????? }
?????????? else if((pNMListView->uOldState & LVIS_FOCUSED) == 0 &&
?????????????? (pNMListView->uNewState & LVIS_FOCUSED) == LVIS_FOCUSED)
?????????? {
??????????????? sTemp.Format("%d got focus",pNMListView->iItem);
?????????? }
?
?????????? if((pNMListView->uOldState & LVIS_SELECTED) == LVIS_SELECTED &&
??????????? (pNMListView->uNewState & LVIS_SELECTED) == 0)
?????????? {
??????????????? sTemp.Format("%d losted selected",pNMListView->iItem);
?????????? }
?????????? else if((pNMListView->uOldState & LVIS_SELECTED) == 0 &&
??????????? (pNMListView->uNewState & LVIS_SELECTED) == LVIS_SELECTED)
?????????? {
??????????????? sTemp.Format("%d got selected",pNMListView->iItem);
?????????? }
???
?????????? *pResult = 0;
????? }
				

?

17. 得到另一個(gè)進(jìn)程里的listctrl控件的item內(nèi)容

				
				
				
						http://www.codeproject.com/threads/int64_memsteal.asp
				
				


18. 選中l(wèi)istview中的item

Q131284: How To Select a Listview Item Programmatically
http://support.microsoft.com/kb/131284/en-us


19. 如何在CListView中使用CListCtrl的派生類

				
						http://www.codeguru.com/cpp/controls/listview/introduction/article.php/c919/
				
				
				
						
?

20. listctrl的subitem添加圖標(biāo)

????? m_list.SetExtendedStyle(LVS_EX_SUBITEMIMAGES);
????? m_list.SetItem(..); //具體參數(shù)請(qǐng)參考msdn
?

21. 在CListCtrl顯示文件,并根據(jù)文件類型來(lái)顯示圖標(biāo)

????? 網(wǎng)上找到的代碼,share
????? BOOL CTest6Dlg::OnInitDialog()
????? {
?????????? CDialog::OnInitDialog();
??
?????????? HIMAGELIST himlSmall;
?????????? HIMAGELIST himlLarge;
?????????? SHFILEINFO sfi;
?????????? char? cSysDir[MAX_PATH];
?????????? CString? strBuf;
?
?????????? memset(cSysDir, 0, MAX_PATH);
??
?????????? GetWindowsDirectory(cSysDir, MAX_PATH);
?????????? strBuf = cSysDir;
?????????? sprintf(cSysDir, "%s", strBuf.Left(strBuf.Find("\\")+1));
?
?????????? himlSmall = (HIMAGELIST)SHGetFileInfo ((LPCSTR)cSysDir,?
????????????????????? 0,?
????????????????????? &sfi,
????????????????????? sizeof(SHFILEINFO),?
????????????????????? SHGFI_SYSICONINDEX | SHGFI_SMALLICON );
??
?????????? himlLarge = (HIMAGELIST)SHGetFileInfo((LPCSTR)cSysDir,?
????????????????????? 0,?
????????????????????? &sfi,?
????????????????????? sizeof(SHFILEINFO),?
????????????????????? SHGFI_SYSICONINDEX | SHGFI_LARGEICON);
??
?????????? if (himlSmall && himlLarge)
?????????? {
??????????????? ::SendMessage(m_list.m_hWnd, LVM_SETIMAGELIST,
???????????????????????????? (WPARAM)LVSIL_SMALL, (LPARAM)himlSmall);
??????????????? ::SendMessage(m_list.m_hWnd, LVM_SETIMAGELIST,
???????????????????????????? (WPARAM)LVSIL_NORMAL, (LPARAM)himlLarge);
?????????? }
?????????? return TRUE;? // return TRUE? unless you set the focus to a control
????? }
?
????? void CTest6Dlg::AddFiles(LPCTSTR lpszFileName, BOOL bAddToDocument)
????? {
?????????? int nIcon = GetIconIndex(lpszFileName, FALSE, FALSE);
?????????? CString strSize;
?????????? CFileFind filefind;
?
?????????? //? get file size
?????????? if (filefind.FindFile(lpszFileName))
?????????? {
??????????????? filefind.FindNextFile();
??????????????? strSize.Format("%d", filefind.GetLength());
?????????? }
?????????? else
??????????????? strSize = "0";
??
?????????? // split path and filename
?????????? CString strFileName = lpszFileName;
?????????? CString strPath;
?
?????????? int nPos = strFileName.ReverseFind('\\');
?????????? if (nPos != -1)
?????????? {
??????????????? strPath = strFileName.Left(nPos);
??????????????? strFileName = strFileName.Mid(nPos + 1);
?????????? }
??
?????????? // insert to list
?????????? int nItem = m_list.GetItemCount();
?????????? m_list.InsertItem(nItem, strFileName, nIcon);
?????????? m_list.SetItemText(nItem, 1, strSize);
?????????? m_list.SetItemText(nItem, 2, strFileName.Right(3));
?????????? m_list.SetItemText(nItem, 3, strPath);
????? }
?
????? int CTest6Dlg::GetIconIndex(LPCTSTR lpszPath, BOOL bIsDir, BOOL bSelected)
????? {
?????????? SHFILEINFO sfi;
?????????? memset(&sfi, 0, sizeof(sfi));
??
?????????? if (bIsDir)
?????????? {
??????????? SHGetFileInfo(lpszPath,?
???????????????????????? FILE_ATTRIBUTE_DIRECTORY,?
???????????????????????? &sfi,?
???????????????????????? sizeof(sfi),?
???????????????????????? SHGFI_SMALLICON | SHGFI_SYSICONINDEX |
???????????????????????? SHGFI_USEFILEATTRIBUTES |(bSelected ? SHGFI_OPENICON : 0));?
??????????? return? sfi.iIcon;
?????????? }
?????????? else
?????????? {
??????????? SHGetFileInfo (lpszPath,?
???????????????????????? FILE_ATTRIBUTE_NORMAL,?
???????????????????????? &sfi,?
???????????????????????? sizeof(sfi),?
???????????????????????? SHGFI_SMALLICON | SHGFI_SYSICONINDEX |?
???????????????????????? SHGFI_USEFILEATTRIBUTES | (bSelected ? SHGFI_OPENICON : 0));
??????????? return?? sfi.iIcon;
?????????? }
?????????? return? -1;
????? }
				
?

22. listctrl內(nèi)容進(jìn)行大數(shù)據(jù)量更新時(shí),避免閃爍

????? m_list.SetRedraw(FALSE);
????? //更新內(nèi)容
????? m_list.SetRedraw(TRUE);
????? m_list.Invalidate();
????? m_list.UpdateWindow();
?
或者參考
				
						http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cwnd.3a3a.setredraw.asp
				
				
				
						
?

23. listctrl排序

Q250614:How To Sort Items in a CListCtrl in Report View
http://support.microsoft.com/kb/250614/en-us
				
						
?

24. 在listctrl中選中某個(gè)item時(shí)動(dòng)態(tài)改變其icon或bitmap

Q141834: How to change the icon or the bitmap of a CListCtrl item in Visual C++
http://support.microsoft.com/kb/141834/en-us


25. 在添加item后,再InsertColumn()后導(dǎo)致整列數(shù)據(jù)移動(dòng)的問(wèn)題

Q151897: CListCtrl::InsertColumn() Causes Column Data to Shift 
http://support.microsoft.com/kb/151897/en-us
				
						
?

26. 關(guān)于listctrl第一列始終居左的問(wèn)題

解決辦法:把第一列當(dāng)一個(gè)虛列,從第二列開始插入列及數(shù)據(jù),最后刪除第一列。
?????
具體解釋參閱?? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/structures/lvcolumn.asp
				
				?

27. 鎖定column header的拖動(dòng)

				
						http://msdn.microsoft.com/msdnmag/issues/03/06/CQA/
				
				
				
						
?

28. 如何隱藏clistctrl的列

??? 把需隱藏的列的寬度設(shè)為0,然后檢測(cè)當(dāng)該列為隱藏列時(shí),用上面第27點(diǎn)的鎖定column 的拖動(dòng)來(lái)實(shí)現(xiàn)

29. listctrl進(jìn)行大數(shù)據(jù)量操作時(shí),使用virtual list???

				
						http://www.codeguru.com/cpp/controls/listview/advanced/article.php/c4151/
				
				
http://www.codeproject.com/listctrl/virtuallist.asp
				
						
?

30. 關(guān)于item只能顯示259個(gè)字符的問(wèn)題

解決辦法:需要在item上放一個(gè)edit。
				
?

31. 響應(yīng)在listctrl的column header上的鼠標(biāo)右鍵單擊

Q125694: How To Find Out Which Listview Column Was Right-Clicked
http://support.microsoft.com/kb/125694/en-us
				
						
?

32. 類似于windows資源管理器的listview

Q234310: How to implement a ListView control that is similar to Windows Explorer by using DirLV.exe
http://support.microsoft.com/kb/234310/en-us
				
				?

33. 在ListCtrl中OnTimer只響應(yīng)兩次的問(wèn)題

Q200054:
PRB: OnTimer() Is Not Called Repeatedly for a List Control
http://support.microsoft.com/kb/200054/en-us

34. 以下為一些為實(shí)現(xiàn)各種自定義功能的listctrl派生類

????????? (1)??? 拖放??????? 
?????????????????? http://www.codeproject.com/listctrl/dragtest.asp
?????????????????? 在CListCtrl和CTreeCtrl間拖放
?????????????????? http://support.microsoft.com/kb/148738/en-us
?
????????? (2)??? 多功能listctrl
?????????????????? 支持subitem可編輯,圖標(biāo),radiobutton,checkbox,字符串改變顏色的類
?????????????????? http://www.codeproject.com/listctrl/quicklist.asp
?
?????????????????? 支持排序,subitem可編輯,subitem圖標(biāo),subitem改變顏色的類
?????????????????? http://www.codeproject.com/listctrl/ReportControl.asp
????????? (3)??? subitem中顯示超鏈接
?????????????????? http://www.codeproject.com/listctrl/CListCtrlLink.asp
????????? (4)??? subitem的tooltip提示
?????????????????? http://www.codeproject.com/listctrl/ctooltiplistctrl.asp
????????? (5)??? subitem中顯示進(jìn)度條??? 
?????????????????? http://www.codeproject.com/listctrl/ProgressListControl.asp
?????????????????? http://www.codeproject.com/listctrl/napster.asp
?????????????????? http://www.codeguru.com/Cpp/controls/listview/article.php/c4187/
????????? (6)??? 動(dòng)態(tài)改變subitem的顏色和背景色
??????????????????? http://www.codeproject.com/listctrl/highlightlistctrl.asp
??? ??? ??? ??? ??? http://www.codeguru.com/Cpp/controls/listbox/colorlistboxes/article.php/c4757/
?
????????? (7)??? 類vb屬性對(duì)話框
??????????????????? http://www.codeproject.com/listctrl/propertylistctrl.asp
??????????????????? http://www.codeguru.com/Cpp/controls/listview/propertylists/article.php/c995/
??????????????????? http://www.codeguru.com/Cpp/controls/listview/propertylists/article.php/c1041/
?
????????? (8)??? 選中subitem(只高亮選中的item)
??????????????????? http://www.codeproject.com/listctrl/SubItemSel.asp
??????????????????? http://www.codeproject.com/listctrl/ListSubItSel.asp
?
????????? (9)??? 改變行高
??????????????????? http://www.codeproject.com/listctrl/changerowheight.asp
?
????????? (10)?? 改變行顏色
??????????????????? http://www.codeproject.com/listctrl/coloredlistctrl.asp
?
????????? (11)?? 可編輯subitem的listctrl
??????????????????? http://www.codeproject.com/listctrl/nirs2000.asp
??????????????????? http://www.codeproject.com/listctrl/editing_subitems_in_listcontrol.asp
?
????????? (12)?? subitem可編輯,插入combobox,改變行顏色,subitem的tooltip提示
??????????????????? http://www.codeproject.com/listctrl/reusablelistcontrol.asp
?
????????? (13)?? header 中允許多行字符串
??????????????????? http://www.codeproject.com/listctrl/headerctrlex.asp
?
????????? (14)?? 插入combobox
??????????????????? http://www.codeguru.com/Cpp/controls/listview/editingitemsandsubitem/article.php/c979/
?
????????? (15)?? 添加背景圖片
??????????????????? http://www.codeguru.com/Cpp/controls/listview/backgroundcolorandimage/article.php/c4173/
??????????????????? http://www.codeguru.com/Cpp/controls/listview/backgroundcolorandimage/article.php/c983/
??????????????????? http://www.vchelp.net/vchelp/archive.asp?type_id=9&class_id=1&cata_id=1&article_id=1088&search_term=
???
????????? (16)? 自適應(yīng)寬度的listctrl
??????????????????? http://www.codeproject.com/useritems/AutosizeListCtrl.asp
??? ?? ?? (17)? 改變ListCtrl高亮?xí)r的顏色(默認(rèn)為藍(lán)色)
??? ?? ?? ?? ?? ?? 處理 NM_CUSTOMDRAW
??????????
http://www.codeproject.com/listctrl/lvcustomdraw.asp

				
/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////






m_mm_host_ListCtrl.DeleteAllItems()


m_mm_host_ListCtrl.ModifyStyle(0,LVS_REPORT);
?////////////
?LONG lStyle = m_mm_host_ListCtrl.SendMessage(
????????LVM_GETEXTENDEDLISTVIEWSTYLE);
?lStyle |= LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES |
????LVS_EX_HEADERDRAGDROP;
?m_mm_host_ListCtrl.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0,
???(LPARAM)lStyle);






?////////////

?或者:
LONG lStyle;
?lStyle = GetWindowLong(m_mm_host_ListCtrl.m_hWnd, GWL_STYLE);//獲取當(dāng)前窗口style
?lStyle &= ~LVS_TYPEMASK; //清除顯示方式位
?lStyle |= LVS_REPORT; //設(shè)置style
?SetWindowLong(m_mm_host_ListCtrl.m_hWnd, GWL_STYLE, lStyle);//設(shè)置style
?
?DWORD dwStyle = m_mm_host_ListCtrl.GetExtendedStyle();
?dwStyle |= LVS_EX_FULLROWSELECT;//選中某行使整行高亮(只適用與report風(fēng)格的listctrl)
?dwStyle |= LVS_EX_GRIDLINES;//網(wǎng)格線(只適用與report風(fēng)格的listctrl)
?dwStyle |= LVS_EX_CHECKBOXES;//item前生成checkbox控件
?m_mm_host_ListCtrl.SetExtendedStyle(dwStyle); //設(shè)置擴(kuò)展風(fēng)格






?/////////////












m_mm_host_ListCtrl.InsertColumn(0,"日志序號(hào)",LVCFMT_CENTER,60,0);
?m_mm_host_ListCtrl.InsertColumn(1,"來(lái)源",LVCFMT_CENTER,80,1);
?m_mm_host_ListCtrl.InsertColumn(2,"日期",LVCFMT_CENTER,80,2);
?m_mm_host_ListCtrl.InsertColumn(3,"時(shí)間",LVCFMT_CENTER,80,3);
?m_mm_host_ListCtrl.InsertColumn(4,"分類",LVCFMT_CENTER,80,4);
?m_mm_host_ListCtrl.InsertColumn(5,"ID",LVCFMT_CENTER,50,5);
?m_mm_host_ListCtrl.InsertColumn(6,"用戶",LVCFMT_CENTER,120,6);
?m_mm_host_ListCtrl.InsertColumn(7,"計(jì)算機(jī)",LVCFMT_CENTER,120,7);


/////////////////////////////////////////////////////////////////////////
				
?

posted @ 2006-08-30 13:31 啤酒 閱讀(1355) | 評(píng)論 (0)編輯 收藏

用C寫的“讀取系統(tǒng)日志”,花了我不少時(shí)間的,雖然不難

???? #include <stdio.h>
//#include <unistd.h>
#include <string.h>
#include <time.h>

#include <windows.h>

#define BUFFER_SIZE 1024*64

//#define DEFAULT_FILE ?"C:\\ossec-extracted-evt.log"

FILE *fp;
int event_record=0;


/* Event logging local structure */
typedef struct _os_el
{
??? int time_of_last;?
??? char *event_name;

??? EVENTLOGRECORD *er;
??? HANDLE h;

??? DWORD record;
}os_el;
os_el el[3];
int el_last = 0;


/** int startEL(char *app, os_el *el)
?* Starts the event logging for each el
?*/
int startEL(char *app, os_el *el)
{
??? /* Opening the event log */
??? el->h = OpenEventLog(NULL, app);
??? if(!el->h)
??? {
??????? return(0);????
??? }

??? el->event_name = app;
??? GetOldestEventLogRecord(el->h, &el->record);

??? return(1);
}

?

/** char *el_GetCategory(int category_id)
?* Returns a string related to the category id of the log.
?*/
//得到一個(gè)事件的類型,,輸入是一個(gè)事件類型id輸出是漢字串
char *el_GetCategory(int category_id)
{
??? char *cat;
??? switch(category_id)
??? {
??????? case EVENTLOG_ERROR_TYPE:
??????????? cat = "錯(cuò)誤";
??????????? break;
??????? case EVENTLOG_WARNING_TYPE:
??????????? cat = "警告";
??????????? break;
??????? case EVENTLOG_INFORMATION_TYPE:
??????????? cat = "信息";
??????????? break;
??????? case EVENTLOG_AUDIT_SUCCESS:
??????????? cat = "審核成功";
??????????? break;
??????? case EVENTLOG_AUDIT_FAILURE:
??????????? cat = "審核失敗";
??????????? break;
??????? default:
??????????? cat = "Unknown";
??????????? break;
??? }
??? return(cat);
}


/** int el_getEventDLL(char *evt_name, char *event_sourcename, char *event)
?* Returns the event.
?*/
int el_getEventDLL(char *evt_name, char *event_sourcename, char *event)
{
??? HKEY key;
??? DWORD ret;
??? char keyname[256];


??? keyname[255] = '\0';

??? _snprintf(keyname, 254,
??????????? "System\\CurrentControlSet\\Services\\EventLog\\%s\\%s",
??????????? evt_name,
??????????? event_sourcename);

??? /* Opening registry */????
??? if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyname, 0, KEY_ALL_ACCESS, &key)
??????????? != ERROR_SUCCESS)
??? {
??????? return(0);???
??? }


??? ret = MAX_PATH -1;?
??? if (RegQueryValueEx(key, "EventMessageFile", NULL,
??????????????? NULL, (LPBYTE)event, &ret) != ERROR_SUCCESS)
??? {
??????? event[0] = '\0';?
??????? return(0);
??? }

??? RegCloseKey(key);
??? return(1);
}

?

/** char *el_Getmessage()
?* Returns a descriptive message of the event.
?*/
//輸出是時(shí)間描述信息
char *el_GetMessage(EVENTLOGRECORD *er,? char *event_name,
????? char * event_sourcename, LPTSTR *el_sstring)
{
??? DWORD fm_flags = 0;
??? char tmp_str[257];
??? char event[MAX_PATH +1];
??? char *curr_str;
??? char *next_str;
??? LPSTR message = NULL;

??? HMODULE hevt;

??? /* Initializing variables */
??? event[MAX_PATH] = '\0';
??? tmp_str[256] = '\0';

??? /* Flags for format event */
??? fm_flags |= FORMAT_MESSAGE_FROM_HMODULE;
??? fm_flags |= FORMAT_MESSAGE_ALLOCATE_BUFFER;
??? fm_flags |= FORMAT_MESSAGE_ARGUMENT_ARRAY;

??? /* Get the file name from the registry (stored on event) */
??? if(!el_getEventDLL(event_name, event_sourcename, event))
??? {
??????? return(NULL);????
??? }????

??? curr_str = event;

??? /* If our event has multiple libraries, try each one of them */
??? while((next_str = strchr(curr_str, ';')))
??? {
??????? *next_str = '\0';
??????? next_str++;

??????? ExpandEnvironmentStrings(curr_str, tmp_str, 255);
??????? hevt = LoadLibraryEx(tmp_str, NULL, DONT_RESOLVE_DLL_REFERENCES);
??????? if(hevt)
??????? {
??????????? if(!FormatMessage(fm_flags, hevt, er->EventID,
??????????????????????? 0,
??????????????????????? (LPTSTR) &message, 0, el_sstring))
??????????? {
??????????????? message = NULL;???
??????????? }
??????????? FreeLibrary(hevt);

??????????? /* If we have a message, we can return it */
??????????? if(message)
??????????????? return(message);
??????? }

??????? curr_str = next_str;??
??? }

??? ExpandEnvironmentStrings(curr_str, tmp_str, 255);
??? hevt = LoadLibraryEx(tmp_str, NULL, DONT_RESOLVE_DLL_REFERENCES);
??? if(hevt)
??? {
??????? int hr;???
??????? if(!(hr = FormatMessage(fm_flags, hevt, er->EventID,
??????????????????????? 0,
??????????????????????? (LPTSTR) &message, 0, el_sstring)))
??????? {
??????????? message = NULL;???
??????? }
??????? FreeLibrary(hevt);

??????? /* If we have a message, we can return it */
??????? if(message)
??????????? return(message);
??? }

??? return(NULL);
}

?

/** void Read_event(os_el *el)
?* Reads the event log.
?*/
void Read_event(os_el *el, int printit)
{
??? DWORD nstr;
??? DWORD user_size;
??? DWORD domain_size;
??? DWORD read, needed;
??? int size_left;
??? int str_size;

??? char *mbuffer[BUFFER_SIZE];
??? LPSTR sstr = NULL;

??? char *tmp_str = NULL;
??? char *event_category;???//事件類型
??? char *event_sourcename;???//事件來(lái)源
??? char *event_computername;??//事件計(jì)算機(jī)名
??? char *event_descriptive_msg;?//事件描述

??? char event_el_user[257];??//事件用戶
??? char event_el_domain[257];??//事件域
??? char el_string[1025];
??? char final_out_msg[1024];??//最后輸出的信息
??? LPSTR el_sstring[57];

??? /* Er must point to the mbuffer */
??? el->er = (EVENTLOGRECORD *) &mbuffer;

??? /* Zeroing the last values */
??? el_string[1024] = '\0';
??? event_el_user[256] = '\0';
??? event_el_domain[256] = '\0';
??? final_out_msg[1023] = '\0';
??? el_sstring[56] = NULL;

??? /* Reading the event log */????
??? while(ReadEventLog(el->h,
??????????????? EVENTLOG_FORWARDS_READ | EVENTLOG_SEQUENTIAL_READ,
??????????????? 0,
??????????????? el->er, BUFFER_SIZE -1, &read, &needed))
??? {
??????? while(read > 0)
??????? {

??????????? /* We need to initialize every variable before the loop */
???//得到事件的類型
??????????? event_category = el_GetCategory(el->er->EventType);
???//得到事件來(lái)源
??????????? event_sourcename = (LPSTR) ((LPBYTE) el->er + sizeof(EVENTLOGRECORD));
???//得到計(jì)算機(jī)名
??????????? event_computername = event_sourcename + strlen(event_sourcename) + 1;
???//給描述信息初始化
??????????? event_descriptive_msg = NULL;


??????????? /* 初始化domain/user尺寸 */
??????????? user_size = 255; domain_size = 255;
??????????? event_el_domain[0] = '\0';
??????????? event_el_user[0] = '\0';


??????????? /* 設(shè)置時(shí)間的一些描述 some description */
??????????? if(el->er->NumStrings)
??????????? {?
??????????????? size_left = 1020;?

??????????????? sstr = (LPSTR)((LPBYTE)el->er + el->er->StringOffset);
??????????????? el_string[0] = '\0';

??????????????? for (nstr = 0;nstr < el->er->NumStrings;nstr++)
??????????????? {
??????????????????? str_size = strlen(sstr);?
??????????????????? strncat(el_string, sstr, size_left);

??????????????????? tmp_str= strchr(el_string, '\0');
??????????????????? if(tmp_str)
??????????????????? {
??????????????????????? *tmp_str = ' ';??
??????????????????????? tmp_str++; *tmp_str = '\0';
??????????????????? }
??????????????????? size_left-=str_size + 1;

??????????????????? if(nstr <= 54)
??????????????????????? el_sstring[nstr] = (LPSTR)sstr;

??????????????????? sstr = strchr( (LPSTR)sstr, '\0');
??????????????????? sstr++;
?????
??????????????? }

??????????????? /* Get a more descriptive message (if available) */
??????????????? event_descriptive_msg = el_GetMessage(el->er, el->event_name, event_sourcename, el_sstring);
??????????????? if(event_descriptive_msg != NULL)
??????????????? {
??????????????????? /* Remove any \n or \r */
??????????????????? tmp_str = event_descriptive_msg;???
??????????????????? while((tmp_str = strchr(tmp_str, '\n')))
??????????????????? {
??????????????????????? *tmp_str = ' ';
??????????????????????? tmp_str++;
??????

?????
??????????????????? }???

??????????????????? tmp_str = event_descriptive_msg;???
??????????????????? while((tmp_str = strchr(tmp_str, '\r')))
??????????????????? {
??????????????????????? *tmp_str = ' ';
??????????????????????? tmp_str++;
??????//strchr(tmp_str, '\n');

??????????????????? }???
??????????????? }
??????????? }
??????????? else
??????????? {
??????????????? strncpy(el_string, "(no message)", 1020);?
??????????? }


??????????? /* 得到username */
??????????? if (el->er->UserSidLength)
??????????? {
??????????????? SID_NAME_USE account_type;
??????????????? if(!LookupAccountSid(NULL, (SID *)((LPSTR)el->er + el->er->UserSidOffset),
??????????????????????????? event_el_user, &user_size, event_el_domain, &domain_size, &account_type))??
??????????????? {
??????????????????? strncpy(event_el_user, "(no user)", 255);
??????????????????? strncpy(event_el_domain, "no domain", 255);
??????????????? }

??????????? }

??????????? else
??????????? {
??????????????? strncpy(event_el_user, "A", 255);?
??????????????? strncpy(event_el_domain, "N", 255);?
??????????? }

??????????? if(printit)
??????????? {
??????????????? tm?? *event_time?? =?? localtime((const?? long?? *)&el->er->TimeWritten);

??????????????? _snprintf(final_out_msg, 1022,
??????????????????????? "事件記錄序號(hào):%d\n事件:%s\n日期:%.4hd-%.2hd-%.2hd\n時(shí)間: %.2hd:%.2hd:%.2hd\n事件類型:%s\n事件來(lái)源:%s\n事件ID:(%u)\n用戶:%s/%s\n計(jì)算機(jī):%s\n描述:\n%s\n\n\n",
??????event_record,
??????el->event_name,
??????event_time->tm_year?? +?? 1900,
??????event_time->tm_mon?? +?? 1,
??????event_time->tm_mday,
??????event_time->tm_hour,
??????event_time->tm_min,
??????event_time->tm_sec,?
??????????????????????? event_category,
??????event_sourcename,
???????????????????????
??????????????????????? (WORD)el->er->EventID,
??????????????????????? event_el_domain,
??????????????????????? event_el_user,
???????????????????????
??????event_computername,
??????????????????????? event_descriptive_msg != NULL?event_descriptive_msg:el_string);?
??????????????
??????? ?fprintf(fp, "%s\n", final_out_msg);?
??????????? }

??????????? if(event_descriptive_msg != NULL)
??????????????? LocalFree(event_descriptive_msg);

??????????? /* Changing the point to the er */
??????????? read -= el->er->Length;
??????????? el->er = (EVENTLOGRECORD *)((LPBYTE) el->er + el->er->Length);
???event_record++;
??????? }??

??????? /* Setting er to the beginning of the buffer */?
??????? el->er = (EVENTLOGRECORD *)&mbuffer;
??
??? }
}


/** void win_startel()
?* Starts the event logging for windows
?*/
void win_startel(char *eventlog)
{
??? event_record=1;
?startEL(eventlog, &el[el_last]);
??? Read_event(&el[el_last],1);
??? el_last++;
}
////////////////////////////////////////////////////////
////main////////////////////////////////////////////////
////////////////////////////////////////////////////////
int main()
{
?? fp = fopen("C:\\Documents and Settings\\Administrator\\桌面\\Read_log.txt","w");
?? if(!fp)
?{
??printf("Unable to open file\n");
??exit(1);
?}
?? else
?? {
??printf("open file\n");?
?? }


?fprintf(fp, "\n\n***********安全日志***********\n\n\n");?
?win_startel("Security");
?printf("安全日志打開\n");

?fprintf(fp, "\n\n***********應(yīng)用日志***********\n\n\n");?
?win_startel("Application");
?printf("應(yīng)用日志打開\n");


?fprintf(fp, "\n\n***********系統(tǒng)日志***********\n\n\n");?
?win_startel("System");
?printf("系統(tǒng)日志打開\n");

?

?

?fclose(fp);
?if(fclose(fp))
?{
??printf("關(guān)閉了\n");
?}
?else
?{
??printf("還開著呢了,,抓緊關(guān)它吧\n");
?}
?return(0);
}

posted @ 2006-08-28 14:18 啤酒 閱讀(2607) | 評(píng)論 (7)編輯 收藏

API函數(shù)庫(kù)

     摘要: 第一章 文件相關(guān)的API函數(shù) Api函數(shù)名 函數(shù)說(shuō)明 適用范圍W16 W95 WNTmmioWrite 寫文件 否 是 是WriteFile 寫文件 否 是 是ExtractAssociatedIcon 從文件或相關(guān)EXE中獲取圖標(biāo)句柄 否 是 是ExtractIcon 從可執(zhí)行文件中返回圖標(biāo)句柄 否 是 是LZRead 從壓縮文件中讀入數(shù)據(jù) 是 是 是GetPrivateProfileStr...  閱讀全文

posted @ 2006-08-22 11:57 啤酒 閱讀(1931) | 評(píng)論 (1)編輯 收藏

小節(jié)

如何實(shí)現(xiàn)繁簡(jiǎn)體互換?

// j2f.cpp : 簡(jiǎn)體(gb)==>繁體==>big5的過(guò)程
// 反向轉(zhuǎn)換是類似的.
// 注意直接從簡(jiǎn)體-->big5不能做到一一對(duì)應(yīng).會(huì)有很多?出現(xiàn),
// 故此需要先轉(zhuǎn)成繁體.再轉(zhuǎn)成big5.
// 我感覺(jué)這種方法應(yīng)當(dāng)和winnt或office里提供的繁簡(jiǎn)或字符集互轉(zhuǎn)是一致的.

#include "stdafx.h"
#include
#include
#include
#include
#include
using namespace std;

void j2f(const string &s)
{
 int n=s.length ();
 int r=LCMapString(
   MAKELCID(MAKELANGID(LANG_CHINESE,SUBLANG_CHINESE_SIMPLIFIED),SORT_CHINESE_PRC),
   LCMAP_TRADITIONAL_CHINESE,
   s.c_str (),s.length (),NULL,0);
 if (!r) cout <<"error :"<
 char *ft=new char[r+1];
 r=LCMapString(
   MAKELCID(MAKELANGID(LANG_CHINESE,SUBLANG_CHINESE_SIMPLIFIED),SORT_CHINESE_PRC),
   LCMAP_TRADITIONAL_CHINESE,
   s.c_str (),s.length (),ft,r+1);//這個(gè)api搞掂簡(jiǎn)體轉(zhuǎn)繁體,下面會(huì)打印繁體出來(lái)
 if (r) {
  ft[r]=0;
  cout<
  wchar_t *pws=new wchar_t[r+1];
  int r1=MultiByteToWideChar(936,0,ft,r,pws,r+1);
 BOOL f=FALSE;
 r1=WideCharToMultiByte(950,0,pws,r1,ft,r+1,"?",&f);//代碼頁(yè)切換搞掂gb->big5
 ft[r1]=0;
 cout<<<"(";
  for (int i=0;i    cout<<"";
   printf("0x%02x ",(BYTE)ft[i]);
  }
 cout<<")"<
 delete [] pws;
 }

 delete []ft;
}

//從標(biāo)準(zhǔn)輸入簡(jiǎn)體國(guó)標(biāo)-->big5繁體標(biāo)準(zhǔn)輸出,輸入兩個(gè)空行退出
int main(int argc, char* argv[])
{

 for(;;){
  char line[1024];
  cin.getline (line,sizeof(line));
 string s(line);
 if (!cin ||s.length ()==0) break;
 j2f(s);
}
_getch();
return 0;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1.首先請(qǐng)參閱其他技術(shù)專欄中用VB6.0訪問(wèn)注冊(cè)表,創(chuàng)建
HKEY_LOCAL_MACHINE,\SYSTEM\CurrentControlSet\Services\Eventlog\Eventlog2\Eventlog2鍵,并且寫入EventMessageFile,value為C:\WINNT\Microsoft.NET\Framework\v1.1.4322\EventLogMessages.dll

2.在C#.net使用以下代碼寫日志
//輸出日志的CLASS
using System;
using System.Diagnostics;
using System.Text;

namespace CorePlus.Framework.Utility
{
?/// <summary>
?/// 寫日志的CLASS
?/// </summary>
?public class LogUtility
?{
? public enum EVENT
? {
?? /// <summary>重大錯(cuò)誤</summary>
?? EVENT_ERROR,
?? /// <summary>操作失敗</summary>
?? EVENT_FAILUREAUDIT,
?? /// <summary>一般信息</summary>
?? EVENT_INFORMATION,
?? /// <summary>有效的,成功的操作</summary>
?? EVENT_SUCCESSAUDIT,
?? /// <summary>警告</summary>
?? EVENT_WARNING,
? }

? private static TextWriterTraceListener listner = null;

? /// <summary>
? /// 構(gòu)造函數(shù)
? /// </summary>
? public LogUtility () {}

? /// <param name="loginID">登錄ID</param>
? /// <param name="screenID">畫面ID</param>
? /// <param name="level">警告級(jí)別</param>
? /// <param name="message">日志信息</param>
? public static void Logging (
?? string loginID,
?? string screenID,
?? EVENT level,
?? string message )
? {
?? // 變量定義
?? StringBuilder? outputMessage = null; // 輸出的信息
?? string??? targetLevelString = null;
?? EventLogEntryType Eventtype = new EventLogEntryType();

?? switch (level)
?? {
??? case EVENT.EVENT_ERROR:
???? Eventtype = EventLogEntryType.Error;
???? break;

??? case EVENT.EVENT_FAILUREAUDIT:
???? Eventtype = EventLogEntryType.FailureAudit;
???? break;

??? case EVENT.EVENT_INFORMATION:
???? Eventtype = EventLogEntryType.Information;
???? break;

??? case EVENT.EVENT_SUCCESSAUDIT:
???? Eventtype = EventLogEntryType.SuccessAudit;
???? break;

??? case EVENT.EVENT_WARNING:
???? Eventtype = EventLogEntryType.Warning;
???? break;
?? }

?? // 日志信息的拼合
?? outputMessage = MakeMessage( loginID, screenID, targetLevelString, message );

?? // 寫日志
?? Logging( Eventtype, outputMessage.ToString() );
? }

? /// <summary>
? /// 向日志管理器寫日志
? /// </summary>
? /// <param name="level">錯(cuò)誤級(jí)別</param>
? /// <param name="message">輸出的信息</param>
? private static void Logging ( EventLogEntryType level, string message )
? {
?? // 變量定義
?? string? logName? = null; // 日志名
?? string? machineName = null; // 機(jī)器名
?? string? sourceName = null; // SourceName
?? EventLog eventLog = null; // EventLog

?? logName? = "Eventlog2";? // 日志名
?? machineName = "."; // 機(jī)器名
?? sourceName = "Eventlog2"; // SourceName

?? eventLog = new EventLog( logName, machineName, sourceName );
?? eventLog.WriteEntry( message,level );
?? eventLog = null;
? }

? /// <summary>
? /// 日志最終拼合
? /// </summary>
? /// <param name="loginID">登錄ID</param>
? /// <param name="screenID">畫面ID</param>
? /// <param name="levelString">錯(cuò)誤級(jí)別</param>
? /// <param name="message">日志信息</param>
? /// <returns>輸出的日志信息</returns>
? private static StringBuilder MakeMessage (
?? string loginID,
?? string screenID,
?? string levelString,
?? string message )
? {
?? // 變量定義
?? StringBuilder retMessage = new StringBuilder();

?? retMessage.Append( "【登錄ID】" );
?? retMessage.Append( loginID );
?? retMessage.Append( "\n【畫面ID】" );
?? retMessage.Append( screenID );
?? retMessage.Append( "\n【錯(cuò)誤級(jí)別】" );
?? retMessage.Append( levelString );
?? retMessage.Append( "\n【錯(cuò)誤信息】\n" );
?? retMessage.Append( message );

?? return retMessage;
??? }
? }
}

// 在FORM中輸出日志
? private void button1_Click(object sender, System.EventArgs e)
? {
?? LogUtility.Logging( "bbbbbb","22222222",LogUtility.EVENT.EVENT_ERROR,"3333333" );
? }

運(yùn)行完程序后打開日志管理器看看~~~~~~~~~怎么樣?不錯(cuò)吧,呵呵.

?

?

?


////////////////////////////////////////////////////////////////////////////
1.窗口信息

  MS為我們提供了打開特定桌面和枚舉桌面窗口的函數(shù)。
  hDesk=OpenDesktop(lpszDesktop,0,FALSE,DESKTOP_ENUMERATE);
  //打開我們默認(rèn)的Default桌面;
  EnumDesktopWindows(hDesk,(WNDENUMPROC)EnumWindowProc,0);
  //枚舉打開桌面上的所有窗口,由回調(diào)函數(shù)實(shí)現(xiàn)。
  BOOL __stdcall EnumWindowProc(HWND, LPARAM);
  //在回調(diào)函數(shù)中,我們可以獲得窗口的標(biāo)題和相關(guān)進(jìn)程,線程信息;
  GetWindowText(hWnd,szWindowText,dwMaxCount);
  GetWindowThreadProcessId(hWnd,&dwPID);

  2.設(shè)備驅(qū)動(dòng)器信息(服務(wù)和設(shè)備驅(qū)動(dòng)器差不多,在此不做重復(fù))

  設(shè)備驅(qū)動(dòng)信息有服務(wù)控制管理器(SCM)來(lái)管理的,我要打開服務(wù)控制管理器,并枚舉所有的設(shè)備驅(qū)動(dòng)器。
  OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS);
  //以所有權(quán)限打開服務(wù)控制管理器;
  EnumServicesStatus(schManager,dwDeviceType,dwDeviceState,
        EnumStatus,dwBufSize,&dwBytesNeeded,
       &dwDevicesReturned,&dwResumeHandle))
  //枚舉所有設(shè)備的當(dāng)前狀態(tài);
  CloseServiceHandle(schManager);
  //記住,在結(jié)束訪問(wèn)后要關(guān)閉服務(wù)句柄;
  OpenService(schManager,szDeviceName,SERVICE_ALL_ACCESS);
  //打開特定的設(shè)備驅(qū)動(dòng)器;
  QueryServiceConfig(schDevice,lpDeviceConfig,
          ?? 1024*8,&dwBytesNeeded);
  //查詢驅(qū)動(dòng)器的服務(wù)配置信息;
  QueryServiceStatus(schDevice,&DeviceStatus);
  //查詢?cè)O(shè)備驅(qū)動(dòng)器的當(dāng)前狀態(tài);
  QueryServiceConfig2(schDevice,SERVICE_CONFIG_DESCRIPTION,
  (LPBYTE)lpDeviceDescription,8*1024,&dwBytesNeeded)
  //查詢?cè)O(shè)備的描述信息;
  StartService(schDevice,0,NULL);
  //啟動(dòng)設(shè)備;
  ControlService(schDevice,SERVICE_CONTROL_STOP,&DeviceStatus);
  //停止設(shè)備;
  DeleteService(schDevice);
  //刪除設(shè)備;

  3.磁盤信息

  我們希望獲得系統(tǒng)所有磁盤的信息,包括軟盤,硬盤,光盤等等;
  GetLogicalDriveStrings(dwBufferLength,lpBuffer);
  //獲得邏輯設(shè)備的信息;
  GetVolumeInformation(lpRootPathName,lpVolumeNameBuffer,
   dwVolumeNameSize,&dwVolumeSerialNumber,
   &dwMaximumComponentLength,&dwFileSystemFlags,
      lpFileSystemNameBuffer,dwFileSystemNameSize);
  //獲得磁盤卷信息,包括卷名稱和格式類型;
  GetDiskFreeSpaceEx(lpRootPathName,&FreeBytesAvailable,
        ? &TotalNumberOfBytes,&TotalNumberOfFreeBytes);
  //探測(cè)磁盤的空間使用情況;

  4.環(huán)境變量

  我們可以從注冊(cè)表中獲得環(huán)境塊的信息:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment,當(dāng)然要使用注冊(cè)表的函數(shù)。
  RegOpenKeyEx(HKEY_LOCAL_MACHINE,RegKey,0,KEY_QUERY_VALUE,&hKey);
  //打開注冊(cè)表的鍵;
  RegEnumValue(hKey,dwIndex,EnvironVariable,
         &dwVariableLength,NULL,NULL,NULL,NULL);
  //查詢我們需要的信息值;
  GetEnvironmentVariable(EnvironVariable,EnvironString,1024);
  //獲得環(huán)境變量的字符串信息;

?

?

5.事件記錄信息

  OpenEventLog(NULL,szLog);
  //打開時(shí)間日志記錄;
  GetOldestEventLogRecord(hEvent,&dwThisRecord);
  //獲得最新的日志信息,以便繼續(xù)查找;
  ReadEventLog(hEvent,EVENTLOG_FORWARDS_READ │ EVENTLOG_SEQUENTIAL_READ,
?? 0,pEventLogRecord,1024*32,&dwRead,&dwNeeded)
  //讀去日志信息;
  LookupAccountSid(NULL,pSid,szName,&dwName,szDomain,&dwDomain,&SNU);
  //獲取賬戶的SID,以便獲得賬戶的用戶名稱;
  GetNumberOfEventLogRecords(hEvent,&dwTotal);
  //獲得事件日志的總數(shù);
  CloseEventLog(hEvent);
  //不要忘記關(guān)閉事件句柄;
  
  6.網(wǎng)絡(luò)共享

  我們使用第二等級(jí)的網(wǎng)絡(luò)共享搜索;
  NetShareEnum(NULL,dwLevel,(PBYTE *)&pBuf,MAX_PREFERRED_LENGTH,&entriesread,&totalentries,&resume);
  //列舉所有的共享目錄及相關(guān)信息;
  NetApiBufferFree(pBuf);
  //釋放緩沖區(qū);
  NetShareDel(NULL,(char *)lpShareNameW,0);
  //刪除網(wǎng)絡(luò)共享目錄;
  
  7.網(wǎng)絡(luò)適配器信息

  我們要探測(cè)NIC的信息和網(wǎng)絡(luò)流量;
  GetAdaptersInfo(&AdapterInfo,&OutBufLen);
  //獲取適配器信息;
  
  8.系統(tǒng)性能

  獲取系統(tǒng)的存儲(chǔ)器使用情況;
  GetPerformanceInfo(&PerfInfo,sizeof(PERFORMACE_INFORMATION))
  //獲取系統(tǒng)性能信息;

  9.進(jìn)程/線程/模塊信息

  在此我們使用工具幫助函數(shù)(ToolHelp32)和系統(tǒng)
  OpenProcessToken(GetCurrentProcess(),TOKEN_QUERY │ TOKEN_ADJUST_PRIVILEGES,&hToken);
  //打開進(jìn)程的令牌,提升權(quán)限;
  AdjustTokenPrivileges(hToken,FALSE,&TokenPrivileges,sizeof(TOKEN_PRIVILEGES),NULL,NULL);
  //將進(jìn)程的權(quán)限提升到支持調(diào)試(Debug);
  CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
  //創(chuàng)建進(jìn)程的快照;
  Process32First(hProcessSnap,&ProcessEntry32);
  Process32First(hProcessSnap,&ProcessEntry32);
  //枚舉所有進(jìn)程;
  OpenProcess(PROCESS_QUERY_INFORMATION,FALSE,ProcessEntry32.th32ProcessID);
  //打開特定進(jìn)程,以查詢進(jìn)程相關(guān)信息;
  GetProcessTimes(hProcess,&CreateTime,&ExitTime,&KernelTime,&UserTime);
  //獲取進(jìn)程的時(shí)間信息;
  GetProcessMemoryInfo(hProcess,&PMCounter,sizeof(PMCounter));
  //獲取進(jìn)程的存儲(chǔ)區(qū)信息;
  GetPriorityClass(hProcess);
  //獲取進(jìn)程的優(yōu)先權(quán);
  GetProcessIoCounters(hProcess,&IoCounters);
  //獲取進(jìn)程的IO使用情況;
  CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessID);
  //創(chuàng)建模塊快照;
  Module32First(hModuleSnap, &ModuleEntry32);
  Module32Next(hModuleSnap, &ModuleEntry32);
  //枚舉進(jìn)程模塊信息;
  CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
  //創(chuàng)建線程快照;
  Thread32First(hThreadSnap, &ThreadEntry32);
  Thread32Next(hThreadSnap, &ThreadEntry32);
  //枚舉線程信息;
  OpenThread(THREAD_ALL_ACCESS,FALSE,ThreadEntry32.th32ThreadID);
  //打開線程,須自己獲得此函數(shù)地址;
  TerminateProcess(hProcess,0);
  //終止進(jìn)程;
  SuspendThread(hThread);
  //懸掛線程;
  ResumeThread(hThread);
  //激活線程;

?

?

10.關(guān)機(jī)

  AdjustTokenPrivileges(hToken,FALSE,&TokenPrivileges,sizeof(TOKEN_PRIVILEGES),NULL,NULL);
  //調(diào)整進(jìn)程令牌,使其支持關(guān)機(jī);
  ExitWindowsEx(EWX_LOGOFF,0);
  //注銷系統(tǒng);
  LockWorkStation();
  //鎖定系統(tǒng);
  InitiateSystemShutdown(NULL,szMessage,dwTimeout,FALSE,bSig);
  //支持到記時(shí)和消息顯示的關(guān)機(jī)/重啟;
  SetSystemPowerState(bSig,FALSE);
  //系統(tǒng)休眠/冬眠;

  11.用戶信息

  NetUserEnum(NULL,dwLevel,FILTER_NORMAL_ACCOUNT,(LPBYTE*)&pBuf,       dwPrefMaxLen,&dwEntriesRead,&dwTotalEntries,&dwResumeHandle);
  //枚舉系統(tǒng)用戶信息;
  NetUserDel(NULL,lpUserNameW);
  //刪除指定用戶;
?
  12.系統(tǒng)版本信息

  GetVersionEx((LPOSVERSIONINFO)&osviex);
  //獲取操作系統(tǒng)的版本信息;
  我們也可以通過(guò)注冊(cè)表(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion)獲取相關(guān)信息:
  GetTickCount();
  //獲取開機(jī)時(shí)間;
  GetComputerName(szInfo,&dwInfo);
  //獲取計(jì)算機(jī)名稱;
  GetUserName(szInfo,&dwInfo);
  //獲取計(jì)算機(jī)用戶名;
  GetWindowsDirectory(szInfo,MAX_PATH+1);
  //獲取Windows目錄;
  GetSystemDirectory(szInfo,MAX_PATH+1);
  //獲取系統(tǒng)目錄;

/////////////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
事件記錄信息
  OpenEventLog(NULL,szLog);
  //打開時(shí)間日志記錄;
  GetOldestEventLogRecord(hEvent,&dwThisRecord);
  //獲得最新的日志信息,以便繼續(xù)查找;
  ReadEventLog(hEvent,EVENTLOG_FORWARDS_READ │ EVENTLOG_SEQUENTIAL_READ,
?? 0,pEventLogRecord,1024*32,&dwRead,&dwNeeded)
  //讀去日志信息;
  LookupAccountSid(NULL,pSid,szName,&dwName,szDomain,&dwDomain,&SNU);
  //獲取賬戶的SID,以便獲得賬戶的用戶名稱;
  GetNumberOfEventLogRecords(hEvent,&dwTotal);
  //獲得事件日志的總數(shù);
  CloseEventLog(hEvent);
  //不要忘記關(guān)閉事件句柄;

posted @ 2006-08-22 10:56 啤酒 閱讀(812) | 評(píng)論 (0)編輯 收藏

技術(shù)網(wǎng)站

?

A:http://www.csdn.net? ? ? ? ? ? ? ? ? ?http://www.codeguru.com

http://www.vccode.com? ? ? ? ? ? ? ? ?http://www.codeproject.com

http://www.vckbase.com? ? ? ? ? ? ? ? http://www.vchelp.net

http://www.bc-cn.net/bbs/Article/55_71.html

http://www.leftworld.net/online/index.html? 左岸貴族
http://www.acfile.com/??? 進(jìn)程管理知識(shí)庫(kù)
http://topic.csdn.net?? CSDN知識(shí)庫(kù)
http://www.popbook.com/Wbbs/topic.asp?l_id=5&t_id=2252?? API函數(shù)庫(kù)
http://bczs.net/
http://www.bczs.net/xml/2006/3/30/4650310.xml
http://www.vckbase.com/code/listcode.asp?mclsid=3&sclsid=323
http://dev.csdn.net/author/starlee/8522073c8f034264a026dd78dbfa2feb.html???????? 自動(dòng)改變控件類

posted @ 2006-08-17 15:26 啤酒 閱讀(171) | 評(píng)論 (0)編輯 收藏

我收藏的網(wǎng)站

實(shí)戰(zhàn)銷售演練 湯姆.霍普金斯 6張VCD下載http://www.success-life.org
如何達(dá)至事業(yè)頂峰 湯姆·霍普金斯 12張CD下載
http://www.success-life.org
掌紋醫(yī)學(xué)入門 王晨霞 1張VCD下載
http://www.success-life.org
人際關(guān)系與溝通藝術(shù) 王琳 2張CD下載
http://www.success-life.org
超腦力記憶訓(xùn)練 倪新威 6張VCD下載
http://www.success-life.org
北京超級(jí)富豪演講會(huì) 王宗立 3張VCD下載
http://www.success-life.org
自我推銷與個(gè)人公關(guān) 王琳 1張VCD下載
http://www.success-life.org
手診講座 王守志 5張VCD下載
http://www.success-life.org
成功的項(xiàng)目管理 蔚林巍 13張VCD免費(fèi)bt下載
http://www.success-life.org
現(xiàn)代企業(yè)戰(zhàn)略管理實(shí)務(wù)與案例分析 吳維庫(kù) 10張VCD壓縮成3張RM格式光盤下載
http://www.success-life.org
超越自我 壽險(xiǎn)銷售實(shí)戰(zhàn)經(jīng)驗(yàn)分享 吳學(xué)文 4張VCD
反敗為勝--銷售改變一生 夏目志郎 1張RM格式光盤下載
http://www.success-life.org
產(chǎn)品太多,以上無(wú)法一一列出,詳細(xì)清單請(qǐng)?jiān)L問(wèn)成功人生網(wǎng)
http://www.success-life.org/all.html 或 成功網(wǎng) http://www.success01.net/all.html
績(jī)效評(píng)估與面談技巧 杜繼南 6張VCD下載http://www.success-life.org
客戶管理與帳款回收操作實(shí)務(wù) 謝旭、劉建清 15張VCD下載
http://www.success-life.org
聽陳明莉講故事 3張VCD壓縮成1張RM格式光盤下載
http://www.success-life.org
如何打造百年企業(yè)-企業(yè)高層的超級(jí)修煉 邢以群 9張VCD下載
http://www.success-life.org
生命的靈性 許宜銘 6張VCD下載
http://www.success-life.org
生命潛能--智慧之旅 許宜銘 10張CD下載
http://www.success-life.org
《海爾真相》完整版 薛旭 28張VCD下載
http://www.success-life.org
性格的力量-超越卓越的你 楊濱 2張VCD下載
http://www.success-life.org
促銷員職業(yè)化訓(xùn)練 葉建華 6張VCD下載
http://www.success-life.org
告訴你成功一定有方法 易發(fā)久 4張VCD下載
http://www.success-life.org
崗位說(shuō)明書的編寫與應(yīng)用 尹隆森 5張VCD壓縮成1張RM格式光盤下載
http://www.success-life.org
柜臺(tái)銷售技巧 柳青 6張VCD下載
http://www.success-life.org
現(xiàn)代企業(yè)規(guī)范化管理整體解決方案 尹隆森 24張VCD壓縮成5張RM格式光盤下載
http://www.success-life.org
領(lǐng)導(dǎo)商數(shù) 余世維 6張VCD下載
http://www.success-life.org
贏在執(zhí)行-余世維 6張VCD壓縮成2張RM光盤下載
如何成為一個(gè)成功的職業(yè)經(jīng)理人 余世維 6張VCD下載
http://www.success-life.org
職業(yè)經(jīng)理人常犯的11個(gè)錯(cuò)誤 余世維 6張VCD下載
http://www.success-life.org
有效管理者的八大工具 宋新宇 8張VCD下載
http://www.success-life.org
別對(duì)自己說(shuō)不可能 約翰.庫(kù)綈斯 1張VCD下載
http://www.success-life.org
餐廳服務(wù)員基礎(chǔ)培訓(xùn) 曾鳳茹等 1張VCD下載
http://www.success-life.org
非財(cái)務(wù)人員的財(cái)務(wù)管理--操作實(shí)務(wù) 曾建斌 16張VCD下載
http://www.success-life.org
中國(guó)式管理-組織行為學(xué) 曾仕強(qiáng) 15張VCD 125元
總裁領(lǐng)導(dǎo)學(xué) 曾仕強(qiáng) 12張VCD下載
http://www.success-life.org
營(yíng)銷久贏的八大方法 宋新宇 8張VCD下載
http://www.success-life.org
曾仕強(qiáng)點(diǎn)評(píng)胡雪巖成功之道 曾仕強(qiáng) 48張VCD 250元
中國(guó)式管理-人際關(guān)系學(xué) 曾仕強(qiáng) 8張VCD下載
http://www.success-life.org
超世紀(jì)大易管理 曾仕強(qiáng)教授 6張VCD下載
http://www.success-life.org
如何做一個(gè)杰出的好領(lǐng)導(dǎo) 張錦貴 10張VCD下載
http://www.success-life.org
如何處理人際關(guān)系 張錦貴 3張VCD下載
http://www.success-life.org
談判技巧 張錦貴 3張VCD下載
http://www.success-life.org
辭退員工管理與辭退面談技巧 程向陽(yáng) 4張VCD免費(fèi)bt下載
http://www.success-life.org
金牌導(dǎo)購(gòu)員(促銷員)實(shí)戰(zhàn)銷售技巧 王榮耀 12張VCD下載
http://www.success-life.org
經(jīng)營(yíng)管理系列 張錦貴 11張VCD下載
http://www.success-life.org
實(shí)戰(zhàn)銷售系列 張錦貴 13張VCD下載
http://www.success-life.org
尋找客戶的26條渠道 范云峰 8張VCD下載
http://www.success-life.org
成功人生系列 張錦貴 12張VCD下載
http://www.success-life.org
海爾的管理學(xué)習(xí)和創(chuàng)新 張瑞敏 3張VCD壓縮成1張RM格式光盤下載
http://www.success-life.org
學(xué)習(xí)型組織管理 張聲雄 11張VCD下載
http://www.success-life.org
21世紀(jì)星級(jí)酒店管理秘訣首度大揭秘 張聲雄 4張VCD下載
http://www.success-life.org
超級(jí)業(yè)務(wù)員專業(yè)銷售技巧講座 張偉 17張VCD下載
http://www.success-life.org
招聘與面試技巧 張曉彤 6張VCD壓縮成1張RM格式光盤下載
http://www.success-life.org
如何選、育、用、留人才 張曉彤 13張VCD下載
http://www.success-life.org
張孝祥Java就業(yè)培訓(xùn)教程 8張高清晰RM格式光盤下載
http://www.success-life.org
電話銷售技巧 張煊搏 5張VCD下載
http://www.success-life.org
全腦開發(fā)大師 我是天才 2張CD下載
http://www.success-life.org
章義伍-共贏領(lǐng)導(dǎo)力 章義伍 7張VCD下載http://www.success-life.org
職業(yè)經(jīng)理十項(xiàng)管理技能訓(xùn)練 章哲 12張VCD下載
http://www.success-life.org
素描起步 浙江電子音像出版社 1張VCD下載
http://www.success-life.org
項(xiàng)目計(jì)劃與進(jìn)度管理 中國(guó)科學(xué)院 5張VCD下載
http://www.success-life.org
與成功對(duì)話——商界名人訪談錄 中央電視臺(tái) 12張CD壓縮成2張mp3光盤下載
中央電視臺(tái):對(duì)話 30張VCD壓縮成3張RM格式光盤下載
http://www.success-life.org
成事在人--企業(yè)領(lǐng)導(dǎo)藝術(shù) 鐘剛 14張VCD 下載
超級(jí)推銷(鐘剛主持) 13張VCD下載
http://www.success-life.org
產(chǎn)品太多,以上無(wú)法一一列出,詳細(xì)清單請(qǐng)?jiān)L問(wèn)成功人生網(wǎng)
http://www.success-life.org/all.html 或 成功網(wǎng) http://www.success01.net/all.html
家長(zhǎng)培訓(xùn)班講課實(shí)錄 周弘 4張VCD免費(fèi)bt下載http://www.success-life.org
賞識(shí)教育你的孩子 周弘 6張VCD下載
http://www.success-life.org
新地產(chǎn)兵法 專家團(tuán) 10張VCD下載
http://www.success-life.org
面對(duì)面顧問(wèn)式銷售 周嶸 6張VCD下載http://www.success-life.org
中國(guó)服飾零售案例 祝文欣 5張VCD下載
http://www.success-life.org
現(xiàn)代美容化妝技法 毛戈平 2張VCD免費(fèi)bt下載
http://www.success-life.org
怎樣畫卡通 布里茨 6張VCD下載
http://www.success-life.org
全腦開發(fā)大師 理想的體重 2張CD下載
http://www.success-life.org
全腦開發(fā)大師 全套20輯 40張CD 600元
孫鑫VC++視頻教學(xué) 8張RM格式光盤下載
http://www.success-life.org
中國(guó)大百科全書 4張光盤下載
零起點(diǎn)學(xué)漫畫 2張光盤下載
當(dāng)代交誼舞教程 6張VCD壓縮成1張RM格式光盤免費(fèi)bt下載
http://www.success-life.org
房地產(chǎn)營(yíng)銷的定位實(shí)踐 方志華 2張VCD下載
http://www.success-life.org
制造型企業(yè)生產(chǎn)主管實(shí)踐訓(xùn)練 夏禎 8張VCD下載
http://www.success-life.org
胎教音樂(lè)精選 1張CD下載
http://www.success-life.org
物流作業(yè)系統(tǒng)演示 1張RM視頻壓縮格式光盤下載
http://www.success-life.org
放松暗示音樂(lè) 1張MP3光盤下載
決勝終端--中國(guó)服飾品牌加盟商創(chuàng)業(yè)寶典 祝文欣 6張VCD下載
http://www.success-life.org
賒銷與風(fēng)險(xiǎn)控制 劉宏程 12張VCD下載http://www.success-life.org
中移動(dòng)(香港)績(jī)效管理系統(tǒng)培訓(xùn) 4張VCD壓縮成1張RM格式光盤下載http://www.success-life.org
汽車駕駛學(xué)習(xí)技巧VCD 2張VCD壓縮成1張RM格式光盤下載
http://www.success-life.org
管理者的情商EQ 余世維 6張VCD下載
http://www.success-life.org
EMBA全套學(xué)習(xí)資料 5張VCD壓縮成2張RM格式光盤下載
http://www.success-life.org
分層授權(quán)VS分層負(fù)責(zé) 曾仕強(qiáng) 6張VCD下載
http://www.success-life.org
孫子兵法與人力自動(dòng)化 曾仕強(qiáng) 7張VCD下載
http://www.success-life.org
保健品發(fā)展趨勢(shì)與營(yíng)銷戰(zhàn)略 3張VCD下載
http://www.success-life.org
2000版ISO9000族標(biāo)準(zhǔn)理解與應(yīng)用 李為柱等 15張VCD免費(fèi)bt下載
http://www.success-life.org
中國(guó)前50名首富創(chuàng)業(yè)和致富訪談錄 25張VCD下載
http://www.success-life.org
美容師培訓(xùn)大全(高級(jí)班初級(jí)班) 24張VCD下載
http://www.success-life.org
抗遺忘快速記憶法 4張VCD下載
http://www.success-life.org
辯論技巧與實(shí)戰(zhàn) 4張VCD壓縮成1張RM格式光盤免費(fèi)bt下載
http://www.success-life.org
企業(yè)的經(jīng)營(yíng)核算與盈虧分析 3張VCD下載
http://www.success-life.org
全球500強(qiáng)CEO管理秘訣 16張VCD下載
http://www.success-life.org
胎教與兒童潛能精選 4張VCD下載
http://www.success-life.org
1993-2004年國(guó)際大專辯論會(huì)實(shí)況 6張VCD壓縮成3張RM格式光盤 免費(fèi)bt下載
http://www.success-life.org
產(chǎn)品太多,以上無(wú)法一一列出,詳細(xì)清單請(qǐng)?jiān)L問(wèn) 成功網(wǎng)
http://www.success01.net/all.html 或成功人生網(wǎng) http://www.success-life.org/all.html
免費(fèi)bt下載
http://www.success-life.org,免費(fèi)視頻下載,emule下載。
成功網(wǎng)
http://www.success01.net
成功人生網(wǎng) http://www.success-life.org

posted @ 2006-08-17 15:01 啤酒 閱讀(396) | 評(píng)論 (0)編輯 收藏

國(guó)內(nèi)完全免費(fèi)的電子圖書下載網(wǎng)址

搜書網(wǎng) http://www.chinesebook.com.cn/bjbookfair/index.asp
E書時(shí)空
http://www.eshunet.com/
我愛E書
http://www.52ebook.com/
中華電腦書庫(kù)
http://www.pcbookcn.com/
黃金社區(qū)
http://www.kpgb88.net/bbs/
書海??????
http://www.booksea.com
時(shí)代書城 http://www.mypcera.com/book/
幻劍書盟 http://www.hjsm.net/
中國(guó)e書網(wǎng) http://www.ebookcn.net/index.htm
閱讀寶庫(kù) http://www.people.com.cn/GB/wenhua/22226/29647/
我愛E書?? http://www.52ebook.com/
學(xué)習(xí)計(jì)算機(jī)全書 http://www.netyi.net/index.asp
四川省圖書館天府閱覽室(須注冊(cè)) http://lib.sc.cninfo.net/
軍事與泥巴??
http://www.warmud.com/c1.htm
中文搜書引擎??
http://www.bookicq.com/
木子書屋??
http://shuwu.com/index2.shtml
ocr書城
http://ocr.tab.net.cn/
阿拉下載??
http://www.booksea.com/
白鹿書院??
http://www.oklink.net/
三思藏書架??
http://www.oursci.org/lib.htm
圣城麥地納之聲??
http://www.makuielys.info/makuielys/index.php
游離空間??
http://www.5soho.com/xp/
學(xué)術(shù)書齋??
http://time.dufe.edu.cn/xsshuku/xshshuku1.htm
亦凡書庫(kù)??
http://www.shuku.net/
琵琶行????
http://61.180.86.70/book/
寶藏下載??
http://www.xicn.net/download/ebook/
三味書林??
http://come.6to23.com/fayu/gdwx/index.html
書路????
http://www.shulu.net/
春光書屋??
http://www.starinfo.net.cn/photography/gif/
海天書院??
http://www.0943.com.cn/wenxue/
書吧??
http://www.book8.com/
耕讀緣??
http://www.gengdu.com/
浙江大學(xué)文化素質(zhì)網(wǎng)??
http://www.culture.zju.edu.cn/new/p...t_id=1&offset=1
夜網(wǎng)下載??
http://www.yewang.org/ywxz/
佛教導(dǎo)航??
http://www.seach.org/ptwk/default.asp
禪友上載區(qū) >>
http://www.1zen.com/share/index.asp
北京自考熱線??
http://bjzhaokao.com/down/list.asp
視野下載??
http://download.esnai.com/asp/default.asp
江都電大??
http://down.jdtvu.net/
萬(wàn)福禪寺??
http://www.wanfusi.org/down/
犀鳥天地站??
http://www.hornbill.cdc.net.my/hbnews.htm
家園藏書?? http://www.21manager.com/
計(jì)算機(jī)圖書資料
http://www.vvsoft.net/vvbksd/index.asp
中國(guó)IT認(rèn)證實(shí)驗(yàn)室-學(xué)習(xí)下載
http://download.chinaitlab.com/sort/2_1.htm
網(wǎng)絡(luò)中國(guó)-E書
http://book.httpcn.com/

posted @ 2006-08-17 14:58 啤酒 閱讀(384) | 評(píng)論 (0)編輯 收藏

僅列出標(biāo)題
共2頁(yè): 1 2 

導(dǎo)航

統(tǒng)計(jì)

常用鏈接

留言簿(2)

隨筆檔案

收藏夾

搜索

最新評(píng)論

閱讀排行榜

評(píng)論排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美激情一区二区三区| 久久在线视频在线| 欧美日韩美女在线观看| 在线观看日韩www视频免费 | 美女精品在线| 亚洲女同同性videoxma| 欧美日韩中文字幕| 亚洲免费精彩视频| 欧美大片va欧美在线播放| 欧美一级电影久久| 国产精品视频免费在线观看| 在线亚洲成人| 亚洲精品日韩一| 欧美成人免费全部| 亚洲国产91精品在线观看| 久久久久一区二区三区| 亚洲欧美日本精品| 国产精品九九久久久久久久| 中文国产成人精品| 亚洲精品在线电影| 欧美激情精品久久久久久免费印度| 影院欧美亚洲| 美女黄色成人网| 久久精品国产一区二区三区| 国产亚洲在线观看| 久久精品国产视频| 亚洲欧美综合精品久久成人| 国产精品五区| 欧美一区二区三区在线免费观看 | 美女精品一区| 久久精品女人的天堂av| 黄色成人精品网站| 久久美女性网| 久久免费午夜影院| 亚洲第一在线视频| 欧美电影专区| 欧美国产三级| 99天天综合性| 日韩午夜av电影| 欧美日韩一区二区在线观看| 亚洲图片你懂的| 中文av字幕一区| 国产精品自在线| 久久国产精品久久w女人spa| 久久av资源网站| 在线观看视频日韩| 亚洲第一级黄色片| 欧美1区视频| 一本色道久久综合亚洲91| 日韩视频一区| 国产精品免费看| 久久久久www| 久久免费精品视频| 亚洲精品日韩综合观看成人91| 91久久夜色精品国产网站| 欧美日韩久久精品| 新67194成人永久网站| 性欧美xxxx视频在线观看| 狠狠色狠狠色综合| 欧美激情一区二区| 欧美日韩日日骚| 欧美在线视频a| 久久免费国产精品| 一本到高清视频免费精品| 亚洲私人影院| 激情视频一区二区| 亚洲国产日韩欧美一区二区三区| 欧美日韩中国免费专区在线看| 欧美在线播放| 理论片一区二区在线| 一本久久综合| 香蕉av福利精品导航| 亚洲国产精品福利| 一区二区av在线| 国内成+人亚洲| 亚洲欧洲一区| 国产日韩精品在线观看| 欧美成人精品1314www| 欧美网站大全在线观看| 久久亚洲春色中文字幕| 欧美精品少妇一区二区三区| 欧美一区久久| 欧美福利一区| 欧美一区网站| 欧美成人第一页| 欧美一区二区三区播放老司机| 久久综合伊人77777蜜臀| 亚洲一二三四区| 久久久久久久久久看片| 亚洲一卡久久| 久久久青草青青国产亚洲免观| 中文国产一区| 久久人人爽人人爽爽久久| 亚洲调教视频在线观看| 久久视频这里只有精品| 亚洲综合国产| 免费视频一区| 久久精品视频在线| 欧美精品麻豆| 久久综合色一综合色88| 欧美私人网站| 欧美aⅴ一区二区三区视频| 欧美视频中文字幕| 免费欧美网站| 国产欧美一区二区三区在线老狼| 亚洲人午夜精品| 激情亚洲网站| 亚洲一区激情| 日韩午夜av在线| 久久精品五月婷婷| 午夜伦欧美伦电影理论片| 免费一级欧美在线大片| 久久久精品一区| 欧美视频一区二区| 亚洲电影av| 狠狠入ady亚洲精品经典电影| 国产精品99久久99久久久二8| 亚洲三级免费观看| 久久久成人精品| 久久国产精品久久久久久久久久 | 亚洲第一黄色网| 国产在线不卡视频| 亚洲神马久久| 一区二区三区日韩欧美| 美女视频黄a大片欧美| 久久久久久久久久久一区| 国产精品乱人伦中文| 亚洲精品国产精品国自产观看浪潮| 永久免费视频成人| 性久久久久久久| 午夜久久影院| 国产精品久久久久久久久动漫| 亚洲日本激情| 亚洲精品久久嫩草网站秘色 | 欧美一级视频| 香蕉av777xxx色综合一区| 欧美色123| 亚洲三级观看| 99国产成+人+综合+亚洲欧美| 久久综合伊人77777| 免费成人av资源网| 狠狠综合久久av一区二区小说 | 亚洲天堂成人在线观看| 欧美精品www| 亚洲精品1区2区| 亚洲精品欧洲精品| 女人天堂亚洲aⅴ在线观看| 免费看的黄色欧美网站| 伊人久久噜噜噜躁狠狠躁| 久久精品免费看| 麻豆国产va免费精品高清在线| 国产综合精品| 欧美专区一区二区三区| 久久久在线视频| 激情亚洲一区二区三区四区| 久久精品免费电影| 欧美ed2k| 亚洲欧洲综合另类| 欧美精品成人一区二区在线观看 | 一区二区三区偷拍| 欧美日韩精品不卡| 99ri日韩精品视频| 亚洲综合成人婷婷小说| 国产精品久久久免费| 亚洲在线中文字幕| 久久精品人人做人人爽电影蜜月| 国内精品久久久久久久影视麻豆| 久久av一区二区三区| 欧美www视频在线观看| 亚洲精品欧美极品| 欧美日韩亚洲激情| 亚洲视频一区在线| 久久精品99国产精品酒店日本| 国内成人在线| 美女视频黄免费的久久| 亚洲三级影片| 性亚洲最疯狂xxxx高清| 国内成+人亚洲+欧美+综合在线| 久久婷婷国产综合精品青草| 亚洲国产女人aaa毛片在线| 一本久久a久久免费精品不卡 | 噜噜噜噜噜久久久久久91 | 国内精品久久久久国产盗摄免费观看完整版 | 亚洲欧美激情视频| 久久亚洲国产成人| 亚洲精品在线观看视频| 欧美三级中文字幕在线观看| 香蕉久久夜色精品国产使用方法| 久久综合一区二区| 亚洲美女中出| 国产精品亚洲综合色区韩国| 久久久精品国产一区二区三区| 亚洲大片免费看| 亚洲欧美另类在线观看| 好看的日韩视频| 欧美激情精品久久久久久变态| 亚洲一区免费网站| 欧美成人午夜视频| 亚洲影院免费观看| 在线观看91精品国产麻豆|