Click here to Skip to main content
12,300,841 members (61,460 online)
Click here to Skip to main content

Stats

202.5K views
11K downloads
105 bookmarked
Posted

A Basic Media Player

, 10 Jan 2013 GPL3
Using MCIWnd wrapper class to write a simple media player
// RegistrySettings.cpp: implementation of the CRegistrySettings class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "mci.h"
#include "RegistrySettings.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CRegistrySettings::CRegistrySettings()
{
	pApp=AfxGetApp();
}

CRegistrySettings::~CRegistrySettings()
{

}

int CRegistrySettings::GetPlayLoop()
{
	return pApp->GetProfileInt("Play","Loop",0);
}

int CRegistrySettings::GetPlayAutoStart()
{
	return pApp->GetProfileInt("Play","AutoStart",0);
}

int CRegistrySettings::GetPlayRewind()
{
	return pApp->GetProfileInt("Play","Rewind",0);
}

int CRegistrySettings::GetSettingsVolume()
{
	return pApp->GetProfileInt("Settings","Volume",1000);
}

void CRegistrySettings::SetPlayLoop(int iEntry)
{
	pApp->WriteProfileInt("Play","Loop",iEntry);
}

void CRegistrySettings::SetPlayAutoStart(int iEntry)
{
	pApp->WriteProfileInt("Play","AutoStart",iEntry);
}

void CRegistrySettings::SetPlayRewind(int iEntry)
{
	pApp->WriteProfileInt("Play","Rewind",iEntry);
}

void CRegistrySettings::SetSettingsVolume(int iEntry)
{
	pApp->WriteProfileInt("Settings","Volume",iEntry);
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

M. Bonvari
Other
Iran (Islamic Republic of) Iran (Islamic Republic of)
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 10 Jan 2013
Article Copyright 2003 by M. Bonvari
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid