home *** CD-ROM | disk | FTP | other *** search
- // cktblctr.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "demotbl.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
-
- IMPLEMENT_DYNAMIC( CDemoTableControl, CCKTBLControl )
-
- /////////////////////////////////////////////////////////////////////////////
- // CCKTBLControl
-
- CDemoTableControl::CDemoTableControl()
- {
- m_GrowHorizontal = FALSE;
- m_GrowVertical = FALSE;
- }
-
- CDemoTableControl::~CDemoTableControl()
- {
- }
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CCKTBLControl Message Map
-
-
- BEGIN_MESSAGE_MAP(CDemoTableControl, CCKTBLControl)
- //{{AFX_MSG_MAP(CDemoTableControl)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CCKTBLControl overridables (default implementations)
-
-
- //-----------------------------------------------------------------------------------
- // Overridables that provide hooks for dynamically extending the table
- // when the user scrolls over the bounds
-
- void CDemoTableControl::OnHScrollBegin()
- {
- // called when use tries to scroll to the left of the leftmost column
- // i.e. user presses cursor left in the leftmost column
- }
- void CDemoTableControl::OnHScrollEnd()
- {
- // called when use tries to scroll to the right of the rightmost column
- // i.e. user presses cursor right in the rightmost column
-
- if( m_GrowHorizontal ) {
- InsertColumnsAfter( GetColumns(), 4 );
- }
-
- }
-
- void CDemoTableControl::OnVScrollBegin()
- {
- // called when use tries to scroll above first row
- // i.e. user presses cursor up in the first row
- }
-
- void CDemoTableControl::OnVScrollEnd()
- {
- // called when use tries to scroll below the last row
- // i.e. user presses cursor right in the last row
-
- if( m_GrowVertical ) {
- InsertRowsAfter( GetRows(), 4 );
- }
-
- }
-
-
-
-