mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +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;
|
||||
|
||||
iconInfo.fIcon = TRUE;
|
||||
iconInfo.xHotspot = 0;
|
||||
iconInfo.yHotspot = 0;
|
||||
iconInfo.hbmMask = hBitmapMask;
|
||||
iconInfo.hbmColor = hBitmap;
|
||||
|
||||
|
@ -133,7 +131,7 @@ BOOL TrayIcon_ShellAddTrayIcon(void)
|
|||
NOTIFYICONDATAW nid;
|
||||
HICON hIcon = NULL;
|
||||
BOOL bRetVal;
|
||||
WCHAR szMsg[256];
|
||||
WCHAR szMsg[64];
|
||||
|
||||
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
|
||||
|
||||
|
@ -181,7 +179,7 @@ BOOL TrayIcon_ShellUpdateTrayIcon(void)
|
|||
NOTIFYICONDATAW nid;
|
||||
HICON hIcon = NULL;
|
||||
BOOL bRetVal;
|
||||
WCHAR szTemp[256];
|
||||
WCHAR szTemp[64];
|
||||
|
||||
memset(&nid, 0, sizeof(NOTIFYICONDATAW));
|
||||
|
||||
|
@ -193,7 +191,7 @@ BOOL TrayIcon_ShellUpdateTrayIcon(void)
|
|||
nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
|
||||
nid.uCallbackMessage = WM_ONTRAYICON;
|
||||
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());
|
||||
|
||||
bRetVal = Shell_NotifyIconW(NIM_MODIFY, &nid);
|
||||
|
|
Loading…
Reference in a new issue