Unicode header control used by listview
bon at elektron.ikp.physik.tu-darmstadt.de
Fri Mar 29 15:04:23 CST 2002
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!
Switch header control charset to unicode
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Free Software: If you contribute nothing, expect nothing
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,
+ /* 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-devel