Listview Unicodification (take 3) (fwd)

Gerard Patel gerard.patel at nerim.net
Tue Jan 15 20:39:23 CST 2002


At 01:58 PM 1/15/02 -0500, you wrote:
>[once again, I attached the patch by mistake, and the mail did not go
>through...oh well, that happens if you don't sleep at night:) ]

I think that by zipping the patch it should be below 64K and
be fine.

>Here is the latest version of the Unicode ListView control:
>http://www.cs.toronto.edu/~dimi/listview-unicode-3.diff

Better - all columns have something now - but only
the first character.
This fixes it :

@@ -5075,7 +5076,14 @@
   else if (lpLVItem->mask & LVIF_TEXT)
   {
     if (internal) lpLVItem->pszText = *ppszText;
-    else textcpynT(lpLVItem->pszText, *ppszText, lpLVItem->cchTextMax, isW);
+    else
+    {
+       if (isW)
+          textcpynT(lpLVItem->pszText, *ppszText, lpLVItem->cchTextMax, isW);
+       else
+          WideCharToMultiByte(CP_ACP,0,*ppszText,-1,lpLVItem->pszText,
+                              lpLVItem->cchTextMax,NULL,NULL);
+    }
   }
 
   if (lpLVItem->iSubItem == 0)

I'll let you turn into something correct since it's now more than 2 in the
morning
and I need some sleep even if you don't.

Gerard





More information about the wine-devel mailing list