ListView multi-user mode?

ListView in Comtl32.dll v6.0 performs multiple selection (using the Shift key) as follows (x is selected)

00xxxx xxxxxx xxxx00 

Earlier versions of ListView do this as follows:

 00xx00 00xx00 00xx00 

Is there a way to do this in the first way (comctl32 v6.0 path)?

Thanks John

0
source share
1 answer

The short answer is no. But since it seems incomplete ...

ListView does not provide an API that allows you to change its selection behavior, and, as Hans puts it in his comment, the only way to change the behavior of the ListView control found in versions of comctl32. dll to version 6.0 with a time machine. There is a lot of unique behavior built into the ListView control regarding selection events, so even if you have to try and the owner draws a control to change the look of the selection behavior, you will suddenly encounter an almost ridiculous amount of window messages that can cause a change of choice.

It is also worth noting that this question is erroneous at a completely different level. If the user of your application has a version of Windows installed that includes version comctl32.dll up to version 6.0, this is the behavior that they expect from the ListView control. Overriding and changing this would be nothing more than confusing for them, because it would not work just like all the other ListView found on their computer. In contrast, if a user of your application uses a version of Windows that includes comctl32.dll v6 or later, the ListView control will already work by default. (And you should not want to change it for the same reasons.)

+2
source

Source: https://habr.com/ru/post/1277525/


All Articles