TabView.cpp
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:2k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- // TabView.cpp : implementation file
- //
- #include "stdafx.h"
- #include "IE.h"
- #include "TabView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CTabView
- CTabView::CTabView()
- {
- }
- CTabView::~CTabView()
- {
- }
- BEGIN_MESSAGE_MAP(CTabView, CView)
- //{{AFX_MSG_MAP(CTabView)
- ON_WM_CREATE()
- ON_WM_SIZE()
- //}}AFX_MSG_MAP
- ON_MESSAGE( WM_CREATE_IEVIEW , OnCreateIEView )
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CTabView drawing
- int CTabView::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (CView::OnCreate(lpCreateStruct) == -1)
- return -1;
- this->tab.Create( WS_CHILD | TCS_BOTTOM | TCS_FOCUSNEVER | TCS_OWNERDRAWFIXED , CRect( 0 , 0 , 1 , 1 ) , this , IDC_TAB );
- CFont f;
- f.CreatePointFont( 90 , "新宋体" );
- this->tab.SetFont( &f );
- f.Detach( );
- return 0;
- }
- void CTabView::OnDraw( CDC* pDC )
- {
- }
- void CTabView::OnSize(UINT nType, int cx, int cy)
- {
- CView::OnSize(nType, cx, cy);
- if( this->tab )
- this->tab.MoveWindow( 0 , 0 , cx , cy );
- }
- CIEView * CTabView::CreateIEView( void )
- {
- return ( CIEView * )this->SendMessage( WM_CREATE_IEVIEW );
- }
- CIEView * CTabView::OnCreateIEView( void )
- {
- CIEView * view = new CIEView( );
- view->Create( NULL , NULL , WS_CHILD , CRect( 0 , 0 , 1 , 1 ) , this , 0 );
- view->tab = &this->tab;
- view->index = this->tab.GetItemCount( );
- this->tab.AddWnd( view , NULL , false );
- return view;
- }
- CIEView * CTabView::GetIEView( int index )
- {
- if( index == -1 )
- index = this->tab.GetCurSel( );
- if( index < this->tab.GetItemCount( ) )
- return ( CIEView * )this->tab.GetWnd( index );
- return NULL;
- }
- BOOL CTabView::PreCreateWindow(CREATESTRUCT& cs)
- {
- cs.lpszClass = ::AfxRegisterWndClass( 0 , AfxGetApp( )->LoadStandardCursor( IDC_ARROW ) , ::CreateSolidBrush( ::GetSysColor( COLOR_APPWORKSPACE ) ) , NULL );
- return CView::PreCreateWindow(cs);
- }