BedlamiteView.cpp
资源名称:语音程序.rar [点击查看]
上传用户:lczygg
上传日期:2007-07-03
资源大小:2947k
文件大小:3k
源码类别:
语音合成与识别
开发平台:
Visual C++
- // BedlamiteView.cpp : implementation of the CBedlamiteView class
- //
- #include "stdafx.h"
- #include "Bedlamite.h"
- #include "BedlamiteView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CBedlamiteView
- IMPLEMENT_DYNCREATE(CBedlamiteView, CListView)
- BEGIN_MESSAGE_MAP(CBedlamiteView, CListView)
- //{{AFX_MSG_MAP(CBedlamiteView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- // Standard printing commands
- ON_COMMAND(ID_FILE_PRINT, CListView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_DIRECT, CListView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_PREVIEW, CListView::OnFilePrintPreview)
- ON_MESSAGE(WM_DISPLAYRESULT, OnDisplayResult)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CBedlamiteView construction/destruction
- CBedlamiteView::CBedlamiteView()
- {
- // TODO: add construction code here
- }
- CBedlamiteView::~CBedlamiteView()
- {
- }
- BOOL CBedlamiteView::PreCreateWindow(CREATESTRUCT& cs)
- {
- cs.style |= LVS_REPORT;
- return CListView::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CBedlamiteView drawing
- void CBedlamiteView::OnDraw(CDC* pDC)
- {
- CBedlamiteDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- }
- void CBedlamiteView::OnInitialUpdate()
- {
- CListView::OnInitialUpdate();
- ASSERT(GetStyle() & LVS_REPORT);
- CListCtrl& theCtrl = GetListCtrl();
- theCtrl.InsertColumn(0, _T("问题集"), LVCFMT_LEFT, 260);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CBedlamiteView printing
- BOOL CBedlamiteView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CBedlamiteView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CBedlamiteView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- /////////////////////////////////////////////////////////////////////////////
- // CBedlamiteView diagnostics
- #ifdef _DEBUG
- void CBedlamiteView::AssertValid() const
- {
- CListView::AssertValid();
- }
- void CBedlamiteView::Dump(CDumpContext& dc) const
- {
- CListView::Dump(dc);
- }
- CBedlamiteDoc* CBedlamiteView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBedlamiteDoc)));
- return (CBedlamiteDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CBedlamiteView message handlers
- void CBedlamiteView::OnDisplayResult(WPARAM wParam, LPARAM lParam)
- {
- CString s = (char*)(BSTR)wParam;
- CListCtrl& theCtrl = GetListCtrl();
- theCtrl.InsertItem(0, s);
- }