Changeset 5618 for trunk/src/shell32/systray.c
- Timestamp:
- Apr 28, 2001, 3:33:49 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/systray.c
r4121 r5618 1 /* $Id: systray.c,v 1.1 2000-08-30 13:53:01 sandervl Exp $ */2 1 /* 3 2 * Systray … … 10 9 * 11 10 */ 12 #ifdef __WIN32OS2__ 13 #define ICOM_CINTERFACE 1 14 #include <odin.h> 15 #else 11 12 #ifndef __WIN32OS2__ 16 13 #include <unistd.h> 17 14 #endif … … 19 16 #include <string.h> 20 17 21 #ifndef __WIN32OS2__ 22 #include "heap.h" 23 #endif 18 #include "winnls.h" 19 #include "shlobj.h" 24 20 #include "shellapi.h" 25 21 #include "shell32_main.h" 26 #include "windows.h"27 22 #include "commctrl.h" 28 23 #include "debugtools.h" 24 #include "heap.h" 29 25 #include "config.h" 30 26 31 DEFAULT_DEBUG_CHANNEL(shell) 27 DEFAULT_DEBUG_CHANNEL(shell); 32 28 33 29 typedef struct SystrayItem { … … 186 182 return FALSE; 187 183 #else 184 188 185 /* Initialize the window size. */ 189 186 rect.left = 0; … … 215 212 } 216 213 return TRUE; 217 #endif //__WIN32OS2__214 #endif 218 215 } 219 216 … … 221 218 static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem) 222 219 { 220 if(ptrayItem->notifyIcon.hIcon) 221 DestroyIcon(ptrayItem->notifyIcon.hIcon); 223 222 if(ptrayItem->hWndToolTip) 224 223 DestroyWindow(ptrayItem->hWndToolTip); … … 237 236 void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HICON hIcon) 238 237 { 239 ptrayItem->notifyIcon.hIcon = hIcon; /* do we need a copy? */238 ptrayItem->notifyIcon.hIcon = CopyIcon(hIcon); 240 239 InvalidateRect(ptrayItem->hWnd, NULL, TRUE); 241 240 } … … 346 345 347 346 /************************************************************************* 348 * Shell_NotifyIconA [SHELL32.297] 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 [SHELL32.29 7]369 * Shell_NotifyIconW [SHELL32.298] 371 370 */ 372 371 BOOL WINAPI Shell_NotifyIconW (DWORD dwMessage, PNOTIFYICONDATAW pnid ) … … 376 375 PNOTIFYICONDATAA p = HeapAlloc(GetProcessHeap(),0,sizeof(NOTIFYICONDATAA)); 377 376 memcpy(p, pnid, sizeof(NOTIFYICONDATAA)); 378 if (*(pnid->szTip)) 379 lstrcpynWtoA (p->szTip, pnid->szTip, 64 );377 WideCharToMultiByte( CP_ACP, 0, pnid->szTip, -1, p->szTip, sizeof(p->szTip), NULL, NULL ); 378 p->szTip[sizeof(p->szTip)-1] = 0; 380 379 381 380 ret = Shell_NotifyIconA(dwMessage, p ); … … 384 383 return ret; 385 384 } 386 387 /*************************************************************************388 * Shell_NotifyIcon [SHELL32.296]389 */390 BOOL WINAPI Shell_NotifyIcon(DWORD dwMessage, PNOTIFYICONDATAA pnid)391 {392 return Shell_NotifyIconA(dwMessage, pnid);393 }
Note:
See TracChangeset
for help on using the changeset viewer.