Discussion:
how do I check if my version of SysListView32 supports groups ?
(too old to reply)
R.Wieser
2022-07-15 17:19:46 UTC
Permalink
Hello all,

I've got a Listview in report mode in which I would like to show/hide
certain rows on the press of a buttom. It looks like I can create two
groups, one visible and one hidden, and than just change the group ID of a
row to assign it to the visible or hidden group (correct me if I'm wrong in
that regard please).

The problem is that I can't get it to work, and I'm not sure if my version
of ComCtl32 is high enough to support groups.

MSDN states that I need at least v6. Looking at the DLLs properties ->
version I see both a "File version" of 5.82 and a "Product version" of
6.00.xxx. I'm not at all sure which of the two I should be looking at. :-(

Remark: I've tried to enable groups using LVM_ENABLEGROUPVIEW, but no matter
if I enable or disable it (wParam being either 1 or 0) I'm getting a Zero
result back. Which is good if the function exists (though than why zero in
both cases?), but could as well be an indication of "sorry, nothing here to
handle that message" (IOW, badly choosen result values).

tl;dr:
Should I look at the "file" or "product" version, and/or how do I check if
my version of ComCtl32.dll supports groups ?

Regards,
Rudy Wieser
Christian Astor
2022-07-21 11:46:00 UTC
Permalink
Post by R.Wieser
Hello all,
I've got a Listview in report mode in which I would like to show/hide
certain rows on the press of a buttom. It looks like I can create two
groups, one visible and one hidden, and than just change the group ID of a
row to assign it to the visible or hidden group (correct me if I'm wrong in
that regard please).
The problem is that I can't get it to work, and I'm not sure if my version
of ComCtl32 is high enough to support groups.
MSDN states that I need at least v6.
As MSDN says it needs v6, you must force v6, for example in the code, at
beginning :

#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
R.Wieser
2022-07-21 13:24:15 UTC
Permalink
Christian,
Post by Christian Astor
As MSDN says it needs v6, you must force v6, for example in the code, at
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
language='*'\"")
That won't help if I do not have a version '6.0.0.0' available - which is
what I'm currently try to figure out.

Also, that specific addition won't work for my programming language of
choice (it doesn't have a "c" in it). I would need to write an
'Application manifest' by hand. And I'm not even /thinking/ of putting
effort into doing that before knowing that the DLL I want to have loaded
actually exists on my 'puter.

Regards,
Rudy Wieser
JJ
2022-07-22 05:19:35 UTC
Permalink
Post by R.Wieser
Christian,
Post by Christian Astor
As MSDN says it needs v6, you must force v6, for example in the code, at
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
language='*'\"")
That won't help if I do not have a version '6.0.0.0' available - which is
what I'm currently try to figure out.
Also, that specific addition won't work for my programming language of
choice (it doesn't have a "c" in it). I would need to write an
'Application manifest' by hand. And I'm not even /thinking/ of putting
effort into doing that before knowing that the DLL I want to have loaded
actually exists on my 'puter.
Regards,
Rudy Wieser
In the web development field, there's a good advice that recommends
developers not to check the web browser version number. But instead, to
check the needed features themselves.

In this case, make sure the module is COMCTL32 v6 enabled by including the
manifest, then try to switch the display mode to grouped and check the
result. FYI, the manifest is not optional if COMCTL32 v6 features are
needed.
R.Wieser
2022-07-22 06:56:38 UTC
Permalink
JJ,
Post by JJ
In the web development field, there's a good advice that recommends
developers not to check the web browser version number. But instead, to
check the needed features themselves.
Great. So, what function do I call to see if my DLL has got the "group
view" feature available (as in my subject line) ? :-)
Post by JJ
In this case, make sure the module is COMCTL32 v6 enabled by including
the manifest,
AFAI now CS that would be enough, as it looks like that the OS will abort
loading the program if the specified DLL is not available.
Post by JJ
then try to switch the display mode to grouped and check the result.
The result can either be zero when :

1) the LVM_ENABLEGROUPVIEW message is not handled.

-or-

2) "The ability to display list-view items as a group is already enabled or
disabled."

Yes, I know I can send that LVM_ENABLEGROUPVIEW a few times with a different
argument and compare the results (I mentioned that method in my initial
message). Its just that to me that has got a "hack" smell. :-(

Currently I've arrived at the below findings :

My by default loaded comctl32 DLL is v5.82. I've found that XPsp3 actually
does have a v6 available, which loading can be forced by using a manifest.
Due to the loading of a specific version DLL (with known features) manual
checking isn't needed anymore.

Regards,
Rudy Wieser

Loading...