Changeset 6650 for trunk/src/shell32/systray.c
- Timestamp:
- Sep 5, 2001, 3:54:53 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/systray.c
r5618 r6650 1 /* $Id: systray.c,v 1.3 2001-09-05 13:47:01 bird Exp $ */ 1 2 /* 2 * 3 * Systray 3 4 * 4 * Copyright 1999 Kai Morich<kai.morich@bigfoot.de>5 * Copyright 1999 Kai Morich <kai.morich@bigfoot.de> 5 6 * 6 7 * Manage the systray window. That it actually appears in the docking … … 66 67 while (ptrayItem) { 67 68 if (ptrayItem->hWnd==hWnd) { 68 69 70 71 72 73 74 75 76 77 69 if (ptrayItem->notifyIcon.hIcon) { 70 hdc = BeginPaint(hWnd, &ps); 71 GetClientRect(hWnd, &rc); 72 if (!DrawIconEx(hdc, rc.left+ICON_BORDER, rc.top+ICON_BORDER, ptrayItem->notifyIcon.hIcon, 73 ICON_SIZE, ICON_SIZE, 0, 0, DI_DEFAULTSIZE|DI_NORMAL)) { 74 ERR("Paint(SystrayWindow 0x%08x) failed -> removing SystrayItem %p\n", hWnd, ptrayItem); 75 SYSTRAY_Delete(&ptrayItem->notifyIcon); 76 } 77 } 78 break; 78 79 } 79 80 ptrayItem = ptrayItem->nextTrayItem; … … 119 120 while (ptrayItem) { 120 121 if (ptrayItem->hWnd == hWnd) { 121 122 if (ptrayItem->notifyIcon.hWnd && ptrayItem->notifyIcon.uCallbackMessage) { 122 123 if (!PostMessageA(ptrayItem->notifyIcon.hWnd, ptrayItem->notifyIcon.uCallbackMessage, 123 124 (WPARAM)ptrayItem->notifyIcon.uID, (LPARAM)message)) { 124 ERR("PostMessage(SystrayWindow 0x%08x) failed -> removing SystrayItem %p\n", hWnd, ptrayItem); 125 SYSTRAY_Delete(&ptrayItem->notifyIcon); 126 } 125 ERR("PostMessage(SystrayWindow 0x%08x) failed -> removing SystrayItem %p\n", hWnd, ptrayItem); 126 SYSTRAY_Delete(&ptrayItem->notifyIcon); 127 127 } 128 break; 128 } 129 break; 129 130 } 130 131 ptrayItem = ptrayItem->nextTrayItem; … … 219 220 { 220 221 if(ptrayItem->notifyIcon.hIcon) 221 DestroyIcon(ptrayItem->notifyIcon.hIcon); 222 DestroyIcon(ptrayItem->notifyIcon.hIcon); 222 223 if(ptrayItem->hWndToolTip) 223 224 DestroyWindow(ptrayItem->hWndToolTip); … … 345 346 346 347 /************************************************************************* 347 * Shell_NotifyIconA 348 * Shell_NotifyIconA [SHELL32.297][SHELL32.296] 348 349 */ 349 350 BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) … … 367 368 368 369 /************************************************************************* 369 * Shell_NotifyIconW 370 * Shell_NotifyIconW [SHELL32.298] 370 371 */ 371 372 BOOL WINAPI Shell_NotifyIconW (DWORD dwMessage, PNOTIFYICONDATAW pnid ) 372 373 { 373 374 375 376 374 BOOL ret; 375 376 PNOTIFYICONDATAA p = HeapAlloc(GetProcessHeap(),0,sizeof(NOTIFYICONDATAA)); 377 memcpy(p, pnid, sizeof(NOTIFYICONDATAA)); 377 378 WideCharToMultiByte( CP_ACP, 0, pnid->szTip, -1, p->szTip, sizeof(p->szTip), NULL, NULL ); 378 379 p->szTip[sizeof(p->szTip)-1] = 0; 379 380 380 381 382 383 384 } 381 ret = Shell_NotifyIconA(dwMessage, p ); 382 383 HeapFree(GetProcessHeap(),0,p); 384 return ret; 385 }
Note:
See TracChangeset
for help on using the changeset viewer.