mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:42:57 +00:00
potential memory problem fixed, obsolete assignment removed
svn path=/trunk/; revision=51346
This commit is contained in:
parent
a2b8986a0d
commit
706a9911e2
1 changed files with 3 additions and 5 deletions
|
@ -100,8 +100,6 @@ HICON TrayIcon_GetProcessorUsageIcon(void)
|
||||||
hOldBitmap = NULL;
|
hOldBitmap = NULL;
|
||||||
|
|
||||||
iconInfo.fIcon = TRUE;
|
iconInfo.fIcon = TRUE;
|
||||||
iconInfo.xHotspot = 0;
|
|
||||||
iconInfo.yHotspot = 0;
|
|
||||||
iconInfo.hbmMask = hBitmapMask;
|
iconInfo.hbmMask = hBitmapMask;
|
||||||
iconInfo.hbmColor = hBitmap;
|
iconInfo.hbmColor = hBitmap;
|
||||||
|
|
||||||
|
@ -133,7 +131,7 @@ BOOL TrayIcon_ShellAddTrayIcon(void)
|
||||||
NOTIFYICONDATAW nid;
|
NOTIFYICONDATAW nid;
|
||||||
HICON hIcon = NULL;
|
HICON hIcon = NULL;
|
||||||
BOOL bRetVal;
|
BOOL bRetVal;
|
||||||
WCHAR szMsg[256];
|
WCHAR szMsg[64];
|
||||||
|
|
||||||
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
|
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
|
||||||
|
|
||||||
|
@ -181,7 +179,7 @@ BOOL TrayIcon_ShellUpdateTrayIcon(void)
|
||||||
NOTIFYICONDATAW nid;
|
NOTIFYICONDATAW nid;
|
||||||
HICON hIcon = NULL;
|
HICON hIcon = NULL;
|
||||||
BOOL bRetVal;
|
BOOL bRetVal;
|
||||||
WCHAR szTemp[256];
|
WCHAR szTemp[64];
|
||||||
|
|
||||||
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
|
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
|
||||||
|
|
||||||
|
@ -193,7 +191,7 @@ BOOL TrayIcon_ShellUpdateTrayIcon(void)
|
||||||
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
|
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
|
||||||
nid.uCallbackMessage = WM_ONTRAYICON;
|
nid.uCallbackMessage = WM_ONTRAYICON;
|
||||||
nid.hIcon = hIcon;
|
nid.hIcon = hIcon;
|
||||||
LoadStringW(hInst, IDS_MSG_TRAYICONCPUUSAGE, szTemp, 256);
|
LoadStringW(hInst, IDS_MSG_TRAYICONCPUUSAGE, szTemp, sizeof(szTemp)/sizeof(szTemp[0]));
|
||||||
wsprintfW(nid.szTip, szTemp, PerfDataGetProcessorUsage());
|
wsprintfW(nid.szTip, szTemp, PerfDataGetProcessorUsage());
|
||||||
|
|
||||||
bRetVal = Shell_NotifyIconW(NIM_MODIFY, &nid);
|
bRetVal = Shell_NotifyIconW(NIM_MODIFY, &nid);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue