Unicodeformat for Header from Listview

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Tue Apr 9 15:49:26 CDT 2002


Hallo,

as the Header widget in Listview is created as unicode, we should set the
Codeformat to Unicode. I sent a patch for discussion some time ago. Mehmet
Yasar sent me examples (xnview,diskdata) that still showed
errors. They showed thatLISTVIEW_GetColumnT should care for the format too.

ChangeLog:
	wine/dlls/comctl32/listview.c: LISTVIEW_GetColumnT
	Care for the format of the string
	wine/dlls/comctl32/listview.c: LISTVIEW_Create
	Send HDM_SETUNICODEFORMAT meaage
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Free Software: If you contribute nothing, expect nothing
--
Index: wine/dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.125
diff -u -r1.125 listview.c
--- wine/dlls/comctl32/listview.c	20 Mar 2002 00:53:42 -0000	1.125
+++ wine/dlls/comctl32/listview.c	9 Apr 2002 20:38:17 -0000
@@ -7112,7 +7112,10 @@
     }
 
     /* set header item attributes */
-    bResult = Header_SetItemW(infoPtr->hwndHeader, nColumn, &hdi);
+    if (isW)
+      bResult = Header_SetItemW(infoPtr->hwndHeader, nColumn, &hdi);
+    else
+      bResult = Header_SetItemA(infoPtr->hwndHeader, nColumn, &hdi);
   }
   
   return bResult;
@@ -8001,6 +8004,9 @@
     WS_CHILD | HDS_HORZ | (DWORD)((LVS_NOSORTHEADER & lpcs->style)?0:HDS_BUTTONS), 
     0, 0, 0, 0, hwnd, (HMENU)0, 
     lpcs->hInstance, NULL);
+
+  /* set header unicode format */
+  SendMessageW(infoPtr->hwndHeader, HDM_SETUNICODEFORMAT,(WPARAM)TRUE,(LPARAM)NULL);
 
   /* set header font */
   SendMessageW(infoPtr->hwndHeader, WM_SETFONT, (WPARAM)infoPtr->hFont, 



More information about the wine-patches mailing list