CPageVqf::CPageVqf() : CPropertyPage(CPageVqf::IDD) { //{{AFX_DATA_INIT(CPageVqf) m_bInfotipEnable = FALSE; m_bColumnEnable = FALSE; m_bPropEnable = FALSE; m_strInfotipFormat = _T(""); m_strInfotipInfo = _T(""); //}}AFX_DATA_INIT regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"vqf_PropEnable",(DWORD *)&m_bPropEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"vqf_InfotipEnable",(DWORD *)&m_bInfotipEnable,TRUE); CString strDefault; strDefault.LoadString(IDS_DEF_INFOTIP_VQF_FORMAT); m_strInfotipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"vqf_InfotipFormat",(char *)(LPCSTR )strDefault); m_strInfotipInfo = LoadResString(AfxGetResourceHandle(),IDS_DEF_INFOTIP_INF_VQF_FORMAT); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"vqf_ColumnEnable",(DWORD *)&m_bColumnEnable,TRUE); }
CPageOgg::CPageOgg() : CPropertyPage(CPageOgg::IDD) { //{{AFX_DATA_INIT(CPageOgg) m_bInfotipEnable = FALSE; m_bColumnEnable = FALSE; m_bPropEnable = FALSE; m_strInfotipFormat = _T(""); m_strInfotipInfo = _T(""); //}}AFX_DATA_INIT regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"ogg_PropEnable",(DWORD *)&m_bPropEnable,DEF_OGG_PROP_ENABLE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"ogg_InfotipEnable",(DWORD *)&m_bInfotipEnable,DEF_OGG_INFOTIP_ENABLE); CString strDefault; strDefault.LoadString(IDS_DEF_INFOTIP_OGG_FORMAT); m_strInfotipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"ogg_InfotipFormat",strDefault); m_strInfotipInfo = LoadResString(AfxGetResourceHandle(),IDS_DEF_INFOTIP_INF_OGG_FORMAT); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"ogg_ColumnEnable",(DWORD *)&m_bColumnEnable,DEF_OGG_COLUMN_ENABLE); }
CPageMp3::CPageMp3() : CPropertyPage(CPageMp3::IDD) { //{{AFX_DATA_INIT(CPageMp3) m_bId3v1ScmpxGenre = FALSE; m_bRiffSifDisable = TRUE; m_strRiffSoft = _T(""); m_bInfotipEnable = FALSE; m_bColumnEnable = FALSE; m_strInfotipFormat = _T(""); m_strInfotipInfo = _T(""); m_bMp3PropEnable = FALSE; //}}AFX_DATA_INIT regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"mp3_PropEnable",(DWORD *)&m_bMp3PropEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"mp3_Id3v1ScmpxGenre",(DWORD *)&m_bId3v1ScmpxGenre,FALSE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"mp3_RiffSifDisable",(DWORD *)&m_bRiffSifDisable,TRUE); m_strRiffSoft = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"mp3_RmpSoft",APP_NAME); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"mp3_InfotipEnable",(DWORD *)&m_bInfotipEnable,TRUE); CString strDefault; strDefault.LoadString(IDS_DEF_INFOTIP_MP3_FORMAT); m_strInfotipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"mp3_InfotipFormat",(char *)(LPCSTR )strDefault); m_strInfotipInfo = LoadResString(AfxGetResourceHandle(),IDS_DEF_INFOTIP_INF_MP3_FORMAT); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,"mp3_ColumnEnable",(DWORD *)&m_bColumnEnable,TRUE); }
void CShellExt::ConfigLoad() { TRACE(_T("ConfigLoad()\n")); //オプションを取得 CString strDefault; //(共通) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("SaveTimeStamp"),(DWORD *)&m_bSaveTimeStamp,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ContextMenu"),(DWORD *)&m_bContextMenu,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("SelectDrive"),(DWORD *)&m_bSelectDrive,DEF_SETUP_MAIN_SELECT_DRIVE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("Disable_FDD"),(DWORD *)&m_bDisable_FDD,DEF_SETUP_MAIN_DISABLE_FDD); // Workaround for the old wrong value name. DWORD dwTemp; regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("Disable_RAMOVABLE"),&dwTemp,DEF_SETUP_MAIN_DISABLE_REMOVABLE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("Disable_REMOVABLE"),(DWORD *)&m_bDisable_REMOVABLE,dwTemp); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("Disable_CDROM"),(DWORD *)&m_bDisable_CDROM,DEF_SETUP_MAIN_DISABLE_CDROM); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("Disable_NETWORK"),(DWORD *)&m_bDisable_NETWORK,DEF_SETUP_MAIN_DISABLE_NETWORK); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("Column_8_3"),(DWORD *)&m_bColumn_8_3,DEF_SETUP_MAIN_COLUMN_8_3); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("PropAOT"),(DWORD *)&m_bPropAOT,DEF_SETUP_PROP_AOT); //(mp3) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp3_PropEnable"),(DWORD *)&m_bMp3PropEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp3_Id3v1ScmpxGenre"),(DWORD *)&m_bId3v1ScmpxGenre,FALSE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp3_RiffSifDisable"),(DWORD *)&m_bRiffSifDisable,TRUE); m_strRmpSoft = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp3_RmpSoft"),SOFT_NAME); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp3_InfotipEnable"),(DWORD *)&m_bMp3InfotipEnable,TRUE); strDefault.LoadString(IDS_DEF_INFOTIP_MP3_FORMAT); m_strMp3InfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp3_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp3_ColumnEnable"),(DWORD *)&m_bMp3ColumnEnable,TRUE); m_bMp3ApeTagDisable = FALSE; //(wave) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wave_PropEnable"),(DWORD *)&m_bWavePropEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wave_InfotipEnable"),(DWORD *)&m_bWaveInfotipEnable,TRUE); strDefault.LoadString(IDS_DEF_INFOTIP_WAVE_FORMAT); m_strWaveInfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wave_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wave_ColumnEnable"),(DWORD *)&m_bWaveColumnEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wave_CodecFind"),(DWORD *)&m_iWaveCodecFind,0); m_iWaveCodecFind = 2; // 2004-01-21 コーデック取得方法は内蔵辞書固定 //(avi) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("avi_PropEnable"),(DWORD *)&m_bAviPropEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("avi_InfotipEnable"),(DWORD *)&m_bAviInfotipEnable,TRUE); strDefault.LoadString(IDS_DEF_INFOTIP_AVI_FORMAT); m_strAviInfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("avi_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("avi_ColumnEnable"),(DWORD *)&m_bAviColumnEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("avi_CodecFind"),(DWORD *)&m_iAviCodecFind,0); m_iAviCodecFind = 2; // 2004-01-21 コーデック取得方法は内蔵辞書固定 //(vqf) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("vqf_PropEnable"),(DWORD *)&m_bVqfPropEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("vqf_InfotipEnable"),(DWORD *)&m_bVqfInfotipEnable,TRUE); strDefault.LoadString(IDS_DEF_INFOTIP_VQF_FORMAT); m_strVqfInfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("vqf_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("vqf_ColumnEnable"),(DWORD *)&m_bVqfColumnEnable,TRUE); //(wma) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wma_PropEnable"),(DWORD *)&m_bWmaPropEnable,TRUE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wma_InfotipEnable"),(DWORD *)&m_bWmaInfotipEnable,TRUE); strDefault.LoadString(IDS_DEF_INFOTIP_WMA_FORMAT); m_strWmaInfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wma_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("wma_ColumnEnable"),(DWORD *)&m_bWmaColumnEnable,TRUE); //(m3u) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("m3u_PropEnable"),(DWORD *)&m_bM3uPropEnable,DEF_M3U_PROP_ENABLE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("m3u_InfotipEnable"),(DWORD *)&m_bM3uInfotipEnable,DEF_M3U_INFOTIP_ENABLE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("m3u_Prop_Fullpath"),(DWORD *)&m_bM3uProp_Fullpath,DEF_M3U_PROP_FULLPATH); //(ogg) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ogg_PropEnable"),(DWORD *)&m_bOggPropEnable,DEF_OGG_PROP_ENABLE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ogg_InfotipEnable"),(DWORD *)&m_bOggInfotipEnable,DEF_OGG_INFOTIP_ENABLE); strDefault.LoadString(IDS_DEF_INFOTIP_OGG_FORMAT); m_strOggInfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ogg_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ogg_ColumnEnable"),(DWORD *)&m_bOggColumnEnable,DEF_OGG_COLUMN_ENABLE); //(ape) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ape_PropEnable"),(DWORD *)&m_bApePropEnable,DEF_APE_PROP_ENABLE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ape_InfotipEnable"),(DWORD *)&m_bApeInfotipEnable,DEF_APE_INFOTIP_ENABLE); strDefault.LoadString(IDS_DEF_INFOTIP_APE_FORMAT); m_strApeInfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ape_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("ape_ColumnEnable"),(DWORD *)&m_bApeColumnEnable,DEF_APE_COLUMN_ENABLE); //(mp4) regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp4_PropEnable"),(DWORD *)&m_bMp4PropEnable,DEF_MP4_PROP_ENABLE); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp4_InfotipEnable"),(DWORD *)&m_bMp4InfotipEnable,DEF_MP4_INFOTIP_ENABLE); strDefault.LoadString(IDS_DEF_INFOTIP_MP4_FORMAT); m_strMp4InfoTipFormat = regGetStringEx(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp4_InfotipFormat"),strDefault); regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("mp4_ColumnEnable"),(DWORD *)&m_bMp4ColumnEnable,DEF_MP4_COLUMN_ENABLE); }
CShellExt::EN_FILETYPE CShellExt::GetFileType(LPCTSTR szFileName) { LPCTSTR szExt = getExtName(szFileName); if((lstrcmpi(szExt,_T(".mp3")) == 0) || (lstrcmpi(szExt,_T(".mp2")) == 0) || (lstrcmpi(szExt,_T(".mp1")) == 0) || (lstrcmpi(szExt,_T(".rmp")) == 0) ) { DWORD dwRet; HANDLE hFile = CreateFile( szFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, //指定したファイルが存在していない場合、この関数は失敗します。 FILE_ATTRIBUTE_NORMAL, NULL); if(hFile != INVALID_HANDLE_VALUE) { //RIFF/WAVEヘッダがある場合はWAVEとみなす char buf[16]; if(ReadFile(hFile,&buf,16,&dwRet,NULL) && (dwRet == 16)) { buf[4] = '_'; buf[5] = '_'; buf[6] = '_'; buf[7] = '_'; if((dwRet == 16) && (memcmp(buf,"RIFF____WAVEfmt ",16) == 0)) { CloseHandle(hFile); return WAVE; } } CloseHandle(hFile); } return MP3; } /*else*/ if(lstrcmpi(szExt,_T(".wav")) == 0) { return WAVE; } /*else*/ if(lstrcmpi(szExt,_T(".avi")) == 0) { return AVI; } /*else*/ if(lstrcmpi(szExt,_T(".vqf")) == 0) { return VQF; } /*else*/ if((lstrcmpi(szExt,_T(".wma")) == 0) || (lstrcmpi(szExt,_T(".wmv")) == 0) || (lstrcmpi(szExt,_T(".asf")) == 0) ) { return WMA; } /*else*/ if((lstrcmpi(szExt,_T(".m3u")) == 0) || (lstrcmpi(szExt,_T(".m3u8")) == 0) ) { return M3U; } /*else*/ if(lstrcmpi(szExt,_T(".ogg")) == 0) { return OGG; } /*else*/ if(lstrcmpi(szExt,_T(".ape")) == 0) { return APE; } /*else*/ if((lstrcmpi(szExt,_T(".mp4")) == 0) || (lstrcmpi(szExt,_T(".m4v")) == 0) || (lstrcmpi(szExt,_T(".m4a")) == 0) || (lstrcmpi(szExt,_T(".3gp")) == 0) || (lstrcmpi(szExt,_T(".3g2")) == 0) ) { return MP4; } DWORD dwUseExtra=0; regGetDword(HKEY_CURRENT_USER,MP3INFP_REG_ENTRY,_T("UseExperimentalSupport"),&dwUseExtra,FALSE); if(dwUseExtra){ if(lstrcmpi(szExt,_T(".tta")) == 0)return MP3; if(lstrcmpi(szExt,_T(".tak")) == 0)return APE; } return UNKNOWN; }