-
Notifications
You must be signed in to change notification settings - Fork 0
/
voltebeepDlg.h
104 lines (86 loc) · 2.33 KB
/
voltebeepDlg.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
// voltebeepDlg.h : header file
//
#pragma once
#include "afxcmn.h"
#include "INI.h"
#include "afxwin.h"
#define BT_COUNT 6
struct BT {
bool isdown;
DWORD code;
float pan;
// referencing
float *pVolume;
FMOD::Sound **ppSound;
};
#define SND_COUNT 2
struct SND {
CString file;
// shared
float volume;
FMOD::Sound *pSound;
};
// CvoltebeepDlg dialog
class CvoltebeepDlg : public CDialogEx
{
// construction
public:
CvoltebeepDlg(CWnd* pParent = NULL); // standard constructor
// dialog data
enum { IDD = IDD_VOLTEBEEP_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// implementation
protected:
HICON m_hIcon;
// my stuff
HHOOK m_KeybHook;
FMOD::System *m_pSystem;
FMOD::Channel *m_pChannel;
unsigned int m_Version;
void *m_pExtradriverdata;
BT m_Buttons[BT_COUNT];
SND m_Sounds[SND_COUNT];
CIniReader m_ini;
bool m_AssignMode;
LONG m_edbtnExStyle;
int m_MaxVolume;
float m_VolumeOffset;
bool m_Mute;
void ReflectSound();
void SetVolume(int volume = -1);
void ReflectButtons();
void LoadSounds();
void ReflectVOffset_n_Mute();
static void CALLBACK EXPORT TimerUpdateProc(HWND hWnd, UINT nMsg, UINT nIDEvent, DWORD dwTime);
static LRESULT CALLBACK HookKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam);
BOOL PreTranslateMessage(MSG* pMsg);
// message handlers
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
CSliderCtrl m_sldVolume;
CListBox m_lstboxSounds;
CButton m_radBT;
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
LRESULT OnExit(WPARAM wParam, LPARAM lParam);
afx_msg void OnItemchangedListSounds();
afx_msg void OnBnClickedRadioBt();
afx_msg void OnEnSetfocusEdit1();
afx_msg void OnEnSetfocusEdit2();
afx_msg void OnEnSetfocusEdit3();
afx_msg void OnEnSetfocusEdit4();
afx_msg void OnEnSetfocusEdit5();
afx_msg void OnEnSetfocusEdit6();
CEdit m_edtBT1;
CEdit m_edtBT2;
CEdit m_edtBT3;
CEdit m_edtBT4;
CEdit m_edtBT5;
CEdit m_edtBT6;
int m_grpFlat;
afx_msg void OnBnClickedRadioFlat();
afx_msg void OnBnClickedButtonHelp();
};