Thanks a lot Tom, appreciated.
I should be using ON_NOTIFY as you suggested and it does seem to work.
Sorry about ON_GETDISPINFO, it was just a typo, I meant LVS_GETDISPINFO.
One thing I observed was that the list control flickers.
automatically scrolled.
Hi Gary,
I sent you email with what I think is going on in your process. If so it
will be easy to fix. I think you need to use ON_NOTIFY() rather than
ON_NOTIFY_REFLECT() in this case. I don't think there is such a thing as
ON_GETDISPINFO, but you would use the form:
ON_NOTIFY(LVN_GETDISPINFO, IDC_LIST1, OnGetItemInfo)
The control on the dialog will notify the dialog (where the handler
lives)
when it needs data to display in a line.
As I mentioned in my email you can also add the handler in the properties
window to have it set all this up for you. You just have open the
dialog,
select it, then click the little lightning bolt icon on the top of the
properties window. From there you can open the tree for the list control
and hook into all kinds of notification messages and it will set up the
code
for you (at least the functions, you have to fill in what you want to do
in
the functions of course).
FWIW, once you have this set up it will be really easy for you to extend
it
and use this idea in other programs. It's just doggone learning curve
thing.
Hope that helps,
Tom
"Gary" <Gary@discussions.microsoft.com> wrote in message
news:CDD2142F-71A4-41F8-AF94-DC531222AEC3@microsoft.com...
I guess my OnGetItemInfo() function corresponding to the ON_GETDISPINFO
macro
is never geting called ?
If so then why would that be happening ?
Thanks,
Gary
"Gary" wrote:
Ok, resolved the issue by setting the Owner Data to "true" through the
Properties window, I guess that is the way to do it, setting extended
style
won't work.
But now my virtual list control doesn't display anything.
I did add a method corresponding to the macro:
ON_NOTIFY_REFLECT( LVN_GETDISPINFO, OnGetItemInfo )
Do I need to do anything else ?