Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - New Scroll Functions for CXTListCtrl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

New Scroll Functions for CXTListCtrl

 Post Reply Post Reply
Author
Message
jwhagen View Drop Down
Groupie
Groupie
Avatar

Joined: 09 May 2003
Location: United States
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwhagen Quote  Post ReplyReply Direct Link To This Post Topic: New Scroll Functions for CXTListCtrl
    Posted: 12 August 2003 at 8:03am

I'm still working with my new program and the CListCtrl class. I have found a need to be able to scroll and position the List, hence the suggested additions below:

//

// Place in XTListCtrl.h

//

virtual void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);

virtual void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);

//

//Place in XTListCtrl.cpp

//

void CXTListCtrlBase::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)

{

m_pListCtrl->OnVScroll(nSBCode, nPos, pScrollBar);

}

void CXTListCtrlBase::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)

{

m_pListCtrl->OnHScroll(nSBCode, nPos, pScrollBar);

}

Thanks!

John Hagen

Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post Posted: 02 November 2003 at 12:51pm

Hi John,

You should be able to just derive a class from CXTListCtrl and handle your OnScroll events there.  I have attached a sample class to show how to do this.

Cheers,
Codejock Support

Download: ZB1_TestListCtrl.zip

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.