-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThemePackerDlg.h
113 lines (100 loc) · 2.54 KB
/
ThemePackerDlg.h
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// ThemePackerDlg.h : header file
//
#pragma once
#include "afxmenubutton.h"
#include "afxcmn.h"
#include "afxwin.h"
#include <Mmsystem.h>
#include "STBreader.h"
// CThemePackerDlg dialog
class CThemePackerDlg : public CDialogEx
{
// Construction
public:
CThemePackerDlg(CWnd* pParent = NULL); // standard constructor
~CThemePackerDlg()
{
RemoveAll();
}
// Dialog Data
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_THEMEPACKER_DIALOG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
CMenu menu;
StbReader stb;
bool saved;
CString windowTitle, fileName;
struct SoundDesc {
CString name;
char id;
void *wv;
int size;
};
struct MusicDesc {
unsigned char type;
CString name, playlist;
};
CArray<SoundDesc> sounds;
CArray<MusicDesc> musics;
void RemoveAll();
int m_lbdiff;
int m_bwdiff;
bool m_soundshown;
HWAVEOUT waveout;
WAVEHDR wihdr;
void stopPlay();
void nextSong();
void playMelody(const char *melody);
void playSound(char c) { char s[2] = { c, 0 }; playMelody(s); }
bool playBuffer(char *buf, int size);
short rec_data_buf[320000]; // 10 sec buffer * 16KHz * 16bit (*2 for compression)
void doOpen();
CString getUsedID();
void setWindowName()
{
if (fileName.IsEmpty()) SetWindowText(_T("Untitled - " + windowTitle));
else SetWindowText(PathFindFileName(fileName) + CString(_T(" - ")) + windowTitle);
}
void AddFiles(CStringArray &sa);
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
CMFCMenuButton m_projectbtn;
afx_msg void OnBnClickedRadio2();
afx_msg void OnBnClickedRadio1();
CListCtrl m_list;
afx_msg void OnFileNew();
afx_msg void OnFileOpen();
afx_msg void OnFileSave();
afx_msg void OnFileExit();
afx_msg void OnBnClickedAdd();
afx_msg void OnBnClickedEdit();
afx_msg void OnBnClickedDelete();
afx_msg void OnBnClickedPlay();
afx_msg void OnSize(UINT nType, int cx, int cy);
CButton m_btnAdd;
CButton m_btnEdit;
CButton m_btnDelete;
CButton m_btnPlay;
// afx_msg void OnDropdownProjectbutton(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnClickedProjectbutton();
afx_msg void OnDblclkList1(NMHDR *pNMHDR, LRESULT *pResult);
protected:
afx_msg LRESULT OnWomDone(WPARAM wParam, LPARAM lParam);
virtual void OnCancel();
public:
afx_msg void OnFileSaveas();
afx_msg void OnBnClickedAddauto();
afx_msg void OnDropFiles(HDROP hDropInfo);
CButton m_autoaddBtn;
CButton m_btnSave;
afx_msg void OnClickedSave();
};