【VC开源代码栏目提醒】:以下是网学会员为您推荐的VC开源代码-LoadResView.cpp,希望本篇文章对您学习有所帮助。
// LoadResView.cpp : implementation of the CLoadResView class
//
#include "stdafx.h"
#include "LoadRes.h"
#include "LoadResDoc.h"
#include "LoadResView.h"
#include "Mmsystem.h"
#pragma comment (lib,"Winmm.lib")
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLoadResView
IMPLEMENT_DYNCREATE(CLoadResView, CFormView)
BEGIN_MESSAGE_MAP(CLoadResView, CFormView)
//{{AFX_MSG_MAP(CLoadResView)
ON_BN_CLICKED(IDC_DEMOWAVE, OnDemoWave)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLoadResView construction/destruction
CLoadResView::CLoadResView()
: CFormView(CLoadResView::IDD)
{
//{{AFX_DATA_INIT(CLoadResView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CLoadResView::~CLoadResView()
{
}
void CLoadResView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLoadResView)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CLoadResView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
void CLoadResView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CLoadResView printing
BOOL CLoadResView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CLoadResView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CLoadResView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
void CLoadResView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}
/////////////////////////////////////////////////////////////////////////////
// CLoadResView diagnostics
#ifdef _DEBUG
void CLoadResView::AssertValid() const
{
CFormView::AssertValid();
}
void CLoadResView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CLoadResDoc* CLoadResView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CLoadResDoc)));
return (CLoadResDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CLoadResView message handlers
void CLoadResView::OnDemoWave()
{
PlaySound(MAKEINTRESOURCE(IDR_BUTTONWAVE),AfxGetResourceHandle(),
SND_ASYNC|SND_RESOURCE|SND_NODEFAULT);
}
上一篇:
LoadResDoc.cpp
下一篇:
ASP小区停车管理系统(Access)(含录像)