ReactOS 0.4.16-dev-1163-gec5b142
csystray.cpp
Go to the documentation of this file.
1/*
2* PROJECT: ReactOS system libraries
3* LICENSE: GPL - See COPYING in the top level directory
4* FILE: dll/shellext/stobject/csystray.cpp
5* PURPOSE: Systray shell service object implementation
6* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
7* Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
8*/
9
10#include "precomp.h"
11
12#include <regstr.h>
13#include <undocshell.h>
14#include <shellutils.h>
15#include <shlwapi.h>
16
21};
23
26};
27
28CSysTray::CSysTray() : dwServicesEnabled(0)
29{
31}
32
34{
35}
36
38{
39 HKEY hKey;
41
42 /* Enable power, volume and hotplug by default */
44
46 0,
47 NULL,
50 NULL,
51 &hKey,
53 {
54 dwSize = sizeof(DWORD);
56 L"Services",
57 NULL,
58 NULL,
60 &dwSize);
61
63 }
64}
65
67{
68 HKEY hKey;
69
70 if (bEnable)
71 this->dwServicesEnabled |= dwServiceFlag;
72 else
73 this->dwServicesEnabled &= ~dwServiceFlag;
74
77 0,
78 NULL,
81 NULL,
82 &hKey,
84 {
85 DWORD dwConfig = this->dwServicesEnabled & ~STANDALONESERVICEMASK;
87 L"Services",
88 0,
90 (LPBYTE)&dwConfig,
91 sizeof(dwConfig));
92
94 }
95
97}
98
100{
101 return (this->dwServicesEnabled & dwServiceFlag);
102}
103
105{
106 // FIXME: VOLUME_SERVICE_FLAG should use mixerOpen(CALLBACK_WINDOW)
107 // FIXME: POWER_SERVICE_FLAG should use WM_DEVICECHANGE, WM_POWERBROADCAST
108
110 if (this->dwServicesEnabled & fNeedsTimer)
112 else
114}
115
117{
118 HRESULT hr = CoCreateInstance(CLSID_ConnectionTray, 0, 1u, IID_PPV_ARG(IOleCommandTarget, &pctNetShell));
119 if (FAILED(hr))
120 return hr;
121
122 return pctNetShell->Exec(&CGID_ShellServiceObject,
125}
126
128{
129 if (!pctNetShell)
130 return S_FALSE;
131 HRESULT hr = pctNetShell->Exec(&CGID_ShellServiceObject,
134 pctNetShell.Release();
135 return hr;
136}
137
139{
140 TRACE("Initializing Notification icons...\n");
141 for (UINT i = 0; i < g_NumIcons; i++)
142 {
143 if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag)
144 {
146 if (FAILED(hr))
147 return hr;
148 }
149 }
150 for (UINT i = 0; i < _countof(g_StandaloneHandlers); ++i)
151 {
153 }
154
155 return InitNetShell();
156}
157
159{
160 TRACE("Shutting down Notification icons...\n");
161 for (UINT i = 0; i < g_NumIcons; i++)
162 {
163 if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag)
164 {
165 this->dwServicesEnabled &= ~g_IconHandlers[i].dwServiceFlag;
168 }
169 }
170 for (UINT i = 0; i < _countof(g_StandaloneHandlers); ++i)
171 {
173 }
174
175 return ShutdownNetShell();
176}
177
179{
180 TRACE("Updating Notification icons...\n");
181 for (int i = 0; i < g_NumIcons; i++)
182 {
183 if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag)
184 {
186 if (FAILED(hr))
187 return hr;
188 }
189 }
190
191 return S_OK;
192}
193
195{
196 for (UINT i = 0; i < g_NumIcons; i++)
197 {
198 HRESULT hr = g_IconHandlers[i].pfnMessage(this, uMsg, wParam, lParam, lResult);
199 if (FAILED(hr))
200 return hr;
201 if (hr == S_OK)
202 return hr;
203 }
204 for (UINT i = 0; i < _countof(g_StandaloneHandlers); ++i)
205 {
206 HRESULT hr = g_StandaloneHandlers[i].pfnMessage(this, uMsg, wParam, lParam, lResult);
207 if (FAILED(hr))
208 return hr;
209 if (hr == S_OK)
210 return hr;
211 }
212
213 // Not handled by anyone, so return accordingly.
214 return S_FALSE;
215}
216
217/*++
218* @name NotifyIcon
219*
220* Basically a Shell_NotifyIcon wrapper.
221* Based on the parameters provided, it changes the current state of the notification icon.
222*
223* @param code
224* Determines whether to add, delete or modify the notification icon (represented by uId).
225* @param uId
226* Represents the particular notification icon.
227* @param hIcon
228* A handle to an icon for the notification object.
229* @param szTip
230* A string for the tooltip of the notification.
231* @param dwstate
232* Determines whether to show or hide the notification icon.
233*
234* @return The error code.
235*
236*--*/
238{
239 NOTIFYICONDATA nim = { 0 };
240
241 TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip);
242
243 nim.cbSize = sizeof(nim);
244 nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP;
245 nim.hIcon = hIcon;
246 nim.uID = uId;
247 nim.uCallbackMessage = uId;
248 nim.dwState = dwstate;
249 nim.dwStateMask = NIS_HIDDEN;
250 nim.hWnd = m_hWnd;
251 nim.uVersion = NOTIFYICON_VERSION;
252 if (szTip)
253 StringCchCopy(nim.szTip, _countof(nim.szTip), szTip);
254 else
255 nim.szTip[0] = 0;
256 BOOL ret = Shell_NotifyIcon(code, &nim);
257 return ret ? S_OK : E_FAIL;
258}
259
261{
262 CSysTray * st = (CSysTray*) param;
263 return st->SysTrayThreadProc();
264}
265
267{
268 BOOL ret;
269 MSG msg;
270
271 while ((ret = GetMessage(&msg, NULL, 0, 0)) != 0)
272 {
273 if (ret < 0)
274 break;
275
278 }
279
280 return S_OK;
281}
282
284{
285 WCHAR strFileName[MAX_PATH];
287 HMODULE hLib = LoadLibraryW(strFileName);
288
290
291 Create(NULL);
292
294
296
297 Release();
299}
300
302{
303 TRACE("CSysTray Init TODO: Initialize tray icon handlers.\n");
304 AddRef();
305
307
309
310 return S_OK;
311}
312
314{
315 if (!DestroyWindow())
316 {
317 // Window is from another thread, ask it politely to destroy itself:
319 }
320 return S_OK;
321}
322
323// *** IOleCommandTarget methods ***
324HRESULT STDMETHODCALLTYPE CSysTray::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
325{
327 return S_OK;
328}
329
330HRESULT STDMETHODCALLTYPE CSysTray::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
331{
332 if (!IsEqualGUID(*pguidCmdGroup, CGID_ShellServiceObject))
333 return E_FAIL;
334
335 switch (nCmdID)
336 {
337 case OLECMDID_NEW: // init
338 return CreateSysTrayThread();
339 case OLECMDID_SAVE: // shutdown
340 return DestroySysTrayWindow();
341 }
342 return S_OK;
343}
344
346{
347 HRESULT hr;
348
349 if (hWnd != m_hWnd)
350 return FALSE;
351
352 if (uMsg == wm_SHELLHOOK && wm_SHELLHOOK)
353 {
354 if (wParam == HSHELL_ACCESSIBILITYSTATE && lParam == ACCESS_STICKYKEYS)
355 {
356 StickyKeys_Update(this);
357 }
358 else if (wParam == HSHELL_ACCESSIBILITYSTATE && lParam == ACCESS_MOUSEKEYS)
359 {
360 MouseKeys_Update(this);
361 }
362 lResult = 0L;
363 return TRUE;
364 }
365
366 switch (uMsg)
367 {
368 case WM_NCCREATE:
369 case WM_NCDESTROY:
370 return FALSE;
371
372 case WM_CLOSE:
373 return DestroyWindow();
374
375 case WM_CREATE:
377 InitIcons();
380 return TRUE;
381
382 case WM_TIMER:
383 if (wParam == POLL_TIMER_ID)
384 UpdateIcons();
385 else
386 ProcessIconMessage(uMsg, wParam, lParam, lResult);
387 return TRUE;
388
389 case WM_SETTINGCHANGE:
391 StickyKeys_Update(this);
393 MouseKeys_Update(this);
394 break;
395
396 case WM_DESTROY:
401 return TRUE;
402 }
403
404 TRACE("SysTray message received %u (%08p %08p)\n", uMsg, wParam, lParam);
405
406 hr = ProcessIconMessage(uMsg, wParam, lParam, lResult);
407 if (FAILED(hr))
408 return FALSE;
409
410 return (hr == S_OK);
411}
412
414{
415 WCHAR buf[400], rundll[MAX_PATH];
416 GetSystemDirectory(rundll, _countof(rundll));
417 PathAppendW(rundll, L"rundll32.exe");
418
419 wsprintfW(buf, L"%hs %hs%hs", "shell32.dll,Control_RunDLL", Dll, Parameters);
420 ShellExecuteW(NULL, NULL, rundll, buf, NULL, SW_SHOW);
421}
422
424{
425 RunDll("access.cpl", Parameters);
426}
HINSTANCE g_hInstance
Definition: MainWindow.cpp:18
#define msg(x)
Definition: auth_time.c:54
HWND hWnd
Definition: settings.c:17
@ Create
Definition: registry.c:563
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
#define RegCloseKey(hKey)
Definition: registry.h:49
HRESULT NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWORD dwstate=0)
Definition: csystray.cpp:237
BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID=0)
Definition: csystray.cpp:345
CComPtr< IOleCommandTarget > pctNetShell
Definition: csystray.h:27
VOID GetServicesEnabled()
Definition: csystray.cpp:37
HRESULT SysTrayThreadProc()
Definition: csystray.cpp:283
HRESULT ProcessIconMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: csystray.cpp:194
static void RunAccessCpl(PCSTR Parameters)
Definition: csystray.cpp:423
CSysTray()
Definition: csystray.cpp:28
HRESULT DestroySysTrayWindow()
Definition: csystray.cpp:313
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: csystray.cpp:330
BOOL IsServiceEnabled(DWORD dwServiceFlag)
Definition: csystray.cpp:99
HRESULT InitNetShell()
Definition: csystray.cpp:116
UINT wm_SHELLHOOK
Definition: csystray.h:32
DWORD dwServicesEnabled
Definition: csystray.h:31
HRESULT ShutdownIcons()
Definition: csystray.cpp:158
HRESULT UpdateIcons()
Definition: csystray.cpp:178
HRESULT InitIcons()
Definition: csystray.cpp:138
VOID EnableService(DWORD dwServiceFlag, BOOL bEnable)
Definition: csystray.cpp:66
HRESULT CreateSysTrayThread()
Definition: csystray.cpp:301
static void RunDll(PCSTR Dll, PCSTR Parameters)
Definition: csystray.cpp:413
HRESULT SysTrayMessageLoop()
Definition: csystray.cpp:266
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
Definition: csystray.cpp:324
HRESULT ShutdownNetShell()
Definition: csystray.cpp:127
virtual ~CSysTray()
Definition: csystray.cpp:33
static DWORD WINAPI s_SysTrayThreadProc(PVOID param)
Definition: csystray.cpp:260
void ConfigurePollTimer()
Definition: csystray.cpp:104
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
SysTrayIconHandlers_t g_IconHandlers[]
Definition: csystray.cpp:17
const int g_NumIcons
Definition: csystray.cpp:22
SysTrayIconHandlers_t g_StandaloneHandlers[]
Definition: csystray.cpp:24
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HRESULT STDMETHODCALLTYPE MouseKeys_Shutdown(_In_ CSysTray *pSysTray)
Definition: mouse.cpp:23
HRESULT STDMETHODCALLTYPE MouseKeys_Init(_In_ CSysTray *pSysTray)
Definition: mouse.cpp:15
HRESULT STDMETHODCALLTYPE MouseKeys_Update(_In_ CSysTray *pSysTray)
Definition: mouse.cpp:43
HRESULT STDMETHODCALLTYPE MouseKeys_Message(_In_ CSysTray *pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: mouse.cpp:127
HRESULT STDMETHODCALLTYPE Power_Message(_In_ CSysTray *pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: power.cpp:264
HRESULT STDMETHODCALLTYPE Power_Init(_In_ CSysTray *pSysTray)
Definition: power.cpp:149
HRESULT STDMETHODCALLTYPE Power_Shutdown(_In_ CSysTray *pSysTray)
Definition: power.cpp:165
HRESULT STDMETHODCALLTYPE Power_Update(_In_ CSysTray *pSysTray)
Definition: power.cpp:157
#define StickyKeys_Update(thisptr)
Definition: precomp.h:87
#define POLL_TIMER_ID
Definition: precomp.h:91
HRESULT STDMETHODCALLTYPE Volume_Init(_In_ CSysTray *pSysTray)
Definition: volume.cpp:136
HRESULT STDMETHODCALLTYPE Volume_Message(_In_ CSysTray *pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: volume.cpp:260
#define HOTPLUG_SERVICE_FLAG
Definition: precomp.h:39
HRESULT STDMETHODCALLTYPE Volume_Shutdown(_In_ CSysTray *pSysTray)
Definition: volume.cpp:199
#define MOUSE_SERVICE_FLAG
Definition: precomp.h:43
#define VOLUME_SERVICE_FLAG
Definition: precomp.h:40
HRESULT STDMETHODCALLTYPE Volume_Update(_In_ CSysTray *pSysTray)
Definition: volume.cpp:167
#define POWER_SERVICE_FLAG
Definition: precomp.h:38
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define CloseHandle
Definition: compat.h:739
#define MAX_PATH
Definition: compat.h:34
#define LoadLibraryW(x)
Definition: compat.h:747
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:65
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
VOID WINAPI FreeLibraryAndExitThread(HMODULE hLibModule, DWORD dwExitCode)
Definition: loader.c:507
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static const WCHAR Dll[]
Definition: register.c:83
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLfloat param
Definition: glext.h:5796
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
HRESULT STDMETHODCALLTYPE Hotplug_Init(_In_ CSysTray *pSysTray)
Definition: hotplug.cpp:124
HRESULT STDMETHODCALLTYPE Hotplug_Shutdown(_In_ CSysTray *pSysTray)
Definition: hotplug.cpp:145
HRESULT STDMETHODCALLTYPE Hotplug_Message(_In_ CSysTray *pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: hotplug.cpp:253
HRESULT STDMETHODCALLTYPE Hotplug_Update(_In_ CSysTray *pSysTray)
Definition: hotplug.cpp:139
ULONG AddRef()
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
HANDLE hThread
Definition: wizard.c:28
#define KEY_READ
Definition: nt_native.h:1023
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
#define KEY_WRITE
Definition: nt_native.h:1031
#define DWORD
Definition: nt_native.h:44
#define L(x)
Definition: ntvdm.h:50
@ COINIT_APARTMENTTHREADED
Definition: objbase.h:278
@ COINIT_DISABLE_OLE1DDE
Definition: objbase.h:280
#define PathAppendW
Definition: pathcch.h:309
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REGSTR_PATH_SYSTRAY
Definition: regstr.h:531
#define REG_DWORD
Definition: sdbapi.c:596
#define NIF_ICON
Definition: shellapi.h:107
#define NIF_MESSAGE
Definition: shellapi.h:106
#define Shell_NotifyIcon
Definition: shellapi.h:731
#define NIF_TIP
Definition: shellapi.h:108
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2529
HRESULT hr
Definition: shlfolder.c:183
#define _countof(array)
Definition: sndvol32.h:70
#define TRACE(s)
Definition: solgame.cpp:4
#define StringCchCopy
Definition: strsafe.h:139
PFNSTSHUTDOWN pfnShutdown
Definition: precomp.h:57
PFNSTMESSAGE pfnMessage
Definition: precomp.h:59
PFNSTUPDATE pfnUpdate
Definition: precomp.h:58
PFNSTINIT pfnInit
Definition: precomp.h:56
UINT uCallbackMessage
Definition: shellapi.h:232
DWORD dwStateMask
Definition: shellapi.h:240
CHAR szTip[128]
Definition: shellapi.h:238
Definition: inflate.c:139
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG
Definition: typedefs.h:59
int ret
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
#define GetSystemDirectory
Definition: winbase.h:3874
_In_ BOOL bEnable
Definition: winddi.h:3426
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define HKEY_CURRENT_USER
Definition: winreg.h:11
BOOL WINAPI DeregisterShellHookWindow(_In_ HWND)
#define SPI_SETSTICKYKEYS
Definition: winuser.h:1419
#define WM_CLOSE
Definition: winuser.h:1632
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define SPI_SETMOUSEKEYS
Definition: winuser.h:1415
#define WM_CREATE
Definition: winuser.h:1619
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI RegisterShellHookWindow(_In_ HWND)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_NCCREATE
Definition: winuser.h:1694
#define WM_SETTINGCHANGE
Definition: winuser.h:1640
#define GetMessage
Definition: winuser.h:5810
#define WM_TIMER
Definition: winuser.h:1753
#define SendMessage
Definition: winuser.h:5863
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
#define WM_NCDESTROY
Definition: winuser.h:1695
#define SW_SHOW
Definition: winuser.h:786
#define WM_DESTROY
Definition: winuser.h:1620
#define DispatchMessage
Definition: winuser.h:5785
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185