-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayPauseButton.h
More file actions
43 lines (30 loc) · 1.08 KB
/
PlayPauseButton.h
File metadata and controls
43 lines (30 loc) · 1.08 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
#pragma once
class CMediaPlayerDialog;
// CPlayPauseButton
class CPlayPauseButton : public CButton
{
DECLARE_DYNAMIC(CPlayPauseButton)
public:
CPlayPauseButton();
virtual ~CPlayPauseButton();
void SetRoundStyle();
void DrawCircularButton(CDC& dc, const CPoint& ptBegin, const CPoint& ptEnd,
COLORREF color);
void DrawPlayIcon(CDC& dc, const CPoint& ptBegin, const CPoint& ptEnd,
COLORREF color);
void DrawPauseIcon(CDC& dc, const CPoint& ptBegin, const CPoint& ptEnd,
COLORREF color);
bool IsPlay(){return m_bPlay;}
void SetPlayState(bool bPlay){m_bPlay = bPlay;}
afx_msg LRESULT OnDrawCircularButton(WPARAM wParam, LPARAM lParam);
void SetParentDlg(CMediaPlayerDialog* pDlg);
protected:
DECLARE_MESSAGE_MAP()
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
private:
bool m_bPlay;
bool m_bMp4Opened;
CMediaPlayerDialog* m_pMediaPlayDlg;
};