文件名称:05
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:6.31mb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一个基于MFC的简单的屏幕截图工具,其中实现了热键截取-DWORD size=bitmap.bmWidthBytes*bitmap.bmHeight //图片数据大小
LPSTR lpData=(LPSTR)GlobalAlloc(GPTR,size)
int panelsize = 0 //记录调色板大小
if(bitmap.bmBitsPixel<16) //判断是否为真彩色位图
panelsize =(int)pow(2,bitmap.bmBitsPixel*sizeof(RGBQUAD))
BITMAPINFOHEADER*pBInfo = (BITMAPINFOHEADER*)LocalAlloc(LPTR,
sizeof(BITMAPINFO)+panelsize) //位图头指针
pBInfo->biBitCount = bitmap.bmBitsPixel //位图像素
pBInfo->biClrImportant = 0
pBInfo->biCompression = 0
pBInfo->biHeight = bitmap.bmHeight //位图高
pBInfo->biPlanes = bitmap.bmPlanes
pBInfo->biSize = sizeof(BITMAPINFO)
pBInfo->biSizeImage = bitmap.bmWidthBytes*bitmap.bmHeight //数据
pBInfo->biWidth = bitmap.bmWidth //位图宽
pBInfo->biXPelsPerMeter = 0
pBInfo->biYPelsPerMeter = 0
GetDIBits(memDC.m_hDC,bmp,0,pBInfo->biHeight,lpData,
(BITMAPINFO*)pBInfo,DIB_RGB_COLORS)
LPSTR lpData=(LPSTR)GlobalAlloc(GPTR,size)
int panelsize = 0 //记录调色板大小
if(bitmap.bmBitsPixel<16) //判断是否为真彩色位图
panelsize =(int)pow(2,bitmap.bmBitsPixel*sizeof(RGBQUAD))
BITMAPINFOHEADER*pBInfo = (BITMAPINFOHEADER*)LocalAlloc(LPTR,
sizeof(BITMAPINFO)+panelsize) //位图头指针
pBInfo->biBitCount = bitmap.bmBitsPixel //位图像素
pBInfo->biClrImportant = 0
pBInfo->biCompression = 0
pBInfo->biHeight = bitmap.bmHeight //位图高
pBInfo->biPlanes = bitmap.bmPlanes
pBInfo->biSize = sizeof(BITMAPINFO)
pBInfo->biSizeImage = bitmap.bmWidthBytes*bitmap.bmHeight //数据
pBInfo->biWidth = bitmap.bmWidth //位图宽
pBInfo->biXPelsPerMeter = 0
pBInfo->biYPelsPerMeter = 0
GetDIBits(memDC.m_hDC,bmp,0,pBInfo->biHeight,lpData,
(BITMAPINFO*)pBInfo,DIB_RGB_COLORS)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
05/
05/GraspBmp/
05/GraspBmp/2011111411m1.bmp
05/GraspBmp/Debug/
05/GraspBmp/Debug/GraspBmp.bsc
05/GraspBmp/Debug/GraspBmp.exe
05/GraspBmp/Debug/GraspBmp.ilk
05/GraspBmp/Debug/GraspBmp.obj
05/GraspBmp/Debug/GraspBmp.pch
05/GraspBmp/Debug/GraspBmp.pdb
05/GraspBmp/Debug/GraspBmp.res
05/GraspBmp/Debug/GraspBmp.sbr
05/GraspBmp/Debug/GraspBmpDlg.obj
05/GraspBmp/Debug/GraspBmpDlg.sbr
05/GraspBmp/Debug/StdAfx.obj
05/GraspBmp/Debug/StdAfx.sbr
05/GraspBmp/Debug/vc60.idb
05/GraspBmp/Debug/vc60.pdb
05/GraspBmp/GraspBmp.aps
05/GraspBmp/GraspBmp.clw
05/GraspBmp/GraspBmp.cpp
05/GraspBmp/GraspBmp.dsp
05/GraspBmp/GraspBmp.dsw
05/GraspBmp/GraspBmp.h
05/GraspBmp/GraspBmp.opt
05/GraspBmp/GraspBmp.plg
05/GraspBmp/GraspBmp.rc
05/GraspBmp/GraspBmpDlg.cpp
05/GraspBmp/GraspBmpDlg.h
05/GraspBmp/ReadMe.txt
05/GraspBmp/res/
05/GraspBmp/resource.h
05/GraspBmp/res/GraspBmp.ico
05/GraspBmp/res/GraspBmp.rc2
05/GraspBmp/res/保存.bmp
05/GraspBmp/res/取消.bmp
05/GraspBmp/res/屏幕截图工具.bmp
05/GraspBmp/res/选择.bmp
05/GraspBmp/StdAfx.cpp
05/GraspBmp/StdAfx.h
05/GraspBmp/System.ini
05/GraspBmp/
05/GraspBmp/2011111411m1.bmp
05/GraspBmp/Debug/
05/GraspBmp/Debug/GraspBmp.bsc
05/GraspBmp/Debug/GraspBmp.exe
05/GraspBmp/Debug/GraspBmp.ilk
05/GraspBmp/Debug/GraspBmp.obj
05/GraspBmp/Debug/GraspBmp.pch
05/GraspBmp/Debug/GraspBmp.pdb
05/GraspBmp/Debug/GraspBmp.res
05/GraspBmp/Debug/GraspBmp.sbr
05/GraspBmp/Debug/GraspBmpDlg.obj
05/GraspBmp/Debug/GraspBmpDlg.sbr
05/GraspBmp/Debug/StdAfx.obj
05/GraspBmp/Debug/StdAfx.sbr
05/GraspBmp/Debug/vc60.idb
05/GraspBmp/Debug/vc60.pdb
05/GraspBmp/GraspBmp.aps
05/GraspBmp/GraspBmp.clw
05/GraspBmp/GraspBmp.cpp
05/GraspBmp/GraspBmp.dsp
05/GraspBmp/GraspBmp.dsw
05/GraspBmp/GraspBmp.h
05/GraspBmp/GraspBmp.opt
05/GraspBmp/GraspBmp.plg
05/GraspBmp/GraspBmp.rc
05/GraspBmp/GraspBmpDlg.cpp
05/GraspBmp/GraspBmpDlg.h
05/GraspBmp/ReadMe.txt
05/GraspBmp/res/
05/GraspBmp/resource.h
05/GraspBmp/res/GraspBmp.ico
05/GraspBmp/res/GraspBmp.rc2
05/GraspBmp/res/保存.bmp
05/GraspBmp/res/取消.bmp
05/GraspBmp/res/屏幕截图工具.bmp
05/GraspBmp/res/选择.bmp
05/GraspBmp/StdAfx.cpp
05/GraspBmp/StdAfx.h
05/GraspBmp/System.ini
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.