[PATCH] shell32: shlview: change some more A calls to W

Mikołaj Zalewski mikolaj at zalewski.pl
Wed Sep 26 00:58:31 CDT 2007


---
 dlls/shell32/shlview.c |   44 ++++++++++++++++++++++----------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 150778b..2452dd6 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -290,8 +290,8 @@ static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove)
 
 	TRACE("(%p)\n", This);
 
-	tmpstyle = GetWindowLongA(This->hWndList, GWL_STYLE);
-	SetWindowLongA(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove));
+	tmpstyle = GetWindowLongW(This->hWndList, GWL_STYLE);
+	SetWindowLongW(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove));
 }
 
 /**********************************************************
@@ -526,11 +526,11 @@ static int LV_FindItemByPidl(
 	IShellViewImpl * This,
 	LPCITEMIDLIST pidl)
 {
-	LVITEMA lvItem;
+	LVITEMW lvItem;
 	lvItem.iSubItem = 0;
 	lvItem.mask = LVIF_PARAM;
 	for(lvItem.iItem = 0;
-		SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem);
+		SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem);
 		lvItem.iItem++)
 	{
 	  LPITEMIDLIST currentpidl = (LPITEMIDLIST) lvItem.lParam;
@@ -548,7 +548,7 @@ static int LV_FindItemByPidl(
 */
 static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
 {
-	LVITEMA	lvItem;
+	LVITEMW	lvItem;
 
 	TRACE("(%p)(pidl=%p)\n", This, pidl);
 
@@ -556,9 +556,9 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
 	lvItem.iItem = ListView_GetItemCount(This->hWndList);	/*add the item to the end of the list*/
 	lvItem.iSubItem = 0;
 	lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl));				/*set the item's data*/
-	lvItem.pszText = LPSTR_TEXTCALLBACKA;			/*get text on a callback basis*/
+	lvItem.pszText = LPSTR_TEXTCALLBACKW;			/*get text on a callback basis*/
 	lvItem.iImage = I_IMAGECALLBACK;			/*get the image on a callback basis*/
-	return (-1==ListView_InsertItemA(This->hWndList, &lvItem))? FALSE: TRUE;
+	return (-1==ListView_InsertItemW(This->hWndList, &lvItem))? FALSE: TRUE;
 }
 
 /**********************************************************
@@ -580,7 +580,7 @@ static BOOLEAN LV_DeleteItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
 static BOOLEAN LV_RenameItem(IShellViewImpl * This, LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew )
 {
 	int nItem;
-	LVITEMA lvItem;
+	LVITEMW lvItem;
 
 	TRACE("(%p)(pidlold=%p pidlnew=%p)\n", This, pidlOld, pidlNew);
 
@@ -589,14 +589,14 @@ static BOOLEAN LV_RenameItem(IShellViewImpl * This, LPCITEMIDLIST pidlOld, LPCIT
 	{
 	  lvItem.mask = LVIF_PARAM;		/* only the pidl */
 	  lvItem.iItem = nItem;
-	  SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem);
+	  SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem);
 
 	  SHFree((LPITEMIDLIST)lvItem.lParam);
 	  lvItem.mask = LVIF_PARAM;
 	  lvItem.iItem = nItem;
 	  lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew));	/* set the item's data */
-	  SendMessageA(This->hWndList, LVM_SETITEMA, 0, (LPARAM) &lvItem);
-	  SendMessageA(This->hWndList, LVM_UPDATE, nItem, 0);
+	  SendMessageW(This->hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem);
+	  SendMessageW(This->hWndList, LVM_UPDATE, nItem, 0);
 	  return TRUE;					/* FIXME: better handling */
 	}
 	return FALSE;
@@ -719,8 +719,8 @@ static LRESULT ShellView_OnCreate(IShellViewImpl * This)
 * ShellView_BuildFileMenu()
 */
 static HMENU ShellView_BuildFileMenu(IShellViewImpl * This)
