myAlbum
所属分类:VC书籍
开发工具:Visual C++
文件大小:23104KB
下载次数:0
上传日期:2018-05-30 15:21:37
上 传 者:
i8myq
说明: VISUAL C++典型模块与项目实战大全书源程序,完成电子相册,按键翻转
(VISUAL C++ typical module and project actual combat book source program
Finish the electronic album, the button is turned over)
文件列表:
myAlbum (0, 2018-05-30)
myAlbum\004.psd (359472, 1970-01-01)
myAlbum\background (0, 1970-01-01)
myAlbum\background\000.jpg (292012, 1970-01-01)
myAlbum\background\003.jpg (107898, 1970-01-01)
myAlbum\background\004.jpg (109397, 1970-01-01)
myAlbum\background\0041.jpg (109397, 1970-01-01)
myAlbum\background\005.jpg (64150, 1970-01-01)
myAlbum\background\02005322200042.bmp (13398, 1970-01-01)
myAlbum\background\02005322200042.gif (1188, 1970-01-01)
myAlbum\background\02005322200042_small.jpg (8942, 1970-01-01)
myAlbum\background\102005322200137_small.jpg (9519, 1970-01-01)
myAlbum\background\142005322200038.bmp (11078, 1970-01-01)
myAlbum\background\142005322200038_small.jpg (8214, 1970-01-01)
myAlbum\background\bg001.bmp (1253878, 1970-01-01)
myAlbum\background\bg001.jpg (1074891, 1970-01-01)
myAlbum\background\bg001副本.gif (926134, 1970-01-01)
myAlbum\background\bg002.bmp (1343878, 1970-01-01)
myAlbum\background\bg002.jpg (516501, 1970-01-01)
myAlbum\background\Thumbs.db (27136, 1970-01-01)
myAlbum\button (0, 1970-01-01)
myAlbum\button\bitmap1.bmp (14802, 1970-01-01)
myAlbum\button\上一页.bmp (14050, 1970-01-01)
myAlbum\button\下一页.bmp (13862, 1970-01-01)
myAlbum\button\停止播放.bmp (13590, 1970-01-01)
myAlbum\button\停止播放.gif (9177, 1970-01-01)
myAlbum\button\停止自动播放.bmp (14802, 1970-01-01)
myAlbum\button\启动自动播放.bmp (13298, 1970-01-01)
myAlbum\button\播放音乐.bmp (13590, 1970-01-01)
myAlbum\button\播放音乐.gif (9281, 1970-01-01)
myAlbum\button\播放音乐.JPG (17315, 1970-01-01)
myAlbum\button\相册封面.bmp (14426, 1970-01-01)
myAlbum\button\相册底面.bmp (13674, 1970-01-01)
myAlbum\button\退出.bmp (13590, 1970-01-01)
myAlbum\button\退出.JPG (3138, 1970-01-01)
myAlbum\Cursor (0, 1970-01-01)
myAlbum\music (0, 1970-01-01)
myAlbum\music\bk001.WAV (19250044, 1970-01-01)
myAlbum\music\复件 bk001.WAv.lnk (456, 1970-01-01)
myAlbum\myAlbum.aps (1432076, 1970-01-01)
... ...
// PrintView.cpp : 实现文件
//
#include "stdafx.h"
#include "PrintView.h"
#include ".\mypreviewview.h"
#include
// CPrintView
IMPLEMENT_DYNCREATE(CPrintView, CView)
CPrintView::CPrintView()
{
}
CPrintView::~CPrintView()
{
}
BEGIN_MESSAGE_MAP(CPrintView, CView)
END_MESSAGE_MAP()
// CPrintView 绘图
void CPrintView::OnDraw(CDC* pDC)
{
// TODO: 在此添加绘制代码
}
// CPrintView 诊断
#ifdef _DEBUG
void CPrintView::AssertValid() const
{
CView::AssertValid();
}
void CPrintView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
// CPrintView 消息处理程序
BOOL CPrintView::OnPreparePrinting(CPrintInfo* pInfo)
{
// TODO: 调用 DoPreparePrinting 以调用“打印”对话框
if(m_pPrintWnd)
{
m_pPrintWnd->OnPreparePrinting(pInfo);
}
return DoPreparePrinting(pInfo);
}
void CPrintView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
{
// TODO: 在此添加专用代码和/或调用基类
CView::OnPrepareDC(pDC, pInfo);
}
void CPrintView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
// TODO: 在此添加专用代码和/或调用基类
CView::OnEndPrinting(pDC, pInfo);
}
void CPrintView::OnEndPrintPreview(CDC* pDC, CPrintInfo* pInfo, POINT point, CPreviewView* pView)
{
// TODO: 在此添加专用代码和/或调用基类
CView::OnEndPrintPreview(pDC, pInfo, point, pView);
GetParentFrame()->DestroyWindow();
}
void CPrintView::OnPrint(CDC* pDC, CPrintInfo* pInfo)
{
// TODO: 在此添加专用代码和/或调用基类
m_pPrintWnd->OnPrinting(pDC, pInfo);
}
void CPrintView::DoPrintPreviewX()
{
//SetPrintDialog();
if(m_pPrintWnd)
{
CPrintPreviewState* pState = new CPrintPreviewState;
if(!DoPrintPreview(AFX_IDD_PREVIEW_TOOLBAR, this, RUNTIME_CLASS(CMyPreviewView), pState))
{
delete pState;
}
CFrameWnd *pFrameWnd = m_pPrintWnd->m_pPrintFrameWnd;
CMyPreviewView *pMyPreview = (CMyPreviewView*)pFrameWnd->GetActiveView();
pMyPreview->SetPrintWnd(m_pPrintWnd);
}
}
void CPrintView::SetPrintWnd(CPrintXDlg *pWnd)
{
m_pPrintWnd = pWnd;
}
void CPrintView::DoPrintFileX()
{
//CString strPrinter = GetDefaultPrinter();
CPrintInfo PrintInfo;
if(!PrintInfo.m_pPD)
{
return;
}
OnPreparePrinting(&PrintInfo);
CString strTitle = "测试项目";
CString strPortName;
UINT nFormatID;
DOCINFO doc;
memset(&doc, 0, sizeof(DOCINFO));
doc.cbSize = sizeof(DOCINFO);
doc.lpszDocName = strTitle;
doc.lpszOutput = NULL;
strPortName = PrintInfo.m_pPD->GetPortName();
nFormatID = AFX_IDS_PRINTONPORT;
CDC PrintDC;
if (!PrintInfo.m_bDocObject)
{
PrintDC.Attach(PrintInfo.m_pPD->m_pd.hDC); // attach printer dc
PrintDC.m_bPrinting = TRUE;
}
OnBeginPrinting(&PrintDC, &PrintInfo);
if(PrintDC.m_hDC == NULL)
{
return;
}
PrintDC.StartDoc(&doc);
UINT nEndPage = PrintInfo.GetToPage();
UINT nStartPage = PrintInfo.GetFromPage();
for(PrintInfo.m_nCurPage = nStartPage; PrintInfo.m_nCurPage <= nEndPage; PrintInfo.m_nCurPage++)
{
OnPrepareDC(&PrintDC, &PrintInfo);
PrintDC.StartPage();
OnPrint(&PrintDC, &PrintInfo);
PrintDC.EndPage();
}
PrintDC.EndDoc();
OnEndPrinting(&PrintDC, &PrintInfo); // clean up after printing
PrintDC.Detach(); // will be cleaned up by CPrintInfo destructor
}
近期下载者:
相关文件:
收藏者: