mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
[STOBJECT] Fully zero-out the full NOTIFYICONDATA structure (it wasn't zeroed out correctly in MSVC build).
This commit is contained in:
@@ -121,11 +121,12 @@ HRESULT CSysTray::ProcessIconMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, LR
|
|||||||
*--*/
|
*--*/
|
||||||
HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWORD dwstate)
|
HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWORD dwstate)
|
||||||
{
|
{
|
||||||
NOTIFYICONDATA nim = { 0 };
|
NOTIFYICONDATA nim;
|
||||||
|
|
||||||
TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip);
|
TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip);
|
||||||
|
|
||||||
nim.cbSize = sizeof(NOTIFYICONDATA);
|
ZeroMemory(&nim, sizeof(nim));
|
||||||
|
nim.cbSize = sizeof(nim);
|
||||||
nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP;
|
nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP;
|
||||||
nim.hIcon = hIcon;
|
nim.hIcon = hIcon;
|
||||||
nim.uID = uId;
|
nim.uID = uId;
|
||||||
|
|||||||
@@ -100,8 +100,10 @@ HRESULT EnumHotpluggedDevices(CSimpleArray<DEVINST> &devList)
|
|||||||
*--*/
|
*--*/
|
||||||
HRESULT NotifyBalloon(CSysTray* pSysTray, LPCWSTR szTitle = NULL, LPCWSTR szInfo = NULL, UINT uId = ID_ICON_HOTPLUG)
|
HRESULT NotifyBalloon(CSysTray* pSysTray, LPCWSTR szTitle = NULL, LPCWSTR szInfo = NULL, UINT uId = ID_ICON_HOTPLUG)
|
||||||
{
|
{
|
||||||
NOTIFYICONDATA nim = { 0 };
|
NOTIFYICONDATA nim;
|
||||||
nim.cbSize = sizeof(NOTIFYICONDATA);
|
|
||||||
|
ZeroMemory(&nim, sizeof(nim));
|
||||||
|
nim.cbSize = sizeof(nim);
|
||||||
nim.uID = uId;
|
nim.uID = uId;
|
||||||
nim.hWnd = pSysTray->GetHWnd();
|
nim.hWnd = pSysTray->GetHWnd();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user