staticview.cpp
资源名称:语音程序.rar [点击查看]
上传用户:lczygg
上传日期:2007-07-03
资源大小:2947k
文件大小:2k
源码类别:
语音合成与识别
开发平台:
Visual C++
- // staticview.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Bedlamite.h"
- #include "staticview.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CStaticView
- IMPLEMENT_DYNCREATE(CStaticView, CView)
- CStaticView::CStaticView()
- {
- }
- CStaticView::~CStaticView()
- {
- }
- BEGIN_MESSAGE_MAP(CStaticView, CView)
- //{{AFX_MSG_MAP(CStaticView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CStaticView drawing
- void CStaticView::OnDraw(CDC* pDC)
- {
- CDocument* pDoc = GetDocument();
- // TODO: add draw code here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CStaticView diagnostics
- #ifdef _DEBUG
- void CStaticView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CStaticView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- CBedlamiteDoc* CStaticView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBedlamiteDoc)));
- return (CBedlamiteDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CStaticView message handlers
- void CStaticView::OnInitialUpdate()
- {
- CView::OnInitialUpdate();
- CRect rc(0, 0, 400, 510);
- m_Static.Create(_T(""), WS_CHILD | WS_VISIBLE | SS_CENTER, rc, this);
- }
- void CStaticView::StartScroll(CString sInfo)
- {
- m_Static.SetCredits(sInfo,'|');
- m_Static.SetSpeed(DISPLAY_MEDIUM);
- m_Static.SetTransparent();
- m_Static.StartScrolling();
- }