Filesize?
-
This is probably a very newbieish question: In a MFC application, if CString sPathname is the full path for a valid file (i.e. sPathname = "C:\My Documents\image.bmp"), what is the simplest way to find out the size of that file?
-
This is probably a very newbieish question: In a MFC application, if CString sPathname is the full path for a valid file (i.e. sPathname = "C:\My Documents\image.bmp"), what is the simplest way to find out the size of that file?
GetFileSize()
-
This is probably a very newbieish question: In a MFC application, if CString sPathname is the full path for a valid file (i.e. sPathname = "C:\My Documents\image.bmp"), what is the simplest way to find out the size of that file?
CreateFile()
andGetFileSize()
if you use Win32 API or_stat
if you're using CRT API. -- There's a new game we like to play you see. A game with added reality. You treat me like a dog, get me down on my knees. We call it master and servant. -
This is probably a very newbieish question: In a MFC application, if CString sPathname is the full path for a valid file (i.e. sPathname = "C:\My Documents\image.bmp"), what is the simplest way to find out the size of that file?
-
CFileFind ff; DWORD dwSize = 0; if (ff.FindFile(_T("C:\My Documents\image.bmp"))) { ff.FindNextFile(); dwSize = ff.GetLength(); // dwSize is the file size, in bytes }
Thanks, Bin! That was exactly what I was looking for.