From: michelQA on
Hi,

I'm calling LVM_GETGROUPINFO message to retrieve Group information of
a ListView.

After getting LVGROUP structure filled with all the informations (it
work correctly) the Group Header text of the listview is changed for
garbage character like
"[]s".... The weird things is that I'm getting all LVGROUP struct
information correctly !?!?

It look to me like a charset problem, i try every charset possible and
the text in the interface always modifed to special characters.


Questions
=======
1- Why calling LVM_GETGROUPINFO can even change anything in the
information????????? it's not the Set fonction.... This make no sense
at all

2- in LVGROUP structure why the text items like pszheader use LPWSTR
instead of LPTSTR??
I have also a problem when trying to call LVM_GETGROUPINFO in app/
different thread... so I was wondering why the LPWSTR. My usual way
to build my pointer to string item like Text in LVITEM is not
working...there is something particular with groups info..

3- Is anybody have an idea of a workaround? Any way to refresh (not
repaint) the listview? this way the correct text will be displayed.

I'm calling this in a C# application but it's not really relevant
since I have no problem to call others msg like LVM_GETITEM etc.etc..

Thanks
From: michelQA on
I Finally figure it out :) The key is to not using .net conversion and
use IntPtr instead of string. Them convert IntPtr to string after
calling GetGroupInfo!




From: Timo Kunze on
michelQA schrieb:
> 2- in LVGROUP structure why the text items like pszheader use LPWSTR
> instead of LPTSTR??
Windows NT based systems use Unicode internally and Windows 9x based
systems, which use ANSI internally, don't support new features like list
view groups. Therefore messing around with TCHAR, LPTSTR and so on has
become obsolete, so there's no reason to use it for any new features.

Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."