[STOBJECT] Don't hardcode variable type in sizeof.

This commit is contained in:
Hermès Bélusca-Maïto 2018-02-04 17:21:58 +01:00
parent a64c33e787
commit 4207397963
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 3 additions and 2 deletions

View file

@ -125,7 +125,7 @@ HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWO
TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon, szTip);
nim.cbSize = sizeof(NOTIFYICONDATA);
nim.cbSize = sizeof(nim);
nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP;
nim.hIcon = hIcon;
nim.uID = uId;

View file

@ -101,7 +101,8 @@ HRESULT EnumHotpluggedDevices(CSimpleArray<DEVINST> &devList)
HRESULT NotifyBalloon(CSysTray* pSysTray, LPCWSTR szTitle = NULL, LPCWSTR szInfo = NULL, UINT uId = ID_ICON_HOTPLUG)
{
NOTIFYICONDATA nim = { 0 };
nim.cbSize = sizeof(NOTIFYICONDATA);
nim.cbSize = sizeof(nim);
nim.uID = uId;
nim.hWnd = pSysTray->GetHWnd();