• how do I check if my version of SysListView32 supports groups ?

    From R.Wieser@21:1/5 to All on Fri Jul 15 19:19:46 2022
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Astor@21:1/5 to All on Thu Jul 21 13:46:00 2022
    R.Wieser a écrit :
    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='*'\"")

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Thu Jul 21 15:24:15 2022
    Christian,

    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='*'\"")

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to R.Wieser on Fri Jul 22 12:19:35 2022
    On Thu, 21 Jul 2022 15:24:15 +0200, R.Wieser wrote:
    Christian,

    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='*'\"")

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Fri Jul 22 08:56:38 2022
    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) ? :-)

    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.

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)