ReactOS 0.4.17-dev-966-gf06eace
csystray.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS system libraries
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Systray shell service object implementation
5 * COPYRIGHT: Copyright 2014-2015 David Quintana <gigaherz@gmail.com>
6 * Copyright 2017 Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
7 * Copyright 2026 Vitaly Orekhov <vkvo2000@vivaldi.net>
8 */
9
10#include "precomp.h"
11
12#include <mmddk.h>
13#include <regstr.h>
14#include <undocshell.h>
15#include <shellutils.h>
16#include <shlwapi.h>
17
22};
24
27};
28
29CSysTray::CSysTray() : dwServicesEnabled(0)
30{
32}
33
35{
36}
37
39{
40 HKEY hKey;
42
43 /* Enable power, volume and hotplug by default */
45
47 0,
48 NULL,
51 NULL,
52 &hKey,
54 {
55 dwSize = sizeof(DWORD);
57 L"Services",
58 NULL,
59 NULL,
61 &dwSize);
62
64 }
65}
66
68{
69 HKEY hKey;
70
71 if (bEnable)
72 this->dwServicesEnabled |= dwServiceFlag;
73 else
74 this->dwServicesEnabled &= ~dwServiceFlag;
75
78 0,
79 NULL,
82 NULL,
83 &hKey,
85 {
86 DWORD dwConfig = this->dwServicesEnabled & ~STANDALONESERVICEMASK;
88 L"Services",
89 0,
91 (LPBYTE)&dwConfig,
92 sizeof(dwConfig));
93
95 }
96
98}
99
101{
102 return (this->dwServicesEnabled & dwServiceFlag);
103}
104
106{
107 // FIXME: VOLUME_SERVICE_FLAG uses mixerOpen(CALLBACK_WINDOW) but the timer
108 // still has to be here because CORE-20778
109 // FIXME: POWER_SERVICE_FLAG should use WM_DEVICECHANGE, WM_POWERBROADCAST
110
111 DWORD fNeedsTimer = POWER_SERVICE_FLAG;
112 if (this->dwServicesEnabled & fNeedsTimer)
114 else
116}
117
119{
120 HRESULT hr = CoCreateInstance(CLSID_ConnectionTray, 0, 1u, IID_PPV_ARG(IOleCommandTarget, &pctNetShell));
121 if (FAILED(hr))
122 return hr;
123
124 return pctNetShell->Exec(&CGID_ShellServiceObject,
127}
128
130{
131 if (!pctNetShell)
132 return S_FALSE;
133 HRESULT hr = pctNetShell->Exec(&CGID_ShellServiceObject,
136 pctNetShell.Release();
137 return hr;
138}
139
141{
142 TRACE("Initializing Notification icons...\n");
143 for (UINT i = 0; i < g_NumIcons; i++)
144 {
145 if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag)
146 {
148 if (FAILED(hr))
149 return hr;
150 }
151 }
152 for (UINT i = 0; i < _countof(g_StandaloneHandlers); ++i)
153 {
155 }
156
157 return InitNetShell();
158}
159
161{
162 TRACE("Shutting down Notification icons...\n");
163 for (UINT i = 0; i < g_NumIcons; i++)
164 {
165 if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag)
166 {
167 this->dwServicesEnabled &= ~g_IconHandlers[i].dwServiceFlag;
170 }
171 }
172 for (UINT i = 0; i < _countof(g_StandaloneHandlers); ++i)
173 {
175 }
176
177 return ShutdownNetShell();
178}
179
181{
182 TRACE("Updating Notification icons...\n");
183 for (int i = 0; i < g_NumIcons; i++)
184 {
185 if (this->dwServicesEnabled & g_IconHandlers[i].dwServiceFlag)
186 {
188 if (FAILED(hr))
189 return hr;
190 }
191 }
192
193 return S_OK;
194}
195
197{
198 for (UINT i = 0; i < g_NumIcons; i++)
199 {
200 HRESULT hr = g_IconHandlers[i].pfnMessage(this, uMsg, wParam, lParam, lResult);
201 if (FAILED(hr))
202 return hr;
203 if (hr == S_OK)
204 return hr;
205 }
206 for (UINT i = 0; i < _countof(g_StandaloneHandlers); ++i)
207 {
208 HRESULT hr = g_StandaloneHandlers[i].pfnMessage(this, uMsg, wParam, lParam, lResult);
209 if (FAILED(hr))
210 return hr;
211 if (hr == S_OK)
212 return hr;
213 }
214
215 // Not handled by anyone, so return accordingly.
216 return S_FALSE;
217}
218
219/*++
220* @name NotifyIcon
221*
222* Basically a Shell_NotifyIcon wrapper.
223* Based on the parameters provided, it changes the current state of the notification icon.
224*
225* @param code
226* Determines whether to add, delete or modify the notification icon (represented by uId).
227* @param uId
228* Represents the particular notification icon.
229* @param hIcon
230* A handle to an icon for the notification object.
231* @param szTip
232* A string for the tooltip of the notification.
233* @param dwstate
234* Determines whether to show or hide the notification icon.
235*
236* @return The error code.
237*
238*--*/
240{
241 NOTIFYICONDATA nim = { 0 };
242
243 TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip);
244
245 nim.cbSize = sizeof(nim);
246 nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP;
247 nim.hIcon = hIcon;
248 nim.uID = uId;
249 nim.uCallbackMessage = uId;
250 nim.dwState = dwstate;
251 nim.dwStateMask = NIS_HIDDEN;
252 nim.hWnd = m_hWnd;
253 nim.uVersion = NOTIFYICON_VERSION;
254 if (szTip)
255 StringCchCopy(nim.szTip, _countof(nim.szTip), szTip);
256 else
257 nim.szTip[0] = 0;
258 BOOL ret = Shell_NotifyIcon(code, &nim);
259 return ret ? S_OK : E_FAIL;
260}
261
263{
264 CSysTray * st = (CSysTray*) param;
265 return st->SysTrayThreadProc();
266}
267
269{
270 BOOL ret;
271 MSG msg;
272
273 while ((ret = GetMessage(&msg, NULL, 0, 0)) != 0)
274 {
275 if (ret < 0)
276 break;
277
280 }
281
282 return S_OK;
283}
284
286{
287 WCHAR strFileName[MAX_PATH];
289 HMODULE hLib = LoadLibraryW(strFileName);
290
292
293 Create(NULL);
294
296
298
299 Release();
301}
302
304{
305 TRACE("CSysTray Init TODO: Initialize tray icon handlers.\n");
306 AddRef();
307
309
311
312 return S_OK;
313}
314
316{
317 if (!DestroyWindow())
318 {
319 // Window is from another thread, ask it politely to destroy itself:
321 }
322 return S_OK;
323}
324
325// *** IOleCommandTarget methods ***
326HRESULT STDMETHODCALLTYPE CSysTray::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
327{
329 return S_OK;
330}
331
332HRESULT STDMETHODCALLTYPE CSysTray::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
333{
334 if (!IsEqualGUID(*pguidCmdGroup, CGID_ShellServiceObject))
335 return E_FAIL;
336
337 switch (nCmdID)
338 {
339 case OLECMDID_NEW: // init
340 return CreateSysTrayThread();
341 case OLECMDID_SAVE: // shutdown
342 return DestroySysTrayWindow();
343 }
344 return S_OK;
345}
346
348{
349 HRESULT hr;
350
351 if (hWnd != m_hWnd)
352 return FALSE;
353
354 if (uMsg == wm_SHELLHOOK && wm_SHELLHOOK)
355 {
356 if (wParam == HSHELL_ACCESSIBILITYSTATE && lParam == ACCESS_STICKYKEYS)
357 {
358 StickyKeys_Update(this);
359 }
360 else if (wParam == HSHELL_ACCESSIBILITYSTATE && lParam == ACCESS_MOUSEKEYS)
361 {
362 MouseKeys_Update(this);
363 }
364 lResult = 0L;
365 return TRUE;
366 }
367
368 switch (uMsg)
369 {
370 case WM_NCCREATE:
371 case WM_NCDESTROY:
373 return FALSE;
374
375 case WM_CLOSE:
376 return DestroyWindow();
377
378 case WM_CREATE:
380 InitIcons();
383 return TRUE;
384
385 case WM_TIMER:
386 if (wParam == POLL_TIMER_ID)
387 UpdateIcons();
388 else
389 ProcessIconMessage(uMsg, wParam, lParam, lResult);
390 return TRUE;
391
392 case WM_SETTINGCHANGE:
394 StickyKeys_Update(this);
396 MouseKeys_Update(this);
397 break;
398
400 ProcessIconMessage(uMsg, wParam, lParam, lResult);
401 return TRUE;
402
403 case WM_DESTROY:
408 return TRUE;
409 }
410
411 TRACE("SysTray message received %u (%08p %08p)\n", uMsg, wParam, lParam);
412
413 hr = ProcessIconMessage(uMsg, wParam, lParam, lResult);
414 if (FAILED(hr))
415 return FALSE;
416
417 return (hr == S_OK);
418}
419
421{
422 WCHAR buf[400], rundll[MAX_PATH];
423 GetSystemDirectory(rundll, _countof(rundll));
424 PathAppendW(rundll, L"rundll32.exe");
425
426 wsprintfW(buf, L"%hs %hs%hs", "shell32.dll,Control_RunDLL", Dll, Parameters);
427 ShellExecuteW(NULL, NULL, rundll, buf, NULL, SW_SHOW);
428}
429
431{
432 RunDll("access.cpl", Parameters);
433}
#define IID_PPV_ARG(Itype, ppType)
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:239
BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID=0)
Definition: csystray.cpp:347
CComPtr< IOleCommandTarget > pctNetShell
Definition: csystray.h:26
VOID GetServicesEnabled()
Definition: csystray.cpp:38
HRESULT SysTrayThreadProc()
Definition: csystray.cpp:285
HRESULT ProcessIconMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: csystray.cpp:196
static void RunAccessCpl(PCSTR Parameters)
Definition: csystray.cpp:430
CSysTray()
Definition: csystray.cpp:29
HRESULT DestroySysTrayWindow()
Definition: csystray.cpp:315
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: csystray.cpp:332
BOOL IsServiceEnabled(DWORD dwServiceFlag)
Definition: csystray.cpp:100
HRESULT InitNetShell()
Definition: csystray.cpp:118
UINT wm_SHELLHOOK
Definition: csystray.h:31
DWORD dwServicesEnabled
Definition: csystray.h:30
HRESULT ShutdownIcons()
Definition: csystray.cpp:160
HRESULT UpdateIcons()
Definition: csystray.cpp:180
HRESULT InitIcons()
Definition: csystray.cpp:140
VOID EnableService(DWORD dwServiceFlag, BOOL bEnable)
Definition: csystray.cpp:67
HRESULT CreateSysTrayThread()
Definition: csystray.cpp:303
static void RunDll(PCSTR Dll, PCSTR Parameters)
Definition: csystray.cpp:420
HRESULT SysTrayMessageLoop()
Definition: csystray.cpp:268
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
Definition: csystray.cpp:326
HRESULT ShutdownNetShell()
Definition: csystray.cpp:129
virtual ~CSysTray()
Definition: csystray.cpp:34
static DWORD WINAPI s_SysTrayThreadProc(PVOID param)
Definition: csystray.cpp:262
void ConfigurePollTimer()
Definition: csystray.cpp:105
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
SysTrayIconHandlers_t g_IconHandlers[]
Definition: csystray.cpp:18
const int g_NumIcons
Definition: csystray.cpp:23
SysTrayIconHandlers_t g_StandaloneHandlers[]
Definition: csystray.cpp:25
#define E_FAIL
Definition: ddrawi.h:102
HRESULT hr
Definition: delayimp.cpp:582
#define ERROR_SUCCESS
Definition: deptool.c:10
_In_ HANDLE _In_ CONST PDXGKMDT_OPM_GET_INFO_PARAMETERS Parameters
Definition: dispmprt.h:321
#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:129
HRESULT STDMETHODCALLTYPE Volume_Message(_In_ CSysTray *pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult)
Definition: volume.cpp:253
#define HOTPLUG_SERVICE_FLAG
Definition: precomp.h:39
HRESULT STDMETHODCALLTYPE Volume_Shutdown(_In_ CSysTray *pSysTray)
Definition: volume.cpp:192
#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:160
#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
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
Definition: combase.c:2803
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define CloseHandle
Definition: compat.h:739
#define MAX_PATH
Definition: compat.h:34
#define LoadLibraryW(x)
Definition: compat.h:747
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
#define FAILED_UNEXPECTEDLY
Definition: utils.cpp:33
static const WCHAR Dll[]
Definition: register.c:83
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
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
unsigned int UINT
Definition: sysinfo.c:13
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
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
#define MM_MIXM_CONTROL_CHANGE
Definition: mmsystem.h:83
#define MM_MIXM_LINE_CHANGE
Definition: mmsystem.h:82
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
HANDLE hThread
Definition: wizard.c:28
#define KEY_READ
Definition: nt_native.h:1026
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1060
#define KEY_WRITE
Definition: nt_native.h:1034
#define DWORD
Definition: nt_native.h:44
@ COINIT_APARTMENTTHREADED
Definition: objbase.h:279
@ COINIT_DISABLE_OLE1DDE
Definition: objbase.h:281
#define PathAppendW
Definition: pathcch.h:310
short WCHAR
Definition: pedump.c:58
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
BOOL WINAPI DeregisterShellHookWindow(_In_ HWND)
#define SPI_SETSTICKYKEYS
Definition: winuser.h:1419
#define WM_CLOSE
Definition: winuser.h:1649
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define SPI_SETMOUSEKEYS
Definition: winuser.h:1415
#define WM_CREATE
Definition: winuser.h:1636
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:1711
#define WM_SETTINGCHANGE
Definition: winuser.h:1657
#define GetMessage
Definition: winuser.h:5956
#define WM_TIMER
Definition: winuser.h:1770
#define SendMessage
Definition: winuser.h:6009
UINT WINAPI RegisterWindowMessageW(_In_ LPCWSTR)
#define WM_NCDESTROY
Definition: winuser.h:1712
#define SW_SHOW
Definition: winuser.h:786
#define WM_DESTROY
Definition: winuser.h:1637
#define DispatchMessage
Definition: winuser.h:5931
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define REGSTR_PATH_SYSTRAY
Definition: regstr.h:531
#define REG_DWORD
Definition: sdbapi.c:615
#define NIF_ICON
Definition: shellapi.h:106
#define NIF_MESSAGE
Definition: shellapi.h:105
#define Shell_NotifyIcon
Definition: shellapi.h:744
#define NIF_TIP
Definition: shellapi.h:107
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2787
#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:231
DWORD dwStateMask
Definition: shellapi.h:239
CHAR szTip[128]
Definition: shellapi.h:237
Definition: inflate.c:139
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
const uint16_t * LPCWSTR
Definition: typedefs.h:57
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
#define GetSystemDirectory
Definition: winbase.h:3565
_In_ BOOL bEnable
Definition: winddi.h:3426
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define HKEY_CURRENT_USER
Definition: winreg.h:11