Print Page | Close Window

New Scroll Functions for CXTListCtrl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=129
Printed Date: 22 December 2024 at 10:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: New Scroll Functions for CXTListCtrl
Posted By: jwhagen
Subject: New Scroll Functions for CXTListCtrl
Date 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




Replies:
Posted By: kstowell
Date 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: http://forum.codejock.com/uploads/Administrator/ZB1_TestListCtrl.zip - ZB1_TestListCtrl.zip




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net