懂用VC++开发小软件MP3播放器的进!(帮帮我啊)

我学的不是很好,怎么弄都没弄出来,希望懂的人帮帮我啊,课题是这样的,用C++程序,做多媒体控制题目是mp3播放器的开发.请懂的人帮帮我啊,能出来我再加100分啊!谢谢你们... 我学的不是很好,怎么弄都没弄出来,希望懂的人帮帮我啊,课题是这样的,用C++程序,做多媒体控制 题目是 mp3播放器的开发 . 请懂的人帮帮我啊, 能出来我再加100分啊! 谢谢你们了
文件可以发邮件过来 我的邮箱是 asp-ly@163.com 谢谢啊!
QQ 317782225
展开
 我来答
百度网友30c80df07
2008-06-23
知道答主
回答量:5
采纳率:0%
帮助的人:0
展开全部
我这里做好了一个简单的 你可以看看 但是怎么发给你啊,如要详细给我联系
BOOL CRichiMP3App::InitInstance()
{
if (!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return FALSE;
}

// Initialize OLE libraries
if (!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return FALSE;
}

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

// Parse the command line to see if launched as OLE server
if (RunEmbedded() || RunAutomated())
{
// Register all OLE server (factories) as running. This enables the
// OLE libraries to create objects from other applications.
COleTemplateServer::RegisterAll();
}
else
{
// When a server application is launched stand-alone, it is a good idea
// to update the system registry in case it has been damaged.
COleObjectFactory::UpdateRegistryAll();
}

CoInitialize(0);
ReadData();// support to use direct Sound
GWExtTransSplashWnd * pSplashWnd = new GWExtTransSplashWnd(IDB_SPLASH,TRUE,RGB(0,0,0), 3000);
pSplashWnd->Create();
CRichiMP3Dlg 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;
}
int CRichiMP3App::ExitInstance()
{
CoUninitialize();
WriteData();
return CWinApp::ExitInstance();
}
BOOL CRichiMP3App::PreTranslateMessage(MSG* pMsg)
{
// CG: The following lines were added by the Splash Screen component.
// if (CSplashWnd::PreTranslateAppMessage(pMsg))
//return TRUE;

return CWinApp::PreTranslateMessage(pMsg);
}

void CRichiMP3App::WriteData()
{
CString m_sPath;
CString str=theApp.m_pszHelpFilePath;
m_sPath=str.Left(str.ReverseFind('\\'));
::SetCurrentDirectory(m_sPath);
//
CString string;
string = m_sPath + "\\mp3.m3u";
CFile fi;
if(fi.Open(string,CFile::modeCreate|CFile::modeWrite))
{
fi.Close();
}
Write(string);

}
void CRichiMP3App::ReadData()
{
m_PictureList.RemoveAll();
CString m_sPath;
CString str=theApp.m_pszHelpFilePath;
m_sPath=str.Left(str.ReverseFind('\\'));
::SetCurrentDirectory(m_sPath);

CString string;

string = m_sPath +"\\mp3.m3u";
Read(string);
}
bool CRichiMP3App::Read(const char * cFileName)
{

char buf[1024];
ifstream ifs(cFileName);
while (ifs.good())
{
ifs.getline(buf, 1024);
CString cs(buf);
if(!cs.IsEmpty())
{
CPictureObject *pObj = new CPictureObject;
pObj->SetFileName(cs);
AddPictureObject(pObj);
}
}
return true;
}

bool CRichiMP3App::Write(const char * cFileName)
{
ASSERT(cFileName);
ofstream ofs(cFileName);
POSITION pos = m_PictureList.GetHeadPosition();
while(pos != NULL)
{
CPictureObject *pObj = (CPictureObject *)m_PictureList.GetNext(pos);
ofs <<pObj->GetFileName()<<"\n";
}
return true;
}
void CRichiMP3App::AddPictureObject(CPictureObject *pObj)
{
m_PictureList.AddTail(pObj);
}
void CRichiMP3App::RemovePictureObject(CPictureObject *pObj)
{
POSITION posi=m_PictureList.Find(pObj);
if(posi!=NULL)
m_PictureList.RemoveAt(posi);

}
void CRichiMP3App::ResetSelectObject()
{
m_PictureList.RemoveAll();

}
void CRichiMP3App::WinHelp(DWORD dwData, UINT nCmd)
{
if (nCmd == HELP_INDEX || nCmd == HELP_CONTENTS)
nCmd = HELP_FINDER;
CWinApp::WinHelp(dwData, nCmd);
}
上海风华峻极智能科技
2022-05-05 广告
上海风华峻极智能科技有限公司【远程会议视频系统】一体化解决方案,如同面对面开会一般,让远程会议更简单,多种会议场景布局,舞台设备厂家,高保真语音的传输,极速快捷远程会议体验,只为高效沟通,支持万人及多房间同时在线.... 点击进入详情页
本回答由上海风华峻极智能科技提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式