资源简介
vc中在Picture空间中显示png图片,使用重载OnPain和对话框背景色覆盖原图的方法实现了png半透明的显示并且不会加重阴影。支持bmp、jpg等多种格式

代码片段和文件信息
// PrintJPG.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “PrintJPG.h“
#include “PrintJPGDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPrintJPGApp
BEGIN_MESSAGE_MAP(CPrintJPGApp CWinApp)
//{{AFX_MSG_MAP(CPrintJPGApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPrintJPGApp construction
CPrintJPGApp::CPrintJPGApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CPrintJPGApp object
CPrintJPGApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CPrintJPGApp initialization
BOOL CPrintJPGApp::InitInstance()
{
GdiplusStartupInput gdiplusStartupInput;
if(Ok!=GdiplusStartup(&m_gdiplusToken
&gdiplusStartupInput
NULL))
{
::MessageBox(NULL _T(“Initialize GDI+ library failed“)
_T(“Error“) MB_OK|MB_IConerror);
return FALSE;
}
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
CPrintJPGDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 102373 2012-02-16 11:38 PrintPicture\16113811.gif
文件 108053 2012-02-16 11:47 PrintPicture\216114707.jpg
文件 1656814 2012-02-16 11:30 PrintPicture\6113022.bmp
文件 2159 2011-09-24 17:36 PrintPicture\bianhu.png
文件 119820 2012-03-27 18:10 PrintPicture\ClockBackchain1.png
文件 119820 2012-03-27 15:19 PrintPicture\ClockBackchain2.png
文件 3269 2012-03-27 18:07 PrintPicture\MyStatic.h
文件 157708 2012-03-27 18:10 PrintPicture\PrintJPG.aps
文件 776 2012-02-15 18:05 PrintPicture\PrintJPG.clw
文件 2169 2012-02-15 18:21 PrintPicture\PrintJPG.cpp
文件 227328 2012-03-27 18:16 PrintPicture\PrintJPG.exe
文件 1372 2012-02-15 18:22 PrintPicture\PrintJPG.h
文件 50176 2012-02-15 18:05 PrintPicture\PrintJPG.ncb
文件 48640 2012-02-15 18:05 PrintPicture\PrintJPG.opt
文件 1626 2012-02-15 18:05 PrintPicture\PrintJPG.plg
文件 4831 2012-03-27 18:10 PrintPicture\PrintJPG.rc
文件 882 2012-03-27 18:15 PrintPicture\PrintJPG.sln
..A..H. 20480 2012-03-27 18:16 PrintPicture\PrintJPG.suo
文件 8009 2012-03-27 16:20 PrintPicture\PrintJPG.vcxproj
文件 2087 2012-03-27 16:20 PrintPicture\PrintJPG.vcxproj.filters
文件 143 2012-02-15 18:06 PrintPicture\PrintJPG.vcxproj.user
文件 5740 2012-03-27 18:10 PrintPicture\PrintJPGDlg.cpp
文件 1718 2012-03-27 18:10 PrintPicture\PrintJPGDlg.h
文件 3615 2012-02-15 16:02 PrintPicture\ReadMe.txt
文件 1078 2012-02-15 16:02 PrintPicture\res\PrintJPG.ico
文件 400 2012-02-15 16:02 PrintPicture\res\PrintJPG.rc2
文件 955 2012-03-27 18:00 PrintPicture\Resource.h
文件 210 2012-02-15 16:02 PrintPicture\StdAfx.cpp
文件 1665 2012-03-27 15:10 PrintPicture\StdAfx.h
文件 3269 2012-03-27 18:07 MyStatic.h
............此处省略5个文件信息
相关资源
- PNG加密解密工具73383
- Windows异步套接字网络编程
- VC 获得文件属性 获取文件的创建时
- 基于MVC模式的会员管理系统
- silicon lab公司的收音IC SI47XX全套开发工
- 读者写者问题(读者优先,写者优先
- MFC程序-碰撞的小球
- vc 柱形图 CBarChart
- 用vc 写的导线测量,针对刚学测绘的
- 用VC 编写的仿QQ聊天室程序源代码
- 栅栏填充算法源码(VC)
- GDI自绘滚动条
- 简单的房屋租赁系统
- .net网站服装销售系统(MVC)
-
ob
jectARX给Auto CAD加工具条 - blowfish的vc2008工程.rar
- 画图程序MFC/VC/VC CRectTracker 串行化
- capon波束形成算法-VC实现
- 读取串口数据并画实时曲线的VC 程序
- VC 游戏编程—附源代码
- IpHlpApi.h&IpHlpApi.lib
- vc 6.0开发的流程图编辑器
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
- keil vcom windows 7 64bit 驱动
- vc URL编解码类
- vc编写中国象棋详细源码注释并附有视
- VC 围棋源代码
- 用VC 编写的基于SNMP的路由器拓扑程序
- vc利用MFC底层开发的二维GIS管理软件,
评论
共有 条评论