程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> 目錄監控

目錄監控

編輯:C++入門知識

界面如下:

關鍵代碼如下:

     BOOL bRet =     BYTE Buffer[] = { 
     CDirectoryWatchDlg *pDlg = (CDirectoryWatchDlg *     FILE_NOTIFY_INFORMATION *pBuffer = (FILE_NOTIFY_INFORMATION*     DWORD dwBytesReturned  =      HANDLE hFile = CreateFile(pDlg->m_strDirectoryPath.GetBuffer(         | FILE_SHARE_DELETE |     (INVALID_HANDLE_VALUE ==          DWORD dwErr =          strErr.Format(_T(             
      (pDlg->GetDlgItem(IDC_BUTTON_START) !=          pDlg->GetDlgItem(IDC_BUTTON_START)->       (pDlg->GetDlgItem(IDC_BUTTON_STOP) !=          pDlg->GetDlgItem(IDC_BUTTON_STOP)->  
    
               ZeroMemory(Buffer,          bRet = ReadDirectoryChangesW(hFile, &Buffer, (Buffer), TRUE, FILE_NOTIFY_CHANGE_FILE_NAME |
             FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_LAST_WRITE, &          (bRet ==               (pBuffer->                               strType = _T(                 strInfo = _T(                 strInfo += pBuffer->                                               strType = _T(                 strInfo = _T(                 strInfo += pBuffer->                                               strType = _T(                 strInfo = _T(                 strInfo += pBuffer->                                               strType = _T(                 strInfo = _T(                 strInfo += pBuffer->                  (pBuffer->NextEntryOffset !=                       FILE_NOTIFY_INFORMATION *TempBuffer = (FILE_NOTIFY_INFORMATION*)((DWORD)pBuffer + pBuffer->                      (TempBuffer->                                               strInfo += _T(                         strInfo += TempBuffer->                                                                          strType = _T(                 strInfo = _T(                 strInfo += pBuffer->                   
              (pDlg !=                  strIndex.Format(_T(), pDlg->                 pDlg->m_ctrlDirectoryWatchLog.InsertItem(pDlg->                 pDlg->m_ctrlDirectoryWatchLog.SetItemText(pDlg->nIndex,                  pDlg->m_ctrlDirectoryWatchLog.SetItemText(pDlg->nIndex++,     
       ;

下載地址:http://pan.baidu.com/s/1dDBrWM9

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved