1

Topic: virtual WTL:: CListViewCtrl

Greetings to all,


In general a subject such, I use CListViewCtrl in the virtual mode (LVS_OWNERDATA), and as itself  (CCustomDraw).


At initialization of sheet I cause in it SetItemCountEx, installing an amount of lines which corresponds to my data in a vector.

Question actually such: whether there is a sense to transfer to sheet all data on demand of LVN_GETDISPINFO if all this business  in custom draw is possible?

2

Re: virtual WTL:: CListViewCtrl

Hello, Hayabusa, you wrote:

H> the Question actually such: whether there is a sense to transfer to sheet all data on demand of LVN_GETDISPINFO if all this business  in custom draw is possible?


For a long time in it was engaged, but how much I remember, if you completely draw both the text and an icon LVN_GETDISPINFO to you it is not necessary, it is necessary to do all in output agent NM_CUSTOMDRAW, there is enough  business, but in  all explicitly is painted and it is possible  the ready code from an example

E.g.
from here

3

Re: virtual WTL:: CListViewCtrl

Hello, alik_wn, you wrote:

_> For a long time in it was engaged, but how much I remember, if you completely draw both the text and an icon LVN_GETDISPINFO to you it is not necessary, it is necessary to do all in output agent NM_CUSTOMDRAW, there is enough  business, but in  all explicitly is painted and it is possible  the ready code from an example
_> e.g.
from here


Icons are not present, style of the table at sheet, yes to draw I that I know as, but for  thanks
smile
The question was  only in '  ' LVN_GETDISPINFO if this output agent is not necessary it is excellent

4

Re: virtual WTL:: CListViewCtrl

As a result, as it was clarified, even it does not turn out so what to transfer the data in the virtual sheet by means of LVN_GETDISPINFO, and thus completely most to draw sheet, taking thus the data from the sheet. It does not store even that  at a present situation.

I.e. the sheet at initialization by the data was drew normally, then conduct the mouse over , and all of them disappear, because LVN_GETDISPINFO is not caused any more, yet , and custom draw cannot receive the text from the sheet any more (blank lines are returned)

5

Re: virtual WTL:: CListViewCtrl

Hello, Hayabusa, you wrote:

H> As a result as it was clarified, even it does not turn out so what to transfer the data in the virtual sheet by means of LVN_GETDISPINFO, and thus completely most to draw sheet, taking thus the data from the sheet. It does not store even that  at a present situation.
H> I.e. the sheet at initialization by the data was drew normally, then conduct the mouse over , and all of them disappear, because LVN_GETDISPINFO is not caused any more, yet , and custom draw cannot receive the text from the sheet any more (blank lines are returned)


In it and sense of "the virtual sheet" - you set only
number , and all. Store a line, the data, draw them.

6

Re: virtual WTL:: CListViewCtrl

Hello, alik_wn, you wrote:

_> In it and sense of "the virtual sheet"  you set only
number , and all. Store a line, the data, draw them.


Well,  I understood
smile

7

Re: virtual WTL:: CListViewCtrl

Hello, Hayabusa, you wrote:

_>> In it and sense of "the virtual sheet"  you set only number , and all. Store a line, the data,
draw them.


Selected is superfluous.

The virtual sheet it is simple the data store, most  is informed an amount of elements.

If not to undertake special actions -  it (sheet) is engaged.

8

Re: virtual WTL:: CListViewCtrl

Hello, Evgeniy Skvortsov, you wrote:

ES> Selected is superfluous.
ES> the Virtual sheet it is simple the data store, most  is informed an amount of elements.
ES> If not to undertake special actions   it (sheet) is engaged.


Well means superfluous if I am primary and wanted it 
smile

Only 20 lines of the code in OnSubItemPrepaint, draw nothing sheet now.


http://i64.fastpic.ru/big/2014/0522/83/e5ed4644570e646d7476d5881da6fa83.png

9

Re: virtual WTL:: CListViewCtrl

Hello, Hayabusa, you wrote:

H> Well means superfluous if I am primary and wanted it 
smile


It means that that the virtual mode does not demand manual .


Simply at you other case: both the virtual mode and manual sorting.

They can be used both separately and together. These two modes are not connected in any way with each other.

10

Re: virtual WTL:: CListViewCtrl

Hello, Evgeniy Skvortsov, you wrote:

ES> it is simple at you other case: both the virtual mode and manual sorting.

Not, sorting at me precisely is not present
smile

11

Re: virtual WTL:: CListViewCtrl

Hello, Hayabusa, you wrote:

H> Hello, Evgeniy Skvortsov, you wrote:

ES>> it is simple at you other case: both the virtual mode and manual sorting.
H> Not, sortings at me precisely are not present
smile


Pancake, mistake quitted. I meant 
big_smile

12

Re: virtual WTL:: CListViewCtrl

Hello, Evgeniy Skvortsov, you wrote:

ES> a pancake, a mistake quitted. I meant 
big_smile


,  yes)