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