PageGrid.cpp
上传用户:sesekoo
上传日期:2020-07-18
资源大小:21543k
文件大小:151k
- CExtGridCellPercentage * pCellPercentage7 =
- STATIC_DOWNCAST(
- CExtGridCellPercentage,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellPercentage7->_VariantAssign( 0.01 );
- CExtGridCellPercentage * pCellPercentage8 =
- STATIC_DOWNCAST(
- CExtGridCellPercentage,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellPercentage8->_VariantAssign( 0.005 );
- pCellPercentage2->SetPercentSignPos( 0 );
- CExtGridCellPercentage * pCellPercentage9 =
- STATIC_DOWNCAST(
- CExtGridCellPercentage,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellPercentage9->_VariantAssign( -0.002 );
- pCellPercentage9->SetPercentSignPos( 1 );
- }
- void CPageGrid::_InitColumnVariant( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellVariant * pCellVariant =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellVariant)
- )
- );
- pCellVariant->ModifyStyle( __EGCS_BUTTON_UPDOWN );
- }
- CExtGridCellVariant * pCellVariant0 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellVariant0->_VariantAssign( 12345, VT_I4 );
- CExtGridCellVariant * pCellVariant1 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellVariant1->_VariantAssign( 12345.12345, VT_R8 );
- CExtGridCellVariant * pCellVariant2 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- COleCurrency curA( 4, 500 ); // value: 4.0500
- pCellVariant2->_VariantAssign( curA );
- CExtGridCellVariant * pCellVariant3 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellVariant3->_VariantAssign( DATE( COleDateTime::GetCurrentTime() ), VT_DATE );
- CExtGridCellVariant * pCellVariant4 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- USES_CONVERSION;
- //BSTR bstrCopy = ::SysAllocString( T2COLE(_T("BSTR String")) );
- // pCellVariant4->_VariantAssign( bstrCopy, VT_BSTR );
- pCellVariant4->_VariantClear(false);
- pCellVariant4->vt = VT_BSTR;
- pCellVariant4->bstrVal = ::SysAllocString( T2COLE(_T("BSTR String")) );
- CExtGridCellVariant * pCellVariant5 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellVariant5->_VariantAssign( true );
- CExtGridCellVariant * pCellVariant6 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellVariant6->_VariantAssign( USHORT(65535) );
- CExtGridCellVariant * pCellVariant7 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellVariant7->_VariantAssign( FLOAT(-345.85) );
- CExtGridCellVariant * pCellVariant8 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellVariant8->_VariantAssign( signed char(-128) );
- CExtGridCellVariant * pCellVariant9 =
- STATIC_DOWNCAST(
- CExtGridCellVariant,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellVariant9->_VariantAssign( unsigned char(255) );
- }
- void CPageGrid::_InitColumnUpDown( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellUpDown * pCellUpDown =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellUpDown)
- )
- );
- UNREFERENCED_PARAMETER(pCellUpDown);
- }
- CExtGridCellUpDown * pCellUpDown0 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellUpDown0->_VariantAssign( 12345, VT_I4 );
- CExtGridCellUpDown * pCellUpDown1 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellUpDown1->_VariantAssign( 12345.12345, VT_R8 );
- CExtGridCellUpDown * pCellUpDown2 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- COleCurrency curA( 4, 500 ); // value: 4.0500
- pCellUpDown2->_VariantAssign( curA );
- CExtGridCellUpDown * pCellUpDown3 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellUpDown3->_VariantAssign( 555 );
- CExtGridCellUpDown * pCellUpDown4 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellUpDown4->_VariantAssign( -555 );
- CExtGridCellUpDown * pCellUpDown5 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellUpDown5->_VariantAssign( true );
- CExtGridCellUpDown * pCellUpDown6 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellUpDown6->_VariantAssign( USHORT(65535) );
- CExtGridCellUpDown * pCellUpDown7 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellUpDown7->_VariantAssign( FLOAT(-345.85) );
- CExtGridCellUpDown * pCellUpDown8 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellUpDown8->_VariantAssign( signed char(-128) );
- CExtGridCellUpDown * pCellUpDown9 =
- STATIC_DOWNCAST(
- CExtGridCellUpDown,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellUpDown9->_VariantAssign( unsigned char(255) );
- }
- void CPageGrid::_InitColumnPicture( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellPicture * pCellPicture =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellPicture)
- )
- );
- UNREFERENCED_PARAMETER(pCellPicture);
- }
- CExtBitmap * pBmp = NULL;
- CExtGridCellPicture * pCellPicture0 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pBmp = pCellPicture0->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA1 )
- )
- );
- pCellPicture0->ImageModeSet( CExtGridCellPicture::eTouchOutside );
- CExtGridCellPicture * pCellPicture1 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pBmp = pCellPicture1->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA2 )
- )
- );
- CExtGridCellPicture * pCellPicture2 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pBmp = pCellPicture2->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA3 )
- )
- );
- pCellPicture2->ImageModeSet( CExtGridCellPicture::eStretch );
- CExtGridCellPicture * pCellPicture3 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pBmp = pCellPicture3->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA3 )
- )
- );
- pCellPicture3->ImageModeSet( CExtGridCellPicture::eTile );
- CExtGridCellPicture * pCellPicture4 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pBmp = pCellPicture4->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA4 )
- )
- );
- pCellPicture4->ImageModeSet( CExtGridCellPicture::eStretch );
- CExtGridCellPicture * pCellPicture5 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pBmp = pCellPicture5->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA5 )
- )
- );
- CExtGridCellPicture * pCellPicture6 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pBmp = pCellPicture6->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA6 )
- )
- );
- CExtGridCellPicture * pCellPicture7 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pBmp = pCellPicture7->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA6 )
- )
- );
- pCellPicture7->ImageModeSet( CExtGridCellPicture::eTile );
- CExtGridCellPicture * pCellPicture8 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pBmp = pCellPicture8->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA7 )
- )
- );
- CExtGridCellPicture * pCellPicture9 =
- STATIC_DOWNCAST(
- CExtGridCellPicture,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pBmp = pCellPicture9->BitmapGetBuffer();
- VERIFY(
- pBmp->LoadBMP_Resource(
- MAKEINTRESOURCE( IDB_BITMAP_VISTA8 )
- )
- );
- pCellPicture9->ImageModeSet( CExtGridCellPicture::eTile );
- }
- void CPageGrid::_InitColumnProgress( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellProgress * pCellProgress =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellProgress)
- )
- );
- UNREFERENCED_PARAMETER(pCellProgress);
- }
- CExtGridCellProgress * pCellProgress0 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellProgress0->SetRange( 0, 100 );
- pCellProgress0->SetStep( 2 );
- CExtGridCellProgress * pCellProgress1 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellProgress1->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellProgress1->SetRange( 0, 100 );
- pCellProgress1->SetStep( 4 );
- pCellProgress1->TextSet( _T("Done:") );
- pCellProgress1->TextModeSet( CExtGridCellProgress::eTextAndPercent );
- pCellProgress1->BarColorsSet(
- ::GetSysColor( COLOR_HIGHLIGHT ),
- ::GetSysColor( COLOR_HIGHLIGHT )
- );
- pCellProgress1->TextColorsSet(
- COLORREF( -1L ),
- ::GetSysColor( COLOR_HIGHLIGHTTEXT )
- );
- CExtGridCellProgress * pCellProgress2 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellProgress2->ModifyStyle( __EGCS_TA_HORZ_LEFT );
- pCellProgress2->SetRange( 0, 100 );
- pCellProgress2->SetStep( 3 );
- pCellProgress2->TextModeSet( CExtGridCellProgress::ePercent );
- pCellProgress2->BarColorsSet(
- RGB(233,233,233),
- RGB(40,40,40)
- );
- pCellProgress2->TextColorsSet(
- COLORREF( -1L ),
- RGB(255,255,0)
- );
- pCellProgress2->InvertBarGradientSet( true );
- CExtGridCellProgress * pCellProgress3 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellProgress3->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellProgress3->SetRange( 0, 150 );
- pCellProgress3->SetStep( 2 );
- pCellProgress3->TextModeSet( CExtGridCellProgress::ePercent );
- pCellProgress3->TiedTextSet( true );
- pCellProgress3->BarColorsSet(
- RGB(80,167,255),
- RGB(0,0,150)
- );
- pCellProgress3->TextColorsSet(
- COLORREF( -1L ),
- RGB(255,255,255)
- );
- CExtGridCellProgress * pCellProgress4 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellProgress4->ModifyStyle( __EGCS_TA_HORZ_RIGHT );
- pCellProgress4->SetRange( -100, 400 );
- pCellProgress4->SetStep( 10 );
- pCellProgress4->TextModeSet( CExtGridCellProgress::ePosition );
- pCellProgress4->TiedTextSet( true );
- pCellProgress4->BarColorsSet(
- RGB(255,255,0),
- RGB(255,0,0)
- );
- pCellProgress4->TextColorsSet(
- COLORREF( -1L ),
- RGB(255,255,0)
- );
- CExtGridCellProgress * pCellProgress5 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellProgress5->ModifyStyle( __EGCS_TA_HORZ_LEFT );
- pCellProgress5->SetRange( 100, 250 );
- pCellProgress5->SetStep( 5 );
- pCellProgress5->TextSet( _T("Some text...") );
- pCellProgress5->TextModeSet( CExtGridCellProgress::eText );
- pCellProgress5->BarColorsSet(
- RGB(80,167,255),
- RGB(0,0,150)
- );
- pCellProgress5->TextColorsSet(
- COLORREF( -1L ),
- RGB(255,255,0)
- );
- pCellProgress5->InvertBarGradientSet( true );
- CExtGridCellProgress * pCellProgress6 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellProgress6->ModifyStyle( __EGCS_TA_HORZ_LEFT );
- pCellProgress6->SetRange( -100, 400 );
- pCellProgress6->SetStep( 10 );
- pCellProgress6->TextModeSet( CExtGridCellProgress::ePercent );
- pCellProgress6->TiedTextSet( true );
- pCellProgress6->BarColorsSet(
- RGB(255,255,0),
- RGB(255,0,0)
- );
- pCellProgress6->TextColorsSet(
- COLORREF( -1L ),
- RGB(255,255,255)
- );
- pCellProgress6->InvertBarGradientSet( true );
- pCellProgress6->ReversedSet( true );
- CExtGridCellProgress * pCellProgress7 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellProgress7->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellProgress7->SetRange( -200, 200 );
- pCellProgress7->SetStep( 6 );
- pCellProgress7->TextSet( _T("Pos:") );
- pCellProgress7->TextModeSet( CExtGridCellProgress::eTextAndPosition );
- pCellProgress7->TiedTextSet( true );
- pCellProgress7->BarColorsSet(
- RGB(255,255,255),
- RGB(128,20,250)
- );
- pCellProgress7->TextColorsSet(
- COLORREF( -1L ),
- RGB(0,255,0)
- );
- pCellProgress7->InvertBarGradientSet( true );
- pCellProgress7->ReversedSet( true );
- CExtGridCellProgress * pCellProgress8 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellProgress8->SetRange( 0, 100 );
- pCellProgress8->SetStep( 4 );
- pCellProgress8->TextModeSet( CExtGridCellProgress::eNone );
- pCellProgress8->BarColorsSet(
- RGB(255,255,255),
- RGB(0,0,0)
- );
- CExtGridCellProgress * pCellProgress9 =
- STATIC_DOWNCAST(
- CExtGridCellProgress,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellProgress9->ModifyStyle( __EGCS_TA_HORZ_RIGHT );
- pCellProgress9->SetRange( 0, 100 );
- pCellProgress9->SetStep( 2 );
- pCellProgress9->TextModeSet( CExtGridCellProgress::ePercent );
- }
- void CPageGrid::_InitColumnSlider( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellSlider * pCellSlider =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellSlider)
- )
- );
- UNREFERENCED_PARAMETER(pCellSlider);
- }
- CExtGridCellSlider * pCellSlider0 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellSlider0->SetLineSize( 1 );
- pCellSlider0->SetPageSize( 20 );
- pCellSlider0->SetRange( 0, 100 );
- pCellSlider0->SetPos( 0 );
- CExtGridCellSlider * pCellSlider1 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellSlider1->ModifyStyleEx( __EGCS_EX_NO_INPLACE_CONTROL_BORDER );
- pCellSlider1->SetLineSize( 5 );
- pCellSlider1->SetPageSize( 50 );
- pCellSlider1->SetRange( -100, 100 );
- pCellSlider1->SetPos( -50 );
- CExtGridCellSlider * pCellSlider2 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellSlider2->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellSlider2->SetLineSize( 2 );
- pCellSlider2->SetPageSize( 40 );
- pCellSlider2->SetRange( 0, 200 );
- pCellSlider2->SetPos( 150 );
- CExtGridCellSlider * pCellSlider3 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellSlider3->ModifyStyleEx( __EGCS_EX_NO_INPLACE_CONTROL_BORDER );
- pCellSlider3->ModifyStyle( __EGCS_TA_HORZ_LEFT );
- pCellSlider3->SetLineSize( 10 );
- pCellSlider3->SetPageSize( 100 );
- pCellSlider3->SetRange( 0, 1000 );
- pCellSlider3->SetPos( 555 );
- CExtGridCellSlider * pCellSlider4 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellSlider4->SetLineSize( 1 );
- pCellSlider4->SetPageSize( 20 );
- pCellSlider4->SetRange( -200, -100 );
- pCellSlider4->SetPos( -150 );
- CExtGridCellSlider * pCellSlider5 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellSlider5->ModifyStyleEx( __EGCS_EX_NO_INPLACE_CONTROL_BORDER );
- pCellSlider5->SetLineSize( 1 );
- pCellSlider5->SetPageSize( 2 );
- pCellSlider5->SetRange( 0, 10 );
- pCellSlider5->SetPos( 2 );
- CExtGridCellSlider * pCellSlider6 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellSlider6->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellSlider6->SetLineSize( 1 );
- pCellSlider6->SetPageSize( 2 );
- pCellSlider6->SetRange( 0, 1 );
- pCellSlider6->SetPos( 1 );
- CExtGridCellSlider * pCellSlider7 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellSlider7->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellSlider7->SetLineSize( 1 );
- pCellSlider7->SetPageSize( 2 );
- pCellSlider7->SetRange( -1, 1 );
- pCellSlider7->SetPos( 0 );
- CExtGridCellSlider * pCellSlider8 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellSlider8->SetLineSize( 1 );
- pCellSlider8->SetPageSize( 2 );
- pCellSlider8->SetRange( -10, 10 );
- pCellSlider8->SetPos( -9 );
- // pCellSlider8->BackColorSet( CExtGridCell::__ECS_ALL, RGB(255,0,0) );
- pCellSlider8->BackColorSet( CExtGridCell::__ECS_NORMAL, RGB(255,0,0) );
- pCellSlider8->BackColorSet( CExtGridCell::__ECS_SELECTED, RGB(128,0,0) );
- pCellSlider8->BackColorSet( CExtGridCell::__ECS_HOVERED, RGB(255,128,128) );
- pCellSlider8->BackColorSet( CExtGridCell::__ECS_HIGHLIGHT_BY_HOVER, RGB(255,192,192) );
- CExtGridCellSlider * pCellSlider9 =
- STATIC_DOWNCAST(
- CExtGridCellSlider,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellSlider9->ModifyStyleEx( __EGCS_EX_NO_INPLACE_CONTROL_BORDER );
- pCellSlider9->SetLineSize( 1 );
- pCellSlider9->SetPageSize( 20 );
- pCellSlider9->SetRange( -50, 50 );
- pCellSlider9->SetPos( 25 );
- // pCellSlider9->BackColorSet( CExtGridCell::__ECS_ALL, RGB(0,255,0) );
- pCellSlider9->BackColorSet( CExtGridCell::__ECS_NORMAL, RGB(0,255,0) );
- pCellSlider9->BackColorSet( CExtGridCell::__ECS_SELECTED, RGB(0,128,0) );
- pCellSlider9->BackColorSet( CExtGridCell::__ECS_HOVERED, RGB(128,255,128) );
- pCellSlider9->BackColorSet( CExtGridCell::__ECS_HIGHLIGHT_BY_HOVER, RGB(192,255,192) );
- }
- void CPageGrid::_InitColumnText( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellString * pCellString =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellString)
- )
- );
- UNREFERENCED_PARAMETER(pCellString);
- }
- CExtGridCellString * pCellString0 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellString0->TextSet( _T("Cell1") );
- CExtGridCellString * pCellString1 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellString1->TextSet( _T("Cell2 Line1rnCell2 Line2rnCell2 Line3") );
- pCellString1->ModifyStyleEx( __EGCS_EX_WRAP_TEXT );
- pCellString1->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- CExtGridCellString * pCellString2 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellString2->TextSet( _T("Cell3") );
- CExtGridCellString * pCellString3 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellString3->TextSet( _T("Cell4") );
- CExtGridCellString * pCellString4 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellString4->TextSet( _T("Cell5 Line1rnCell5 Line2rnCell5 Line3") );
- pCellString4->ModifyStyleEx( __EGCS_EX_WRAP_TEXT );
- pCellString4->ModifyStyle( __EGCS_TA_HORZ_RIGHT );
- CExtGridCellString * pCellString5 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellString5->TextSet( _T("Cell6") );
- CExtGridCellString * pCellString6 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellString6->TextSet( _T("Cell7") );
- pCellString6->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- CExtGridCellString * pCellString7 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellString7->TextSet( _T("Cell8 Line1rnCell8 Line2rnCell8 Line3") );
- pCellString7->ModifyStyleEx( __EGCS_EX_WRAP_TEXT );
- CExtGridCellString * pCellString8 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellString8->TextSet( _T("Cell9") );
- CExtGridCellString * pCellString9 =
- STATIC_DOWNCAST(
- CExtGridCellString,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellString9->TextSet( _T("Cell10") );
- }
- void CPageGrid::_InitColumnPassword( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellPassword * pCellPassword =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellPassword)
- )
- );
- UNREFERENCED_PARAMETER(pCellPassword);
- }
- CExtGridCellPassword * pCellPassword0 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellPassword0->TextSet( _T("Password1") );
- CExtGridCellPassword * pCellPassword1 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellPassword1->TextSet( _T("Password2") );
- pCellPassword1->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- CExtGridCellPassword * pCellPassword2 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellPassword2->TextSet( _T("Password3") );
- CExtGridCellPassword * pCellPassword3 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellPassword3->TextSet( _T("Password4") );
- CExtGridCellPassword * pCellPassword4 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellPassword4->TextSet( _T("Password5") );
- pCellPassword4->ModifyStyle( __EGCS_TA_HORZ_RIGHT );
- CExtGridCellPassword * pCellPassword5 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellPassword5->TextSet( _T("Password6") );
- CExtGridCellPassword * pCellPassword6 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellPassword6->TextSet( _T("Password7") );
- CExtGridCellPassword * pCellPassword7 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellPassword7->TextSet( _T("Password8") );
- pCellPassword7->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- CExtGridCellPassword * pCellPassword8 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellPassword8->TextSet( _T("Password9") );
- pCellPassword8->TextColorSet( CExtGridCell::__ECS_ALL, RGB(255,0,0) );
- CExtGridCellPassword * pCellPassword9 =
- STATIC_DOWNCAST(
- CExtGridCellPassword,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellPassword9->TextSet( _T("Password0") );
- pCellPassword9->TextColorSet( CExtGridCell::__ECS_ALL, RGB(0,255,0) );
- }
- void CPageGrid::_InitColumnFile( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellFile * pCellFile =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellFile)
- )
- );
- UNREFERENCED_PARAMETER(pCellFile);
- }
- CExtGridCellFile * pCellFile0 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellFile0->TextSet( _T("C:\autoexec.bat") );
- pCellFile0->m_bOpenFileDialog = TRUE;
- CExtGridCellFile * pCellFile1 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellFile1->TextSet( _T("C:\Program Files\Microsoft Visual Studio\install.htm") );
- pCellFile1->m_bOpenFileDialog = TRUE;
- CExtGridCellFile * pCellFile2 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellFile2->TextSet( _T("C:\Windows\win.ini") );
- pCellFile2->m_bOpenFileDialog = FALSE;
- CExtGridCellFile * pCellFile3 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellFile3->TextSet( _T("C:\Windows\System32\win.com") );
- pCellFile3->m_bOpenFileDialog = FALSE;
- CExtGridCellFile * pCellFile4 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- UNREFERENCED_PARAMETER(pCellFile4);
- CExtGridCellFile * pCellFile5 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- UNREFERENCED_PARAMETER(pCellFile5);
- CExtGridCellFile * pCellFile6 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- UNREFERENCED_PARAMETER(pCellFile6);
- CExtGridCellFile * pCellFile7 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- UNREFERENCED_PARAMETER(pCellFile7);
- CExtGridCellFile * pCellFile8 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- UNREFERENCED_PARAMETER(pCellFile8);
- CExtGridCellFile * pCellFile9 =
- STATIC_DOWNCAST(
- CExtGridCellFile,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- UNREFERENCED_PARAMETER(pCellFile9);
- pCellFile9->ModifyStyle( __EGCS_READ_ONLY );
- }
- void CPageGrid::_InitColumnFileImage( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellFileImage * pCellFileImage =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellFileImage)
- )
- );
- UNREFERENCED_PARAMETER(pCellFileImage);
- }
- CExtGridCellFileImage * pCellFileImage0 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage0);
- CExtGridCellFileImage * pCellFileImage1 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage1);
- CExtGridCellFileImage * pCellFileImage2 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage2);
- CExtGridCellFileImage * pCellFileImage3 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage3);
- CExtGridCellFileImage * pCellFileImage4 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage4);
- CExtGridCellFileImage * pCellFileImage5 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage5);
- CExtGridCellFileImage * pCellFileImage6 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage6);
- CExtGridCellFileImage * pCellFileImage7 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage7);
- CExtGridCellFileImage * pCellFileImage8 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage8);
- CExtGridCellFileImage * pCellFileImage9 =
- STATIC_DOWNCAST(
- CExtGridCellFileImage,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- UNREFERENCED_PARAMETER(pCellFileImage9);
- pCellFileImage9->ModifyStyle( __EGCS_READ_ONLY );
- }
- void CPageGrid::_InitColumnFolder( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellFolder * pCellFolder =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellFolder)
- )
- );
- UNREFERENCED_PARAMETER(pCellFolder);
- }
- CExtGridCellFolder * pCellFolder0 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellFolder0->TextSet( _T("C:\") );
- CExtGridCellFolder * pCellFolder1 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellFolder1->TextSet( _T("C:\Program Files\") );
- CExtGridCellFolder * pCellFolder2 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellFolder2->TextSet( _T("C:\Windows") );
- CExtGridCellFolder * pCellFolder3 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellFolder3->TextSet( _T("C:\Windows\System32") );
- CExtGridCellFolder * pCellFolder4 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- UNREFERENCED_PARAMETER(pCellFolder4);
- CExtGridCellFolder * pCellFolder5 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- UNREFERENCED_PARAMETER(pCellFolder5);
- CExtGridCellFolder * pCellFolder6 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- UNREFERENCED_PARAMETER(pCellFolder6);
- CExtGridCellFolder * pCellFolder7 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- UNREFERENCED_PARAMETER(pCellFolder7);
- CExtGridCellFolder * pCellFolder8 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- UNREFERENCED_PARAMETER(pCellFolder8);
- CExtGridCellFolder * pCellFolder9 =
- STATIC_DOWNCAST(
- CExtGridCellFolder,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- UNREFERENCED_PARAMETER(pCellFolder9);
- pCellFolder9->ModifyStyle( __EGCS_READ_ONLY );
- }
- void CPageGrid::_InitColumnFont( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellFont * pCellFont =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellFont)
- )
- );
- UNREFERENCED_PARAMETER(pCellFont);
- }
- LOGFONT lf;
- ::memset( &lf, 0, sizeof(LOGFONT) );
- CExtGridCellFont * pCellFont0 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -18;
- lf.lfWeight = FW_BOLD;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Arial") );
- pCellFont0->DataSet( lf );
- CExtGridCellFont * pCellFont1 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -12;
- lf.lfItalic = 1;
- lf.lfWeight = FW_BOLD;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("MS Sans Serif") );
- pCellFont1->DataSet( lf );
- CExtGridCellFont * pCellFont2 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -14;
- lf.lfItalic = 1;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Tahoma") );
- pCellFont2->DataSet( lf );
- CExtGridCellFont * pCellFont3 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -10;
- lf.lfStrikeOut = 1;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Courier") );
- pCellFont3->DataSet( lf );
- CExtGridCellFont * pCellFont4 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -8;
- lf.lfStrikeOut = 1;
- lf.lfWeight = FW_BOLD;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Courier New") );
- pCellFont4->DataSet( lf );
- CExtGridCellFont * pCellFont5 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -20;
- lf.lfStrikeOut = 1;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Times New Roman") );
- pCellFont5->DataSet( lf );
- CExtGridCellFont * pCellFont6 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -16;
- lf.lfUnderline = 1;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("System") );
- pCellFont6->DataSet( lf );
- CExtGridCellFont * pCellFont7 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -14;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Marlett") );
- pCellFont7->DataSet( lf );
- CExtGridCellFont * pCellFont8 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -12;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Symbol") );
- pCellFont8->DataSet( lf );
- CExtGridCellFont * pCellFont9 =
- STATIC_DOWNCAST(
- CExtGridCellFont,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- ::memset( &lf, 0, sizeof(LOGFONT) );
- lf.lfHeight = -18;
- __EXT_MFC_STRCPY( lf.lfFaceName, LF_FACESIZE, _T("Verdana") );
- pCellFont9->DataSet( lf );
- pCellFont9->ModifyStyle( __EGCS_READ_ONLY );
- }
- void CPageGrid::_InitColumnFontFaceName( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellFontFaceName * pCellFontFaceName =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellFontFaceName)
- )
- );
- UNREFERENCED_PARAMETER(pCellFontFaceName);
- }
- CExtGridCellFontFaceName * pCellFontFaceName0 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellFontFaceName0->SelectString( _T("Arial") );
- CExtGridCellFontFaceName * pCellFontFaceName1 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellFontFaceName1->SelectString( _T("MS Sans Serif") );
- CExtGridCellFontFaceName * pCellFontFaceName2 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellFontFaceName2->SelectString( _T("Tahoma") );
- CExtGridCellFontFaceName * pCellFontFaceName3 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellFontFaceName3->SelectString( _T("Courier") );
- CExtGridCellFontFaceName * pCellFontFaceName4 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellFontFaceName4->SelectString( _T("Courier New") );
- CExtGridCellFontFaceName * pCellFontFaceName5 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellFontFaceName5->SelectString( _T("Times New Roman") );
- CExtGridCellFontFaceName * pCellFontFaceName6 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellFontFaceName6->SelectString( _T("System") );
- CExtGridCellFontFaceName * pCellFontFaceName7 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellFontFaceName7->SelectString( _T("Marlett") );
- CExtGridCellFontFaceName * pCellFontFaceName8 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellFontFaceName8->SelectString( _T("Symbol") );
- CExtGridCellFontFaceName * pCellFontFaceName9 =
- STATIC_DOWNCAST(
- CExtGridCellFontFaceName,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellFontFaceName9->SelectString( _T("Verdana") );
- pCellFontFaceName9->ModifyStyle( __EGCS_READ_ONLY );
- }
- void CPageGrid::_InitColumnFontWeight( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellUpDownFontWeight * pCellFontWeight =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellUpDownFontWeight)
- )
- );
- UNREFERENCED_PARAMETER(pCellFontWeight);
- }
- CExtGridCellUpDownFontWeight * pCellFontWeight0 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellFontWeight0->_VariantAssign( FW_DONTCARE );
- CExtGridCellUpDownFontWeight * pCellFontWeight1 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellFontWeight1->_VariantAssign( FW_THIN );
- CExtGridCellUpDownFontWeight * pCellFontWeight2 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellFontWeight2->_VariantAssign( FW_EXTRALIGHT );
- CExtGridCellUpDownFontWeight * pCellFontWeight3 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellFontWeight3->_VariantAssign( FW_LIGHT );
- CExtGridCellUpDownFontWeight * pCellFontWeight4 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellFontWeight4->_VariantAssign( FW_NORMAL );
- CExtGridCellUpDownFontWeight * pCellFontWeight5 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellFontWeight5->_VariantAssign( FW_MEDIUM );
- CExtGridCellUpDownFontWeight * pCellFontWeight6 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellFontWeight6->_VariantAssign( FW_SEMIBOLD );
- CExtGridCellUpDownFontWeight * pCellFontWeight7 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellFontWeight7->_VariantAssign( FW_BOLD );
- CExtGridCellUpDownFontWeight * pCellFontWeight8 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellFontWeight8->_VariantAssign( FW_EXTRABOLD );
- CExtGridCellUpDownFontWeight * pCellFontWeight9 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownFontWeight,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellFontWeight9->_VariantAssign( FW_HEAVY );
- pCellFontWeight9->ModifyStyle( __EGCS_READ_ONLY );
- }
- void CPageGrid::_InitColumnColorPart( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellUpDownColorPart * pCellColorPart =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellUpDownColorPart)
- )
- );
- UNREFERENCED_PARAMETER(pCellColorPart);
- }
- CExtGridCellUpDownColorPart * pCellColorPart0 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellColorPart0->_VariantAssign( 0 );
- pCellColorPart0->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_UNKNOWN;
- CExtGridCellUpDownColorPart * pCellColorPart1 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellColorPart1->_VariantAssign( 32 );
- pCellColorPart1->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_RED;
- CExtGridCellUpDownColorPart * pCellColorPart2 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellColorPart2->_VariantAssign( 64 );
- pCellColorPart2->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_GREEN;
- CExtGridCellUpDownColorPart * pCellColorPart3 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellColorPart3->_VariantAssign( 96 );
- pCellColorPart3->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_BLUE;
- CExtGridCellUpDownColorPart * pCellColorPart4 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellColorPart4->_VariantAssign( 128 );
- pCellColorPart4->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_UNKNOWN;
- CExtGridCellUpDownColorPart * pCellColorPart5 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellColorPart5->_VariantAssign( 160 );
- pCellColorPart5->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_RED;
- CExtGridCellUpDownColorPart * pCellColorPart6 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellColorPart6->_VariantAssign( 192 );
- pCellColorPart6->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_GREEN;
- CExtGridCellUpDownColorPart * pCellColorPart7 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellColorPart7->_VariantAssign( 224 );
- pCellColorPart7->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_BLUE;
- CExtGridCellUpDownColorPart * pCellColorPart8 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellColorPart8->_VariantAssign( 240 );
- pCellColorPart8->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_RED;
- CExtGridCellUpDownColorPart * pCellColorPart9 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownColorPart,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellColorPart9->_VariantAssign( 255 );
- pCellColorPart9->m_eCPT = CExtGridCellUpDownColorPart::__ECPT_GREEN;
- }
- void CPageGrid::_InitColumnRectPart( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellUpDownRectPart * pCellRectPart =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellUpDownRectPart)
- )
- );
- UNREFERENCED_PARAMETER(pCellRectPart);
- }
- CExtGridCellUpDownRectPart * pCellRectPart0 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellRectPart0->_VariantAssign( 0 );
- pCellRectPart0->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_UNKNOWN;
- CExtGridCellUpDownRectPart * pCellRectPart1 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellRectPart1->_VariantAssign( 32 );
- pCellRectPart1->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_X;
- CExtGridCellUpDownRectPart * pCellRectPart2 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellRectPart2->_VariantAssign( 64 );
- pCellRectPart2->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_Y;
- CExtGridCellUpDownRectPart * pCellRectPart3 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellRectPart3->_VariantAssign( 96 );
- pCellRectPart3->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_WIDTH;
- CExtGridCellUpDownRectPart * pCellRectPart4 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellRectPart4->_VariantAssign( 128 );
- pCellRectPart4->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_HEIGHT;
- CExtGridCellUpDownRectPart * pCellRectPart5 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellRectPart5->_VariantAssign( 160 );
- pCellRectPart5->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_UNKNOWN;
- CExtGridCellUpDownRectPart * pCellRectPart6 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellRectPart6->_VariantAssign( 192 );
- pCellRectPart6->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_X;
- CExtGridCellUpDownRectPart * pCellRectPart7 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellRectPart7->_VariantAssign( 224 );
- pCellRectPart7->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_Y;
- CExtGridCellUpDownRectPart * pCellRectPart8 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellRectPart8->_VariantAssign( 240 );
- pCellRectPart8->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_WIDTH;
- CExtGridCellUpDownRectPart * pCellRectPart9 =
- STATIC_DOWNCAST(
- CExtGridCellUpDownRectPart,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellRectPart9->_VariantAssign( 255 );
- pCellRectPart9->m_eCPT = CExtGridCellUpDownRectPart::__ECPT_HEIGHT;
- }
- void CPageGrid::_InitColumnInplaceSlider( LONG nColNo, LONG nRowCount, bool bSliderMode /*= true*/ )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellInplaceSlider * pCell =
- STATIC_DOWNCAST(
- CExtGridCellInplaceSlider,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellInplaceSlider)
- )
- );
- //pCell->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- pCell->ScrollTotalRangeSet( 100 );
- if( bSliderMode )
- {
- if( nRowNo > 5 )
- {
- pCell->ScrollPageSizeSet( ::rand() % 40 );
- pCell->ScrollPosSet( ::rand() % 60 );
- }
- else
- {
- pCell->ScrollPageSizeSet( 0 );
- pCell->ScrollPosSet( ::rand() % 100 );
- }
- }
- else
- {
- if( nRowNo <= 2 )
- {
- pCell->ScrollPageSizeSet( 0 );
- pCell->ScrollPosSet( ::rand() % 100 );
- }
- else
- {
- ULONG nScrollPageSize = ::rand() % 50;
- pCell->ScrollPageSizeSet( nScrollPageSize );
- pCell->ScrollPosSet( ::rand() % ( 100 - nScrollPageSize ) );
- }
- pCell->ScrollButtonExtentHorzSet( ( ::rand() % 20 ) + 10 );
- }
- if( nRowNo == 0 || nRowNo == 6 )
- {
- pCell->ModifyStyle( __EGCS_READ_ONLY );
- if( nRowNo == 6 )
- pCell->TextSet( _T("Read-only: ") );
- }
- if( nRowNo == 0 )
- {
- pCell->TextSet( _T("First: ") );
- //pCell->ModifyStyle( __EGCS_BUTTON_DROPDOWN|__EGCS_BUTTON_ELLIPSIS );
- }
- else if( nRowNo == 1 )
- {
- pCell->TextSet( _T("Second: ") );
- }
- else if( nRowNo == 2 )
- {
- pCell->TextSet( _T("Third: ") );
- //pCell->ModifyStyle( __EGCS_BUTTON_DROPDOWN );
- }
- // else if( nRowNo == 3 )
- // pCell->ModifyStyle( __EGCS_BUTTON_ELLIPSIS );
- // else if( nRowNo == 4 )
- // pCell->ModifyStyle( __EGCS_BUTTON_DROPDOWN );
- // else if( nRowNo == 7 )
- // pCell->ModifyStyle( __EGCS_BUTTON_DROPDOWN|__EGCS_BUTTON_ELLIPSIS );
- }
- }
- void CPageGrid::_InitColumnInplaceScrollBar( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- _InitColumnInplaceSlider( nColNo, nRowCount, false );
- }
- void CPageGrid::_InitColumnHotKey( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellHotKey * pCellHotKey =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellHotKey)
- )
- );
- UNREFERENCED_PARAMETER(pCellHotKey);
- }
- CExtGridCellHotKey * pCellHotKey0 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellHotKey0->SetHotKey(
- MAKELONG( 'P', FCONTROL|FVIRTKEY )
- );
- CExtGridCellHotKey * pCellHotKey1 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellHotKey1->SetHotKey(
- MAKELONG( 'S', FCONTROL|FSHIFT|FVIRTKEY )
- );
- CExtGridCellHotKey * pCellHotKey2 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellHotKey2->SetHotKey(
- MAKELONG( 'X', FALT|FVIRTKEY )
- );
- CExtGridCellHotKey * pCellHotKey3 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellHotKey3->SetHotKey(
- MAKELONG( VK_F1, FSHIFT|FVIRTKEY)
- );
- CExtGridCellHotKey * pCellHotKey4 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellHotKey4->SetHotKey(
- VK_F12,
- FCONTROL|FVIRTKEY
- );
- CExtGridCellHotKey * pCellHotKey5 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellHotKey5->SetHotKey(
- 'S',
- FALT|FSHIFT|FCONTROL|FVIRTKEY
- );
- CExtGridCellHotKey * pCellHotKey6 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellHotKey6->SetHotKey(
- VK_ADD,
- FVIRTKEY
- );
- CExtGridCellHotKey * pCellHotKey7 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellHotKey7->SetHotKey(
- '1',
- FALT|FVIRTKEY
- );
-
- CExtGridCellHotKey * pCellHotKey8 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellHotKey8->SetHotKey(
- '2',
- FSHIFT|FVIRTKEY
- );
- CExtGridCellHotKey * pCellHotKey9 =
- STATIC_DOWNCAST(
- CExtGridCellHotKey,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellHotKey9->SetHotKey(
- VK_F10,
- FVIRTKEY
- );
- }
- void CPageGrid::_InitColumnButton( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellButton * pCellButton =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellButton)
- )
- );
- UNREFERENCED_PARAMETER(pCellButton);
- }
- CExtGridCellButton * pCellButton0 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellButton0->TextSet( _T("Cell1") );
- pCellButton0->IconIndexSet( 0 );
- CExtGridCellButton * pCellButton1 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellButton1->TextSet( _T("Cell2 Line1rnCell2 Line2rnCell2 Line3") );
- pCellButton1->ModifyStyleEx( __EGCS_EX_WRAP_TEXT );
- pCellButton1->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellButton1->IconIndexSet( 1 );
- CExtGridCellButton * pCellButton2 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellButton2->TextSet( _T("Cell3") );
- CExtGridCellButton * pCellButton3 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellButton3->TextSet( _T("Cell4") );
- pCellButton3->ModifyStyle( __EGCS_CHK_CHECK );
- pCellButton3->IconIndexSet( 2 );
- CExtGridCellButton * pCellButton4 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellButton4->TextSet( _T("Cell5 Line1rnCell5 Line2rnCell5 Line3") );
- pCellButton4->ModifyStyleEx( __EGCS_EX_WRAP_TEXT );
- pCellButton4->ModifyStyle( __EGCS_TA_HORZ_RIGHT );
- pCellButton4->IconIndexSet( 3 );
- CExtGridCellButton * pCellButton5 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellButton5->TextSet( _T("Cell6") );
- pCellButton5->IconIndexSet( 4 );
- CExtGridCellButton * pCellButton6 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellButton6->TextSet( _T("Cell7") );
- pCellButton6->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- pCellButton6->IconIndexSet( 5 );
- CExtGridCellButton * pCellButton7 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellButton7->TextSet( _T("Cell8 Line1rnCell8 Line2rnCell8 Line3") );
- pCellButton7->ModifyStyleEx( __EGCS_EX_WRAP_TEXT );
- pCellButton7->IconIndexSet( 6 );
- CExtGridCellButton * pCellButton8 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellButton8->TextSet( _T("Cell9") );
- pCellButton8->IconIndexSet( 7 );
- pCellButton8->ModifyStyle( __EGCS_CHK_CHECK );
- CExtGridCellButton * pCellButton9 =
- STATIC_DOWNCAST(
- CExtGridCellButton,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellButton9->TextSet( _T("Cell10") );
- pCellButton9->ModifyStyle( __EGCS_CHK_CHECK );
- }
- void CPageGrid::_InitColumnObjectSize( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellObjectSize * pCellObjectSize =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellObjectSize)
- )
- );
- UNREFERENCED_PARAMETER(pCellObjectSize);
- }
- CExtGridCellObjectSize * pCellObjectSize0 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellObjectSize0->SetMode( CExtGridCellObjectSize::eAuto );
- pCellObjectSize0->_VariantAssign( 7486347 );
- CExtGridCellObjectSize * pCellObjectSize1 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellObjectSize1->SetMode( CExtGridCellObjectSize::eBytes );
- pCellObjectSize1->_VariantAssign( 1579 );
- CExtGridCellObjectSize * pCellObjectSize2 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellObjectSize2->SetMode( CExtGridCellObjectSize::eKilobytes );
- pCellObjectSize2->_VariantAssign( 36864 );
- CExtGridCellObjectSize * pCellObjectSize3 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellObjectSize3->SetMode( CExtGridCellObjectSize::eMegabytes );
- pCellObjectSize3->_VariantAssign( 1425917184 );
- CExtGridCellObjectSize * pCellObjectSize4 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellObjectSize4->SetMode( CExtGridCellObjectSize::eGigabytes );
- pCellObjectSize4->_VariantAssign( 370348935 );
- CExtGridCellObjectSize * pCellObjectSize5 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellObjectSize5->SetMode( CExtGridCellObjectSize::eTerabytes );
- pCellObjectSize5->_VariantAssign( 24234539196416 );
- CExtGridCellObjectSize * pCellObjectSize6 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellObjectSize6->SetMode( CExtGridCellObjectSize::ePetabytes );
- pCellObjectSize6->_VariantAssign( DOUBLE( DOUBLE(6.5) * DOUBLE( ::pow( DOUBLE(2), DOUBLE(50) ) ) ), VT_R8 );
- CExtGridCellObjectSize * pCellObjectSize7 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellObjectSize7->SetMode( CExtGridCellObjectSize::eExabytes );
- pCellObjectSize7->_VariantAssign( DOUBLE( DOUBLE(2.45) * DOUBLE( ::pow( DOUBLE(2), DOUBLE(60) ) ) ), VT_R8 );
- CExtGridCellObjectSize * pCellObjectSize8 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellObjectSize8->SetMode( CExtGridCellObjectSize::eAuto );
- pCellObjectSize8->_VariantAssign( 10490037248 );
- CExtGridCellObjectSize * pCellObjectSize9 =
- STATIC_DOWNCAST(
- CExtGridCellObjectSize,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellObjectSize9->SetMode( CExtGridCellObjectSize::eAuto );
- pCellObjectSize9->_VariantAssign( 814804992 );
- }
- void CPageGrid::_InitColumnGeographic( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellLL * pCellLL =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellLL)
- )
- );
- UNREFERENCED_PARAMETER(pCellLL);
- }
- CExtGridCellLL * pCellLL0 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 0L )
- );
- pCellLL0->SetMode( CExtLLBaseControlProperties::longitude_latitude );
- pCellLL0->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- CExtLongitude _Longitude0( CExtLongitude::hemisphere_east, 20, 30, 40 );
- pCellLL0->LongitudeSet( _Longitude0, true );
- CExtLatitude _Latitude0( CExtLatitude::hemisphere_north, 50, 40, 30 );
- pCellLL0->LatitudeSet( _Latitude0, true );
- CExtGridCellLL * pCellLL1 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 1L )
- );
- pCellLL1->SetMode( CExtLLBaseControlProperties::latitude_longitude );
- pCellLL1->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- CExtLongitude _Longitude1( CExtLongitude::hemisphere_west, 44, 33, 22 );
- pCellLL1->LongitudeSet( _Longitude0, true );
- CExtLatitude _Latitude1( CExtLatitude::hemisphere_south, 55, 44, 11 );
- pCellLL1->LatitudeSet( _Latitude0, true );
- CExtGridCellLL * pCellLL2 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 2L )
- );
- pCellLL2->SetMode( CExtLLBaseControlProperties::longitude );
- pCellLL2->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- CExtGridCellLL * pCellLL3 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 3L )
- );
- pCellLL3->SetMode( CExtLLBaseControlProperties::latitude );
- pCellLL3->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- CExtGridCellLL * pCellLL4 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 4L )
- );
- pCellLL4->SetMode( CExtLLBaseControlProperties::longitude_latitude );
- pCellLL4->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- pCellLL4->ModifyStyle( __EGCS_NO_INPLACE_CONTROL );
- pCellLL4->m_bMapDisplayMarkers = pCellLL4->m_bMapDisplayMarkerTips = pCellLL4->m_bMapDisplayCurrentLocationTip = true;
- pCellLL4->m_bMapHR = true;
- CExtGridCellLL * pCellLL5 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 5L )
- );
- pCellLL5->SetMode( CExtLLBaseControlProperties::latitude_longitude );
- pCellLL5->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- pCellLL5->ModifyStyle( __EGCS_NO_INPLACE_CONTROL );
- pCellLL5->m_bMapDisplayMarkers = pCellLL5->m_bMapDisplayMarkerTips = pCellLL5->m_bMapDisplayCurrentLocationTip = true;
- pCellLL5->m_bMapHR = true;
- CExtGridCellLL * pCellLL6 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 6L )
- );
- pCellLL6->SetMode( CExtLLBaseControlProperties::longitude );
- pCellLL6->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- pCellLL6->ModifyStyle( __EGCS_NO_INPLACE_CONTROL );
- pCellLL6->m_bMapHighlightTimeZones = pCellLL6->m_bMapDisplayTimeZoneTips = pCellLL6->m_bMapDisplayLocalDate = pCellLL6->m_bMapDisplayLocalTime = true;
- pCellLL6->m_bMapHR = true;
- CExtGridCellLL * pCellLL7 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 7L )
- );
- pCellLL7->SetMode( CExtLLBaseControlProperties::latitude );
- pCellLL7->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- pCellLL7->ModifyStyle( __EGCS_NO_INPLACE_CONTROL );
- //pCellLL7->m_bMapHR = true;
- CExtGridCellLL * pCellLL8 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 8L )
- );
- pCellLL8->SetMode( CExtLLBaseControlProperties::longitude_latitude );
- pCellLL8->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- //pCellLL8->ModifyStyle( __EGCS_READ_ONLY );
- pCellLL8->m_bMapDisplayMarkers = pCellLL8->m_bMapDisplayMarkerTips = pCellLL8->m_bMapDisplayCurrentLocationTip = true;
- pCellLL8->m_bMapHighlightTimeZones = pCellLL8->m_bMapDisplayTimeZoneTips = pCellLL8->m_bMapDisplayLocalDate = pCellLL8->m_bMapDisplayLocalTime = true;
- pCellLL8->m_bMapHR = true;
- CExtGridCellLL * pCellLL9 =
- STATIC_DOWNCAST(
- CExtGridCellLL,
- m_wndGrid.GridCellGet( nColNo, 9L )
- );
- pCellLL9->SetMode( CExtLLBaseControlProperties::latitude_longitude );
- pCellLL9->ModifyStyleEx( 0, __EGCS_EX_EMPTY );
- pCellLL9->ModifyStyle( __EGCS_READ_ONLY );
- }
- void CPageGrid::_InitColumnStringMasked( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- // default mask symbol number
- CExtEditWithBehavior::CBehaviorMasked::CharRule _rule1( RGB(164,0,0), _T('#'), (CExtEditWithBehavior::CBehaviorMasked::CharRule::ValidationFunction)_istdigit );
- // default mask symbol letter
- CExtEditWithBehavior::CBehaviorMasked::CharRule _rule2( RGB(0,164,0), _T('@'), (CExtEditWithBehavior::CBehaviorMasked::CharRule::ValidationFunction)_istalpha );
- // default mask symbol number and letter
- CExtEditWithBehavior::CBehaviorMasked::CharRule _rule3( RGB(0,0,164), _T('$'), (CExtEditWithBehavior::CBehaviorMasked::CharRule::ValidationFunction)_istalnum );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellStringMasked * pCellStringMasked =
- STATIC_DOWNCAST(
- CExtGridCellStringMasked,
- m_wndGrid.GridCellGet(
- nColNo,
- nRowNo,
- 0,
- 0,
- RUNTIME_CLASS(CExtGridCellStringMasked)
- )
- );
- CExtEditWithBehavior::CBehaviorMasked::CharRuleArray & _arrRules = pCellStringMasked->GetSymbolArray();
- _arrRules.Add( _rule1 );
- _arrRules.Add( _rule2 );
- _arrRules.Add( _rule3 );
- }
- CExtGridCellStringMasked * pCellStringMasked0 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 0L ) );
- pCellStringMasked0->MaskSet( _T("($)$$ ####-@@@@ ($$y$$)") );
- pCellStringMasked0->TextSet( _T("(_)__ ____-____ (__y__)") );
- pCellStringMasked0->NullableModeSet( true );
- CExtGridCellStringMasked * pCellStringMasked1 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 1L ) );
- pCellStringMasked1->MaskSet( _T("(####)-##-####-###") );
- pCellStringMasked1->TextSet( _T("(____)-__-____-___") );
- pCellStringMasked1->NullableModeSet( false );
- CExtGridCellStringMasked * pCellStringMasked2 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 2L ) );
- pCellStringMasked2->MaskSet( _T("AnyChars-$$$$-ThenNumber-####") );
- pCellStringMasked2->TextSet( _T("AnyChars-____-ThenNumber-____") );
- pCellStringMasked2->InsertModeSet( false );
- CExtGridCellStringMasked * pCellStringMasked3 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 3L ) );
- pCellStringMasked3->MaskSet( _T("Number-###-ThenLetters-@@@@@") );
- pCellStringMasked3->TextSet( _T("Number-___-ThenLetters-_____") );
- CExtGridCellStringMasked * pCellStringMasked4 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 4L ) );
- pCellStringMasked4->MaskSet( _T("Tel. (###) ### ## ##") );
- pCellStringMasked4->TextSet( _T("Tel. (^^^) ^^^ ^^ ^^") );
- pCellStringMasked4->NullCharSet( _T('^') );
- pCellStringMasked4->InsertModeSet( false );
- CExtGridCellStringMasked * pCellStringMasked5 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 5L ) );
- pCellStringMasked5->MaskSet( _T("Postal index: ## ###") );
- pCellStringMasked5->TextSet( _T("Postal index: xx xxx") );
- pCellStringMasked5->NullCharSet( _T('x') );
- CExtGridCellStringMasked * pCellStringMasked6 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 6L ) );
- pCellStringMasked6->MaskSet( _T("Date: ## / ## / ####") );
- pCellStringMasked6->TextSet( _T("Date: -- / -- / ----") );
- pCellStringMasked6->NullCharSet( _T('-') );
- CExtGridCellStringMasked * pCellStringMasked7 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 7L ) );
- pCellStringMasked7->MaskSet( _T("Five letter code: @@@@@") );
- pCellStringMasked7->TextSet( _T("Five letter code: *****") );
- pCellStringMasked7->NullCharSet( _T('*') );
- CExtGridCellStringMasked * pCellStringMasked8 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 8L ) );
- pCellStringMasked8->MaskSet( _T("Number is ##") );
- pCellStringMasked8->TextSet( _T("Number is ~~") );
- pCellStringMasked8->ModifyStyle( __EGCS_TA_HORZ_RIGHT );
- pCellStringMasked8->NullCharSet( _T('~') );
- CExtGridCellStringMasked * pCellStringMasked9 = STATIC_DOWNCAST( CExtGridCellStringMasked, m_wndGrid.GridCellGet( nColNo, 9L ) );
- pCellStringMasked9->MaskSet( _T("C++ ? # : #") );
- pCellStringMasked9->TextSet( _T("C++ ? 1 : 0") );
- pCellStringMasked9->ModifyStyle( __EGCS_TA_HORZ_CENTER );
- }
- void CPageGrid::_InitColumnSystemNumber( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellSystemNumber * pCellSystemNumber =
- STATIC_DOWNCAST(
- CExtGridCellSystemNumber,
- m_wndGrid.GridCellGet( nColNo, nRowNo, 0, 0, RUNTIME_CLASS(CExtGridCellSystemNumber) )
- );
- pCellSystemNumber->ModifyStyleEx( __EGCS_EX_INPLACE_RICH_EDIT );
- pCellSystemNumber->LongDoubleSet( ((long double)::rand()) + ((long double)::rand())/1000 );
- pCellSystemNumber->NumberColorSet( RGB(80,80,164) );
- pCellSystemNumber->FractionColorSet( RGB(80,164,80) );
- pCellSystemNumber->GroupSeparatorColorSet( RGB(128,128,128) );
- pCellSystemNumber->DecimalSeparatorColorSet( RGB(128,128,128) );
- pCellSystemNumber->SignColorSet( RGB(192,0,0) );
- pCellSystemNumber->BracketsColorSet( RGB(164,164,164) );
- }
- }
- void CPageGrid::_InitColumnSystemCurrency( LONG nColNo, LONG nRowCount )
- {
- ASSERT_VALID( this );
- ASSERT_VALID( &m_wndGrid );
- for( LONG nRowNo = 0L; nRowNo < nRowCount; nRowNo++ )
- {
- CExtGridCellSystemCurrency * pCellSystemCurrency =
- STATIC_DOWNCAST(
- CExtGridCellSystemCurrency,
- m_wndGrid.GridCellGet( nColNo, nRowNo, 0, 0, RUNTIME_CLASS(CExtGridCellSystemCurrency) )
- );
- pCellSystemCurrency->ModifyStyleEx( __EGCS_EX_INPLACE_RICH_EDIT );
- pCellSystemCurrency->LongDoubleSet( ((long double)::rand()) + ((long double)::rand())/1000 );
- pCellSystemCurrency->NumberColorSet( RGB(80,80,164) );
- pCellSystemCurrency->FractionColorSet( RGB(80,164,80) );
- pCellSystemCurrency->GroupSeparatorColorSet( RGB(128,128,128) );
- pCellSystemCurrency->DecimalSeparatorColorSet( RGB(128,128,128) );
- pCellSystemCurrency->SignColorSet( RGB(192,0,0) );
- pCellSystemCurrency->BracketsColorSet( RGB(164,164,164) );
- }
- }
- void CPageGrid::OnTimer( __EXT_MFC_UINT_PTR nIDEvent )
- {
- if( nIDEvent == 987 )
- {
- if( IsWindowVisible() )
- {
- if( m_wndGrid.IsPrintPreviewMode() )
- m_wndGrid.SendMessage( WM_IDLEUPDATECMDUI, 1 );
- else
- for( LONG nRowNo = 0L; nRowNo < 10L; nRowNo++ )
- {
- CExtGridCellProgress * pCellProgress =
- STATIC_DOWNCAST(
- CExtGridCellProgress ,
- m_wndGrid.GridCellGet(
- __COLUMN_NUM_PROGRESS,
- nRowNo
- )
- );
- if( pCellProgress != NULL )
- {
- pCellProgress->StepIt();
- CRect rcCellExtra;
- if( m_wndGrid.GridCellRectsGet( __COLUMN_NUM_PROGRESS, nRowNo, 0, 0, NULL, &rcCellExtra ) )
- m_wndGrid.InvalidateRect( &rcCellExtra );
- }
- }
- }
- return;
- }
- CPageBase::OnTimer(nIDEvent);
- }
- BOOL CPageGrid::OnCmdMsg(UINT nID, INT nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
- {
- if( m_wndGrid.OnCmdMsg( nID, nCode, pExtra, pHandlerInfo) )
- return TRUE;
- if( nCode == CN_COMMAND )
- {
- LONG nColNo = -1L;
- switch( nID )
- {
- case IDC_CELL_BOOLEAN:
- nColNo = __COLUMN_NUM_BOOLEAN;
- break;
- case IDC_CELL_CHECKBOX:
- nColNo = __COLUMN_NUM_CHECKBOX;
- break;
- case IDC_CELL_CHECKCOMBOBOX:
- nColNo = __COLUMN_NUM_CHECKCOMBOBOX;
- break;
- case IDC_CELL_COLOR:
- nColNo = __COLUMN_NUM_COLOR;
- break;
- case IDC_CELL_COLORPART:
- nColNo = __COLUMN_NUM_COLORPART;
- break;
- case IDC_CELL_COMBOBOX:
- nColNo = __COLUMN_NUM_COMBOBOX;
- break;
- case IDC_CELL_CURRENCY:
- nColNo = __COLUMN_NUM_CURRENCY;
- break;
- case IDC_CELL_DATETIME:
- nColNo = __COLUMN_NUM_DATETIME;
- break;
- case IDC_CELL_DURATION:
- nColNo = __COLUMN_NUM_DURATION;
- break;
- case IDC_CELL_FILE:
- nColNo = __COLUMN_NUM_FILE;
- break;
- case IDC_CELL_FILEIMAGE:
- nColNo = __COLUMN_NUM_FILEIMAGE;
- break;
- case IDC_CELL_FOLDER:
- nColNo = __COLUMN_NUM_FOLDER;
- break;
- case IDC_CELL_FONT:
- nColNo = __COLUMN_NUM_FONT;
- break;
- case IDC_CELL_FONTFACENAME:
- nColNo = __COLUMN_NUM_FONTFACENAME;
- break;
- case IDC_CELL_FONTWEIGHT:
- nColNo = __COLUMN_NUM_FONTWEIGHT;
- break;
- case IDC_CELL_FRACTION:
- nColNo = __COLUMN_NUM_FRACTION;
- break;
- case IDC_CELL_HYPERLINK:
- nColNo = __COLUMN_NUM_HYPERLINK;
- break;
- case IDC_CELL_IPADDRESS:
- nColNo = __COLUMN_NUM_IPADDRESS;
- break;
- case IDC_CELL_NUMBER:
- nColNo = __COLUMN_NUM_NUMBER;
- break;
- case IDC_CELL_PASSWORD:
- nColNo = __COLUMN_NUM_PASSWORD;
- break;
- case IDC_CELL_PERCENTAGE:
- nColNo = __COLUMN_NUM_PERCENTAGE;
- break;
- case IDC_CELL_PICTURE:
- nColNo = __COLUMN_NUM_PICTURE;
- break;
- case IDC_CELL_PROGRESS:
- nColNo = __COLUMN_NUM_PROGRESS;
- break;
- case IDC_CELL_RADIOBUTTON:
- nColNo = __COLUMN_NUM_RADIOBUTTON;
- break;
- case IDC_CELL_RECTPART:
- nColNo = __COLUMN_NUM_RECTPART;
- break;
- case IDC_CELL_INPLACE_SLIDER:
- nColNo = __COLUMN_NUM_INPLACE_SLIDER;
- break;
- case IDC_CELL_INPLACE_SCROLLBAR:
- nColNo = __COLUMN_NUM_INPLACE_SCROLLBAR;
- break;
- case IDC_CELL_SCIENTIFIC:
- nColNo = __COLUMN_NUM_SCIENTIFIC;
- break;
- case IDC_CELL_SLIDER:
- nColNo = __COLUMN_NUM_SLIDER;
- break;
- case IDC_CELL_TEXT:
- nColNo = __COLUMN_NUM_TEXT;
- break;
- case IDC_CELL_UPDOWN:
- nColNo = __COLUMN_NUM_UPDOWN;
- break;
- case IDC_CELL_VARIANT:
- nColNo = __COLUMN_NUM_VARIANT;
- break;
- case IDC_CELL_HOTKEY:
- nColNo = __COLUMN_NUM_HOTKEY;
- break;
- case IDC_CELL_BUTTON:
- nColNo = __COLUMN_NUM_BUTTON;
- break;
- case IDC_CELL_OBJECT_SIZE:
- nColNo = __COLUMN_NUM_OBJECT_SIZE;
- break;
- case IDC_CELL_GEOGRAPHIC:
- nColNo = __COLUMN_NUM_GEOGRAPHIC;
- break;
- case IDC_CELL_MASKED_STRING:
- nColNo = __COLUMN_NUM_MASKED_STRING;
- break;
- case IDC_CELL_SYSTEM_NUMBER:
- nColNo = __COLUMN_NUM_SYSTEM_NUMBER;
- break;
- case IDC_CELL_SYSTEM_CURRENCY:
- nColNo = __COLUMN_NUM_SYSTEM_CURRENCY;
- break;
- default:
- return CPageBase::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
- }
-
- if( nColNo >= 0L
- && m_wndGrid.m_hWnd != NULL
- && ::IsWindow( m_wndGrid.m_hWnd )
- )
- {
- m_wndGrid.FocusSet( CPoint( nColNo, 0 ), true, true, true, false );
- m_wndGrid.SelectionSet( CRect( nColNo, 0, nColNo, m_wndGrid.RowCountGet() - 1 ), true, true, true );
- m_wndGrid.SetFocus();
- }
- return TRUE;
- }
- return CPageBase::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
- }
- #endif // #if (!defined __EXT_MFC_NO_GRIDWND)