ReactOS 0.4.15-dev-7942-gd23573b
sound.c File Reference
#include "access.h"
Include dependency graph for sound.c:

Go to the source code of this file.

Functions

static VOID OnInitDialog (HWND hwndDlg, PGLOBAL_DATA pGlobalData)
 
INT_PTR CALLBACK SoundPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Function Documentation

◆ OnInitDialog()

static VOID OnInitDialog ( HWND  hwndDlg,
PGLOBAL_DATA  pGlobalData 
)
static

Definition at line 13 of file sound.c.

14{
15 TCHAR szBuffer[256];
16 UINT i;
17
18 /* Add strings to the combo-box */
19 for (i = 0; i < 4; i++)
20 {
21 LoadString(hApplet, IDS_SENTRY_NONE + i, szBuffer, 256);
23 }
24
25 /* Select a combo-box item */
27
28 /* Initialize SoundSentry settings */
29 if (!(pGlobalData->ssSoundSentry.dwFlags & SSF_AVAILABLE))
30 {
34 }
35 else
36 {
37 if (pGlobalData->ssSoundSentry.dwFlags & SSF_SOUNDSENTRYON)
38 {
40 }
41 else
42 {
45 }
46 }
47
48 /* Initialize ShowSounds settings */
49 if (pGlobalData->bShowSounds)
51}
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
#define IDC_SENTRY_BOX
Definition: resource.h:42
#define IDS_SENTRY_NONE
Definition: resource.h:26
#define IDC_SSHOW_BOX
Definition: resource.h:45
#define IDC_SENTRY_COMBO
Definition: resource.h:44
#define IDC_SENTRY_TEXT
Definition: resource.h:43
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
BOOL bShowSounds
Definition: access.h:39
SOUNDSENTRY ssSoundSentry
Definition: access.h:38
DWORD iWindowsEffect
Definition: winuser.h:3499
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
#define CB_SETCURSEL
Definition: winuser.h:1961
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define CB_ADDSTRING
Definition: winuser.h:1936
#define SSF_AVAILABLE
Definition: winuser.h:2160
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define LoadString
Definition: winuser.h:5819
#define SendDlgItemMessage
Definition: winuser.h:5842
#define BST_CHECKED
Definition: winuser.h:197
#define SSF_SOUNDSENTRYON
Definition: winuser.h:2161
char TCHAR
Definition: xmlstorage.h:189

Referenced by SoundPageProc().

◆ SoundPageProc()

INT_PTR CALLBACK SoundPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 56 of file sound.c.

60{
61 PGLOBAL_DATA pGlobalData;
62
63 pGlobalData = (PGLOBAL_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
64
65 switch (uMsg)
66 {
67 case WM_INITDIALOG:
68 pGlobalData = (PGLOBAL_DATA)((LPPROPSHEETPAGE)lParam)->lParam;
69
70 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
71
72 OnInitDialog(hwndDlg, pGlobalData);
73 break;
74
75 case WM_COMMAND:
76 switch (LOWORD(wParam))
77 {
78 case IDC_SENTRY_BOX:
82 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
83 break;
84
87 {
88 pGlobalData->ssSoundSentry.iWindowsEffect =
90 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
91 }
92 break;
93
94 case IDC_SSHOW_BOX:
95 pGlobalData->bShowSounds = !pGlobalData->bShowSounds;
96 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
97 break;
98
99 default:
100 break;
101 }
102 break;
103
104 case WM_NOTIFY:
105 switch (((LPNMHDR)lParam)->code)
106 {
107 case PSN_APPLY:
109 sizeof(SOUNDSENTRY),
110 &pGlobalData->ssSoundSentry,
113 pGlobalData->bShowSounds,
114 0,
116 return TRUE;
117
118 default:
119 break;
120 }
121 break;
122 }
123
124 return FALSE;
125}
struct _GLOBAL_DATA * PGLOBAL_DATA
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
static VOID OnInitDialog(HWND hwndDlg, PGLOBAL_DATA pGlobalData)
Definition: sound.c:13
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define DWORD
Definition: nt_native.h:44
#define LOWORD(l)
Definition: pedump.c:82
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PSN_APPLY
Definition: prsht.h:117
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define WM_NOTIFY
Definition: richedit.h:61
Definition: inflate.c:139
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define HIWORD(l)
Definition: typedefs.h:247
#define DWLP_USER
Definition: winuser.h:872
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
#define SPIF_SENDCHANGE
Definition: winuser.h:1572
#define SPIF_UPDATEINIFILE
Definition: winuser.h:1571
#define SendMessage
Definition: winuser.h:5843
HWND WINAPI GetParent(_In_ HWND)
#define CBN_SELENDOK
Definition: winuser.h:1981
#define SystemParametersInfo
Definition: winuser.h:5858
#define CB_GETCURSEL
Definition: winuser.h:1943
#define SPI_SETSOUNDSENTRY
Definition: winuser.h:1416
#define SPI_SETSHOWSOUNDS
Definition: winuser.h:1406

Referenced by SystemApplet().