Click here to Skip to main content
11,647,170 members (70,097 online)
Click here to Skip to main content
Add your own
alternative version

A Basic Media Player

, 10 Jan 2013 GPL3 195.8K 10.4K 105
Using MCIWnd wrapper class to write a simple media player
// mciDlg.h : header file
//

#if !defined(AFX_mciDLG_H__684F6913_C724_4CD0_9DBD_82A6F717E1CC__INCLUDED_)
#define AFX_mciDLG_H__684F6913_C724_4CD0_9DBD_82A6F717E1CC__INCLUDED_

#include "FullMovie.h"	// Added by ClassView
#include "EasyPlayer.h"	// Added by ClassView
#include "RegistrySettings.h"	// Added by ClassView
#include "PrefDlg.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


/////////////////////////////////////////////////////////////////////////////
// CmciDlg dialog

class CmciDlg : public CDialog
{
	DECLARE_DYNAMIC(CmciDlg);
	friend class CmciDlgAutoProxy;

// Construction
public:
	CRegistrySettings rs;
	long lPos;
	int lVol;
	CFullMovie dlgFullSize;
	int iPlaying;
	CEasyPlayer myPlayer;
	CString myPath;
	CmciDlg(CWnd* pParent = NULL);	// standard constructor
	virtual ~CmciDlg();

// Dialog Data
	//{{AFX_DATA(CmciDlg)
	enum { IDD = IDD_mci_DIALOG };
	CStatic	c_Status;
	CSliderCtrl	c_Volume;
	CButton	c_Stop;
	CButton	c_Pause;
	CButton	c_Play;
	CSliderCtrl	c_Slider;
	CStatic	c_Static;
	int		m_PlayPauseStop;
	int		m_Pos;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CmciDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//CmciDlgAutoProxy* m_pAutoProxy;
	HICON m_hIcon;

	BOOL CanExit();

	// Generated message map functions
	//{{AFX_MSG(CmciDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClose();
	virtual void OnOK();
	virtual void OnCancel();
	afx_msg void OnViewFullscreen();
	afx_msg void OnFileOpen();
	afx_msg void OnPlaybackPlayPause();
	afx_msg void OnPlay();
	afx_msg void OnPause();
	afx_msg void OnStop();
	afx_msg void OnFileExit();
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnFileClose();
	afx_msg void OnAppAbout();
	afx_msg void OnCustomdrawSlider2(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnCustomdrawSlider1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnPlaybackVolumeDown();
	afx_msg void OnPlaybackVolumeUp();
	afx_msg void OnViewPreferences();
	afx_msg void OnPlaybackSeekRewind();
	afx_msg void OnPlaybackSeekForward();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	HICON hPlay;
	HICON hPause;
	HICON hStop;
};

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

#endif // !defined(AFX_mciDLG_H__684F6913_C724_4CD0_9DBD_82A6F717E1CC__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

You may also be interested in...

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