Click here to Skip to main content
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 !defined(AFX_EASYPLAYER_H_INCLUDED_)
#define AFX_EASYPLAYER_H_INCLUDED_

#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
{
public:
	CEasyPlayer();
	CEasyPlayer(HWND hwParent);

public:
	HWND hwndParent;

public:
	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();

protected:
	HWND c_Player;
	CEvent m_Event;
	CString m_sPath;

	//{{AFX_MSG(CEasyPlayer)
	afx_msg void OnDestroy();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


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

	CWnd* pWnd;
	HWND  hWnd;
	CEvent* pEvent;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// 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.

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

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