Go to the source code of this file.
◆ TrayIcon_AddIcon()
Definition at line 138 of file trayicon.c.
139{
141}
static BOOL TrayIcon_Update(_In_ DWORD dwMessage)
Referenced by OnCreate().
◆ TrayIcon_GetProcessorUsageIcon()
Definition at line 12 of file trayicon.c.
14{
22 int nLinesToDraw;
23 HBRUSH hBitmapBrush =
NULL;
25
26
28 if (!hScreenDC)
29 goto done;
30
31
34 goto done;
35
36
37
38
42 goto done;
43
45 if (!hBitmapBrush)
46 goto done;
47
48
49
50
51
53
54
55
56
57
58
59
60 nLinesToDraw = (CpuUsage + (CpuUsage / 10)) / 11;
62 rc.
top = 12 - nLinesToDraw;
65
66
67 if (nLinesToDraw)
69
70
71
72
73
76
80
82
83done:
84
85
86
87 if (hScreenDC)
91 if (hBitmapBrush)
95 if (hBitmapMask)
97
98
99 return hTrayIcon;
100}
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
HDC WINAPI GetDC(_In_opt_ HWND)
#define MAKEINTRESOURCEW(i)
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Referenced by TrayIcon_Update().
◆ TrayIcon_RemoveIcon()
Definition at line 143 of file trayicon.c.
144{
146
148
154
156}
BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW pnid)
Referenced by TaskManagerWndProc().
◆ TrayIcon_Update()
Definition at line 103 of file trayicon.c.
105{
106 static WCHAR szMsg[64] =
L"";
107
112
113 if (!*szMsg)
115
117
120
127
129
131
134
135 return bRetVal;
136}
#define IDS_MSG_TRAYICONCPUUSAGE
ULONG PerfDataGetProcessorUsage(void)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
static HICON TrayIcon_GetProcessorUsageIcon(_In_ ULONG CpuUsage)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI DestroyIcon(_In_ HICON)
Referenced by TrayIcon_AddIcon(), and TrayIcon_UpdateIcon().
◆ TrayIcon_UpdateIcon()