CListCtrl events

I am using CListCtrl,as I am going to show thousands of items in it.
So I want to show it in parts so that process will not slow down.
So if I will add first some items in ListCtrl then on scroll down event
next block likewise.But I couldn't see any scroll down event for this
ListCtrl in classwizard.So which event I can use for this process?
devayaniAsked:
Who is Participating?
 
naveenkohliConnect With a Mentor Commented:
devyani,
scroll messages are general windows messages applicable to scroll bars..

WM_HSCROLL
WM_VSCROLL

e.g. Look for these functions in online help....

ON_WM_VSCROLL()
0
 
shaigCommented:
Every window hase scroll bar events, the list control has nothing special about it.
0
 
devayaniAuthor Commented:
But I can't see it in classwizard.
0
 
SteveGTRCommented:
Here's the ticket:

1) Open class wizard
2) Goto Message map screen
3) Press Add Class button
4) Select New...
5) Give you class a name like CDynamicListCtrl
6) Select CListCtrl as base class
7) Goto member variables for your dialog
8) Select the CONTROL ID for your list control
9) Select Add variable
10) Give you variable a name like m_DynamicListCtrl
11) Select Control as Category
12) Select CDynamicListCtrl as Variable type
13) Select CDynamicListCtrl in the Class name of the Message Maps tab of the class wizard
14) Select the ON_WM_VSCROLL message
15) Include your CDynamicListCtrl in your dialog's header class
16) Add code for the OnVScroll in your CDynamicListCtrl class

Whew... That's it! To see that it is working, put a TRACE message in the scroll function.

Good Luck,
Steve
0
All Courses

From novice to tech pro — start learning today.