[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Unicode header control used by listview
From:       Uwe Bonnes <bon () elektron ! ikp ! physik ! tu-darmstadt ! de>
Date:       2002-03-29 21:04:23
[Download RAW message or body]

Hallo,

some application made from a zip archive "4957.exe", that uses the listview.c
sample from microsoft floating around since at least 1996, uses commctrl
headers and shows only the first letter of the text in the header tabs.

This is caused by (wine) listview.c creating the header windows as unicode,
but in the commctrl initialization the header class was registered as
ascii. When the header text is inserted, it is translated to unicode. When it
is read out for display, it is treated as  ascii, as the unicode flag of the
header control isn't set. So reading of only one character succeeds.

So either we set the header unicode-flag when creating the header control in
listview, or we register the header class as unicode. Appended patch
switches the charset after creating the control in listview.c. 

Does this sound right? Feedback welcome!

Changelog
	dlls/comctrl32/listview.c:  LISTVIEW_Create
	Switch header control charset to unicode

-- 
Uwe Bonnes                bon@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	29 Mar 2002 20:58:21 -0000
@@ -8002,6 +8002,9 @@
     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, 
                (LPARAM)TRUE);

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic