通过MFC的MCI实现的音乐播放器VC可视化


通过MFC的MCI实现的音乐播放器(VC可视化),实现了播放、暂停、停止、上一曲、下一曲、快进快退、音量调节、播放进度调节、播放列表等,不过代码中还有些不完善,仅供参考。
资源截图
代码片段和文件信息
// MCIPlayer1.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “MCIPlayer1.h“
#include “MCIPlayer1Dlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMCIPlayer1App

BEGIN_MESSAGE_MAP(CMCIPlayer1App CWinApp)
//{{AFX_MSG_MAP(CMCIPlayer1App)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMCIPlayer1App construction

CMCIPlayer1App::CMCIPlayer1App()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CMCIPlayer1App object

CMCIPlayer1App theApp;

/////////////////////////////////////////////////////////////////////////////
// CMCIPlayer1App initialization

BOOL CMCIPlayer1App::InitInstance()
{
AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
//  of your final executable you should remove from the following
//  the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CMCIPlayer1Dlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
//  dismissed with Cancel
}

// Since the dialog has been closed return FALSE so that we exit the
//  application rather than start the application‘s message pump.
return FALSE;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-06-27 18:11  MCIPlayer1
     目录           0  2013-06-27 18:11  MCIPlayer1Debug
     文件     9912376  2012-05-25 02:19  MCIPlayer1DebugMCIPlayer1.exe
     文件      281056  2012-05-25 02:19  MCIPlayer1DebugMCIPlayer1.ilk
     文件       14984  2012-05-24 22:25  MCIPlayer1DebugMCIPlayer1.obj
     文件     5893968  2012-05-24 22:12  MCIPlayer1DebugMCIPlayer1.pch
     文件      443392  2012-05-25 02:19  MCIPlayer1DebugMCIPlayer1.pdb
     文件     8154524  2012-05-25 00:32  MCIPlayer1DebugMCIPlayer1.res
     文件       66808  2012-05-25 02:19  MCIPlayer1DebugMCIPlayer1Dlg.obj
     文件       12310  2012-05-25 02:19  MCIPlayer1DebugStaticEx.obj
     文件      122343  2012-05-24 22:12  MCIPlayer1DebugStdAfx.obj
     文件      214016  2012-06-20 16:45  MCIPlayer1Debugvc60.idb
     文件      389120  2012-05-25 02:19  MCIPlayer1Debugvc60.pdb
     文件     8175788  2012-08-30 11:46  MCIPlayer1MCIPlayer1.aps
     文件        1819  2012-08-30 11:49  MCIPlayer1MCIPlayer1.clw
     文件        2119  2012-05-17 12:57  MCIPlayer1MCIPlayer1.cpp
     文件        5033  2012-05-23 23:55  MCIPlayer1MCIPlayer1.dsp
     文件         528  2012-05-17 12:57  MCIPlayer1MCIPlayer1.dsw
     文件        1368  2012-05-17 12:57  MCIPlayer1MCIPlayer1.h
     文件      123904  2012-08-30 11:49  MCIPlayer1MCIPlayer1.ncb
     文件       55808  2012-08-30 11:49  MCIPlayer1MCIPlayer1.opt
     文件        1236  2012-05-25 02:19  MCIPlayer1MCIPlayer1.plg
     文件        7288  2012-05-25 00:32  MCIPlayer1MCIPlayer1.rc
     文件       23899  2012-05-25 02:19  MCIPlayer1MCIPlayer1Dlg.cpp
     文件        2348  2012-05-24 22:25  MCIPlayer1MCIPlayer1Dlg.h
     文件        3651  2012-05-17 12:57  MCIPlayer1ReadMe.txt
     目录           0  2013-06-27 18:11  MCIPlayer1
es
     文件        1828  2012-05-24 23:41  MCIPlayer1
esource.h
     文件     6912054  2012-05-23 22:34  MCIPlayer1
es07.bmp
     文件        7358  2012-05-23 23:11  MCIPlayer1
es1.ico
     文件      154422  2012-05-23 23:41  MCIPlayer1
es121.bmp
............此处省略14个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)