dlls/shell32 W->A cleanup of systray.c

Marcelo Duarte wine-devel at bol.com.br
Wed Jun 30 15:23:25 CDT 2004


Danny Hawkins wrote:

>Hi,
>
>Converted all wide-char->ansi calls to ansi->wide-char in systray.c
>
>  
>
The TTM_UPDATETIPTEXTA should be converted to TTM_UPDATETIPTEXTW and 
TTM_ADDTOOLA -> TTM_ADDTOOLW

>@@ -272,13 +272,13 @@
>   ti.rect.bottom = ICON_SIZE+2*ICON_BORDER;
> 
>   if(modify)
>-    SendMessageA(ptrayItem->hWndToolTip, TTM_UPDATETIPTEXTA, 0, (LPARAM)&ti);
>+    SendMessageW(ptrayItem->hWndToolTip, TTM_UPDATETIPTEXTA, 0, (LPARAM)&ti);
>   else
>-    SendMessageA(ptrayItem->hWndToolTip, TTM_ADDTOOLA, 0, (LPARAM)&ti);
>+    SendMessageW(ptrayItem->hWndToolTip, TTM_ADDTOOLA, 0, (LPARAM)&ti);
> }
>  
>
Here, you should'nt cast (WCHAR *)"". Please define:
static const WCHAR emptyW[] = {0};
Or modify the function to accept NULL.

>@@ -297,15 +297,15 @@
>   (*ptrayItem)->notifyIcon.hWnd = pnid->hWnd; /* only needed for callback message */
>   SYSTRAY_ItemSetIcon   (*ptrayItem, (pnid->uFlags&NIF_ICON)   ?pnid->hIcon           :0);
>   SYSTRAY_ItemSetMessage(*ptrayItem, (pnid->uFlags&NIF_MESSAGE)?pnid->uCallbackMessage:0);
>-  SYSTRAY_ItemSetTip    (*ptrayItem, (pnid->uFlags&NIF_TIP)    ?pnid->szTip           :"", FALSE);
>+  SYSTRAY_ItemSetTip    (*ptrayItem, (pnid->uFlags&NIF_TIP)    ?pnid->szTip           :(WCHAR *)"", FALSE);
> 
>
The old code should be eliminated, not commented:

>+/*{
>   BOOL flag=FALSE;
>   TRACE("enter %p %d %ld\n", pnid->hWnd, pnid->uID, dwMessage);
>   switch(dwMessage) {
>@@ -377,13 +390,30 @@
>   }
>   TRACE("leave %p %d %ld=%d\n", pnid->hWnd, pnid->uID, dwMessage, flag);
>   return flag;
>-}
>+}*/
> 
>  
>

>+/*{
> 	BOOL ret;
> 
> 	PNOTIFYICONDATAA p = HeapAlloc(GetProcessHeap(),0,sizeof(NOTIFYICONDATAA));
>@@ -395,4 +425,4 @@
> 
> 	HeapFree(GetProcessHeap(),0,p);
> 	return ret;
>-}
>+}*/
>  
>




More information about the wine-devel mailing list