Click here to Skip to main content
11,431,011 members (69,241 online)
Click here to Skip to main content
Add your own
alternative version

A Basic Media Player

, 10 Jan 2013 GPL3
Using MCIWnd wrapper class to write a simple media player

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// EasyPlayer.h : header file

#include <afxmt.h>

#pragma comment(lib, "vfw32.lib")
// CEasyPlayer window

class CEasyPlayer : public CWnd
	CEasyPlayer(HWND hwParent);

	HWND hwndParent;

	long lPos;
	void Rwd();
	void Fwd();
	void DecreaseVolume();
	void IncreaseVolume();
	long GetVolume();
	long lVolume;
	void SetVolume(long lVol);
	long GetLength();
	long GetPosition();
	void SetPosition(long lPos);
	HWND GetWindowHandle();
	void Resume();
	void Kill();
	void Break();
	void Loop();
	void Close();
	HWND Initialize();
	void Play();
	void Stop();
	void Pause();
	long GetMode();
	CString GetPath();
	void SetPath(CString sPath);
	void SetParent(HWND hParent);
	HWND GetParent();
	virtual ~CEasyPlayer();

	HWND c_Player;
	CEvent m_Event;
	CString m_sPath;

	afx_msg void OnDestroy();

class CParams
	CParams() {};
	virtual ~CParams() {};

	CWnd* pWnd;
	HWND  hWnd;
	CEvent* pEvent;


// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_EASYPLAYER_H_INCLUDED_)

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.


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


About the Author

M. Bonvari
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
No Biography provided

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