-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMediaPlayerDialog.h
More file actions
84 lines (67 loc) · 2.29 KB
/
MediaPlayerDialog.h
File metadata and controls
84 lines (67 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#pragma once
#include "VLCPlayer.h"
#include "afxwin.h"
#include "afxcmn.h"
#include "stdint.h"
#include "PlayPauseButton.h"
#include "StopButton.h"
#include "ForwardButton.h"
#include "BackwardButton.h"
// CMediaPlayerDialog dialog
class CMediaPlayerDialog : public CDialog
{
DECLARE_DYNAMIC(CMediaPlayerDialog)
public:
CMediaPlayerDialog(CWnd* pParent = NULL); // standard constructor
virtual ~CMediaPlayerDialog();
// Dialog Data
enum { IDD = IDD_DIALOG_PROGRESSCTRL };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
afx_msg LRESULT OnStartPlay(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnStopPlay(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnSeek(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnResetBtnStatus(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnResetPlayStatus(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnInitDialog();
void UpdatePosition();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnPaint();
void SetSeekPos(float fPercent){m_fPercent = fPercent;}
void SetMp4Path(const CString& strPath){m_strMp4Path = strPath;}
bool IsPlaying() {return m_bPlaying;}
const CString& GetMp4Path() {return m_strMp4Path;}
void ResetMediaSlider(){m_mediaSlider.SetPos(0);}
CStatic& GetVLCCtrl() {return m_vlcControl;}
static CVLCPlayer* m_pVLCPlayer;
private:
bool m_bPlaying;
bool m_muteFlag;
int64_t m_nlength;
CStatic m_mediaPosition;
CSliderCtrl m_mediaSlider;
CSliderCtrl m_volumeSlider;
CStatic m_vlcControl;
CStatic m_volumeLevel;
CStatic m_SoundIcon;
HICON m_hMuteIcon;
HICON m_hVolumeIcon;
HICON m_hPlayIcon;
HICON m_hStopIcon;
HICON m_hPauseIcon;
float m_fPercent;
CString m_strMp4Path;
const static int m_nMaxPos = 100;
CStopButton m_StopBtn;
CPlayPauseButton m_PlayPauseBtn;
CForwardButton m_ForwardBtn;
CBackwardButton m_BackwardBtn;
public:
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg LRESULT OnLoopPlay(WPARAM wParam, LPARAM lParam);
afx_msg void OnStnClickedStaticSound();
afx_msg void OnNMCustomdrawSliderVolume(NMHDR *pNMHDR, LRESULT *pResult);
};