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(a)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);