{"id":1765,"date":"2018-10-30T20:29:21","date_gmt":"2018-10-30T12:29:21","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=1765"},"modified":"2018-10-30T20:29:21","modified_gmt":"2018-10-30T12:29:21","slug":"mfc%e8%8e%b7%e5%8f%96%e6%95%b4%e4%b8%aa%e6%96%87%e4%bb%b6%e5%a4%b9%e7%9a%84%e5%a4%a7%e5%b0%8f","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/1765","title":{"rendered":"MFC\u83b7\u53d6\u6574\u4e2a\u6587\u4ef6\u5939\u7684\u5927\u5c0f"},"content":{"rendered":"

MFC\u83b7\u53d6\u6574\u4e2a\u6587\u4ef6\u5939\u7684\u5927\u5c0f<\/p>\n

\/\/\u83b7\u53d6\u6574\u4e2a\u6587\u4ef6\u5939\u7684\u5927\u5c0f\r\ndouble CEvent::GetDirSize(CString strFullPath)\r\n{\r\n     double dwDirSize,dwSubDirSize;  \r\n     CFileFind finder;  \r\n      \r\n     dwDirSize=dwSubDirSize=0; \r\n     strFullPath+=_T(\"\\\\*.*\"); \r\n     if(finder.FindFile(strFullPath)) \r\n     {\r\n         while(1)  \r\n         {  \r\n              BOOL   bFound;  \r\n              bFound=finder.FindNextFile();  \r\n              if (finder.IsDirectory())  \r\n              {  \r\n                   if (!finder.IsDots())  \r\n                   {  \r\n                       dwSubDirSize=GetDirSize(finder.GetFilePath());\r\n                       dwDirSize+=dwSubDirSize;  \r\n                   }  \r\n              }  \r\n              else  \r\n              {  \r\n                   CFile file;  \r\n                   if   (file.Open(finder.GetFilePath(),CFile::modeRead))  \r\n                   {  \r\n                       dwDirSize+=file.GetLength();  \r\n                       file.Close();  \r\n                   }  \r\n              }  \r\n              if(bFound==FALSE)  \r\n                   break;  \r\n         }  \r\n     }\r\n     finder.Close(); \r\n     return dwDirSize;  \r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"

MFC\u83b7\u53d6\u6574\u4e2a\u6587\u4ef6\u5939\u7684\u5927\u5c0f \/\/\u83b7\u53d6\u6574\u4e2a\u6587\u4ef6\u5939\u7684\u5927\u5c0f double CEvent::GetDirSize(CString strFullPath) { double dwDirSize,dwSubDirSize; CFileFind finder; dwDirSize=dwSubDirSize=0; strFullPath+=_T(“\\\\*.*”); if(finder.FindFile(strFullPath)) { while(1) { BOOL bFound; bFound=finder.FindNextFile(); if (finder.IsDirectory()) { if (!f<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,219,9],"tags":[],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1765"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=1765"}],"version-history":[{"count":1,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1765\/revisions"}],"predecessor-version":[{"id":1766,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1765\/revisions\/1766"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=1765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=1765"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=1765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}