I found the solution after reading
this [
^]excellent article.
So that parts actually give you the "Date Taken" property, which as Sergey rightly stated, is taken from the EXIF that only JPEG based files have.
EXIFINFO exifinfo;
memset(&exifinfo,0,sizeof(EXIFINFO));
Cexif exif(&exifinfo);
bool decode_success = false;
decode_success = exif.DecodeExif(hFile);
fclose(hFile);
if (decode_success && exifinfo.IsExif) {
CString sDatetime = exifinfo.DateTime;
if (sDatetime.GetLength() == 19
&& _T(" ") != sDatetime.Left(4)
&& _T("0000") != sDatetime.Left(4)
)
{
int d_yyyy = StrToInt (sDatetime.Left(4));
int d_mm = StrToInt (sDatetime.Mid(4+1, 2));
int d_dd = StrToInt (sDatetime.Mid(4+1+2+1, 2));
int t_hh = StrToInt (sDatetime.Mid(4+1+2+1+2+1, 2));
int t_mm = StrToInt (sDatetime.Mid(4+1+2+1+2+1+2+1, 2));
int t_ss = StrToInt (sDatetime.Mid(4+1+2+1+2+1+2+1+2+1, 2));