CString CFileDisperserDlg::GetFileSize(int size)
{
//HANDLE hFile= CreateFile((CString)Path,GENERIC_READ,0,NULL,OPEN_EXISTING,0,NULL);
//int size = ::GetFileSize(hFile,NULL);
CString strByte,strFileSize;
if(size > 1024)
{
size /= 1024;
strByte = _T("KB");
}
if(size > 1024)
{
size /= 1024;
strByte = _T("MB");
}
if(size > 1024)
{
size /= 1024;
strByte = _T("GB");
}
strFileSize.Format(_T("%d %s"),size,strByte);
return strFileSize;
}
'개발' 카테고리의 다른 글
hyper V / CentOS / MySQL + Node js + express 설치 (0) | 2014.05.29 |
---|---|
CentOS[Linux] Node js+express 설치시 bash : express : command not found 일때 (0) | 2014.05.29 |
STL List 등에서 순차삭제 (0) | 2014.04.30 |
GetFileName (0) | 2014.04.29 |
WELL 512 랜덤상수 생성 알고리즘 (0) | 2014.04.28 |