-{	CHAR	szText[MAX_PATH];
-	MENUITEMINFOA	mii;
+{	WCHAR	szText[MAX_PATH];
+	MENUITEMINFOW	mii;
 	int	nTools,i;
 	HMENU	hSubMenu;
 
@@ -734,7 +734,7 @@ static HMENU ShellView_BuildFileMenu(IShellViewImpl * This)
 	  /*add the menu items*/
 	  for(i = 0; i < nTools; i++)
 	  {
-	    LoadStringA(shell32_hInstance, Tools[i].idMenuString, szText, MAX_PATH);
+	    LoadStringW(shell32_hInstance, Tools[i].idMenuString, szText, MAX_PATH);
 
 	    ZeroMemory(&mii, sizeof(mii));
 	    mii.cbSize = sizeof(mii);
@@ -752,7 +752,7 @@ static HMENU ShellView_BuildFileMenu(IShellViewImpl * This)
 	      mii.fType = MFT_SEPARATOR;
 	    }
 	    /* tack This item onto the end of the menu */
-	    InsertMenuItemA(hSubMenu, (UINT)-1, TRUE, &mii);
+	    InsertMenuItemW(hSubMenu, (UINT)-1, TRUE, &mii);
 	  }
 	}
 	TRACE("-- return (menu=%p)\n",hSubMenu);
@@ -808,7 +808,7 @@ static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu)
 */
 static UINT ShellView_GetSelections(IShellViewImpl * This)
 {
-	LVITEMA	lvItem;
+	LVITEMW	lvItem;
 	UINT	i = 0;
 
 	SHFree(This->apidl);
@@ -827,7 +827,7 @@ static UINT ShellView_GetSelections(IShellViewImpl * This)
 	  lvItem.iItem = 0;
 	  lvItem.iSubItem = 0;
 
-	  while(ListView_GetItemA(This->hWndList, &lvItem) && (i < This->cidl))
+	  while(ListView_GetItemW(This->hWndList, &lvItem) && (i < This->cidl))
 	  {
 	    if(lvItem.state & LVIS_SELECTED)
 	    {
@@ -1978,7 +1978,7 @@ static HRESULT WINAPI IShellView_fnSelectItem(
 
 	if (i != -1)
 	{
-	  LVITEMA lvItem;
+	  LVITEMW lvItem;
 
 	  if(uFlags & SVSI_ENSUREVISIBLE)
 	    SendMessageW(This->hWndList, LVM_ENSUREVISIBLE, i, 0);
@@ -1988,7 +1988,7 @@ static HRESULT WINAPI IShellView_fnSelectItem(
 	  lvItem.iItem = 0;
 	  lvItem.iSubItem = 0;
 
-          while(SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem))
+          while(SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem))
 	  {
 	    if (lvItem.iItem == i)
 	    {
@@ -2005,7 +2005,7 @@ static HRESULT WINAPI IShellView_fnSelectItem(
 	      if (uFlags & SVSI_DESELECTOTHERS)
 	        lvItem.state &= ~LVIS_SELECTED;
 	    }
-	    SendMessageA(This->hWndList, LVM_SETITEMA, 0, (LPARAM) &lvItem);
+	    SendMessageW(This->hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem);
 	    lvItem.iItem++;
 	  }
 
@@ -2211,7 +2211,7 @@ static HRESULT drag_notify_subitem(IShellViewImpl *This, DWORD grfKeyState, POIN
     DWORD *pdwEffect)
 {
     LVHITTESTINFO htinfo;
-    LVITEMA lvItem;
+    LVITEMW lvItem;
     LONG lResult;
     HRESULT hr;
     RECT clientRect;
@@ -2269,7 +2269,7 @@ static HRESULT drag_notify_subitem(IShellViewImpl *This, DWORD grfKeyState, POIN
         lvItem.mask = LVIF_PARAM;
         lvItem.iItem = lResult;
         lvItem.iSubItem = 0;
-        SendMessageA(This->hWndList, LVM_GETITEMA, 0, (LPARAM) &lvItem);
+        SendMessageW(This->hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem);
 
         /* ... and bind pCurDropTarget to the IDropTarget interface of an UIObject of this object */
         hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWndList, 1,
-- 
1.4.4.2


--------------090001010306010203040706--



More information about the wine-patches mailing list