📄 setting.cpp
字号:
// Setting.cpp : implementation file
//
#include "stdafx.h"
#include "PCRecord.h"
#include "Setting.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetting dialog
CSetting::CSetting(CWnd* pParent /*=NULL*/)
: CDialog(CSetting::IDD, pParent)
{
//{{AFX_DATA_INIT(CSetting)
m_strComment = _T("");
m_strTrack = _T("");
m_strYear = _T("");
m_strTitle = _T("");
m_strAlbum = _T("");
m_strArtist = _T("");
//}}AFX_DATA_INIT
}
void CSetting::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetting)
DDX_Control(pDX, IDC_GENRE, m_Gener);
DDX_Text(pDX, IDC_COMMENT, m_strComment);
DDX_Text(pDX, IDC_TRACK, m_strTrack);
DDX_Text(pDX, IDC_YEAR, m_strYear);
DDX_Text(pDX, IDC_TITLE, m_strTitle);
DDX_Text(pDX, IDC_ALBUM, m_strAlbum);
DDX_Text(pDX, IDC_ARTIST, m_strArtist);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetting, CDialog)
//{{AFX_MSG_MAP(CSetting)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetting message handlers
BOOL CSetting::OnInitDialog()
{
CDialog::OnInitDialog();
CString Genres[150] =
{
"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge",
"Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B",
"Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska",
"Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop",
"Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental",
"Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "Alt. Rock",
"Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop",
"Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial",
"Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy",
"Cult", "Gangsta Rap", "Top 40", "Christian Rap", "Pop/Funk", "Jungle",
"Native American", "Cabaret", "New Wave", "Psychedelic", "Rave",
"Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz",
"Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk",
"Folk/Rock", "National Folk", "Swing", "Fast-Fusion", "Bebob", "Latin",
"Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock",
"Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock",
"Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech",
"Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass",
"Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
"Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
"Punk Rock", "Drum Solo", "A Cappella", "Euro-House", "Dance Hall",
"Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie",
"BritPop", "Negerpunk", "Polsk Punk", "Beat", "Christian Gangsta Rap",
"Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian",
"Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
"Synthpop"
};
for (int i = 0; i < 148; i++)
m_Gener.AddString(Genres[i]);
return TRUE; // return TRUE unless you set the focus to a control
}
BOOL CSetting::DestroyWindow()
{
return CDialog::DestroyWindow();
}
void CSetting::OnOK()
{
UpdateData(true);
int nSel;
nSel = m_Gener.GetCurSel();
if (nSel != CB_ERR)
m_Gener.GetLBText(nSel, m_strGener);
CDialog::OnOK();
}
void CSetting::OnCancel()
{
CDialog::OnCancel();
}
void CSetting::GetID3(ID3_INF *pinf)
{
if (pinf == NULL)
return;
strcpy(pinf->chGenre, m_strGener);
strcpy(pinf->chComment, m_strComment);
strcpy(pinf->chTrack, m_strTrack);
strcpy(pinf->chYear, m_strYear);
strcpy(pinf->chTitle, m_strTitle);
strcpy(pinf->chAlbum, m_strAlbum);
strcpy(pinf->chArtist, m_strArtist);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -