📄 dlgcreatepl.cpp
字号:
// DlgCreatePL.cpp : implementation file
//
#include "stdafx.h"
#include "Media.h"
#include "DlgCreatePL.h"
#include "loadfolder.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgCreatePL dialog
CDlgCreatePL::CDlgCreatePL(CWnd* pParent /*=NULL*/)
: CDialog(CDlgCreatePL::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlgCreatePL)
m_vFolder = _T("");
m_vFileName = _T("");
//}}AFX_DATA_INIT
}
void CDlgCreatePL::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgCreatePL)
DDX_Text(pDX, IDC_EDIT_FOLDER, m_vFolder);
DDX_Text(pDX, IDC_EDIT_FILENAME, m_vFileName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgCreatePL, CDialog)
//{{AFX_MSG_MAP(CDlgCreatePL)
ON_BN_CLICKED(IDC_BUTTON_BROWSE, OnButtonBrowse)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgCreatePL message handlers
void CDlgCreatePL::OnButtonBrowse()
{
// TODO: Add your control notification handler code here
CString path_folder;
CFolderDialog dlg(&path_folder);
if (dlg.DoModal() == IDOK)
{
UpdateData(TRUE);
m_vFolder = path_folder;
UpdateData(FALSE);
}
}
void CDlgCreatePL::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);
if (m_vFolder == "")
{
MessageBox("You have to select the folder to store your playlist");
}
else
{
CDialog::OnOK();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -