Location:
Search - StretchBlt
Search list
Description: Displaying a large bitmap file on a dialog box, in its original size, is quite difficult in the VC++ environment. However, it is possible to display a large bitmap to a predefined area of the dialog by using the StretchBlt( ) function.The major disadvantage of this is that the clarity of the image will be lost. Check out this article for displaying large bitmaps into the desired area of your dialog box in its original size with a scrolling technique used to show the entire bitmap.
滚动显示位图
在VC++环境下,在一个对话框中显示一个原始尺寸的大小的位图文件相当是困难的。然而,通过使用 StretchBlt()函数一个给定的区域显示一个大的位图是可能的。主要的缺点是图像将会失真。看了这篇通过卷动技术显示整个位图技术的文章,你将能够以它的原始尺寸在给定对话框的区域内显示一个大位图。
来源: http://www.codeguru.com/bitmap/ScrollBitmap.html
Platform: |
Size: 31909 |
Author: |
Hits:
Description: 利用线性插值的方式,实现图像的平滑放大。克服StretchBlt在放大时产生的马赛克现象。-using linear interpolation modes to achieve a smooth image to enlarge it. Large overcome StretchBlt in the mosaics at the phenomenon.
Platform: |
Size: 71604 |
Author: 心港 |
Hits:
Description: for VB6,使用StretchBlt API来做图形水平、垂直、90、180、270度翻转特效
-for VB6, using StretchBlt do graphics API level, vertical, 90, 180,270 was turned effects
Platform: |
Size: 4380 |
Author: 王明仁 |
Hits:
Description: 一个华丽的界面
使用方法
方法一:
ModifyStyle( WS_CAPTION, WS_MINIMIZEBOX, SWP_DRAWFRAME ) //设置图标
方法二:
不用上面的,但是要去掉对话框的title属性
void CPageDlg::OnPaint()
{
if (IsIconic())
{
...
}
else
{
// CDialog::OnPaint() //一定要去掉该句
CPaintDC dc(this) //对话框的dc
CDC dcMem
dcMem.CreateCompatibleDC(&dc) //创建与对话框dc兼容的内存dc
CRect rect
GetClientRect(&rect)
BITMAP bitMap
m_bmpBackground.GetBitmap(&bitMap)
CBitmap *pbmpOld=dcMem.SelectObject(&m_bmpBackground) //将背景位图选入内存dc中
dc.StretchBlt(0,0,rect.Width(),rect.Height(),&dcMem,0,0,bitMap.bmWidth,bitMap.bmHeight,SRCCOPY) //将内存dc中的位图拉伸显示在对话框的dc中
//dc.BitBlt(0,0,rect.Width(),rect.Height(),&dcMem,0,0,SRCCOPY)
}
}
-a gorgeous interface to use a method : ModifyStyle (WS_CAPTION, WS_MINIMIZEBOX. SWP_DRAWFRAME) / / Settings icon two ways : not above, However, to remove the title attribute dialog void CPageDlg : : OnPaint () (if (IsIconic ()) (...) else (/ / CDia log : : OnPaint () / / must remove the sentence CPaintDC dc (this) / / Dialog dc CDC dcMem dcMem.CreateCompatibleDC (
Platform: |
Size: 148507 |
Author: 黄景天 |
Hits:
Description: 最临近插值、双线性内插值、三次卷积法、StretchBlt法实现图像平滑放大
Platform: |
Size: 40515 |
Author: 李华峰 |
Hits:
Description: 巧用StretchBlt实现图像放大镜,供大家学习使用
Platform: |
Size: 58468 |
Author: chengcantao |
Hits:
Description: Displaying a large bitmap file on a dialog box, in its original size, is quite difficult in the VC++ environment. However, it is possible to display a large bitmap to a predefined area of the dialog by using the StretchBlt( ) function.The major disadvantage of this is that the clarity of the image will be lost. Check out this article for displaying large bitmaps into the desired area of your dialog box in its original size with a scrolling technique used to show the entire bitmap. 滚动显示位图 在VC++环境下,在一个对话框中显示一个原始尺寸的大小的位图文件相当是困难的。然而,通过使用 StretchBlt()函数一个给定的区域显示一个大的位图是可能的。主要的缺点是图像将会失真。看了这篇通过卷动技术显示整个位图技术的文章,你将能够以它的原始尺寸在给定对话框的区域内显示一个大位图。 来源: http://www.codeguru.com/bitmap/ScrollBitmap.html- Displaying a large bitmap file on a dialog box, in its original size, is quite difficult in the VC++ environment. However, it is possible to display a large bitmap to a predefined area of the dialog by using the StretchBlt( ) function.The major disadvantage of this is that the clarity of the image will be lost. Check out this article for displaying large bitmaps into the desired area of your dialog box in its original size with a scrolling technique used to show the entire bitmap.
Platform: |
Size: 31744 |
Author: 徐丽志 |
Hits:
Description: 原创,实现了Windows抓屏和保存。其实编写时主要目的是测试StretchBlt函数,此函数在许多机器上运行有BUG,可以用这个程序测试。-originality, the realization of the Windows Capturing the Screen and preservation. In fact, the main purpose of writing is to test StretchBlt function, this function in many machines running on a BUG, can use this test procedure.
Platform: |
Size: 12288 |
Author: 张贸 |
Hits:
Description: 利用线性插值的方式,实现图像的平滑放大。克服StretchBlt在放大时产生的马赛克现象。-using linear interpolation modes to achieve a smooth image to enlarge it. Large overcome StretchBlt in the mosaics at the phenomenon.
Platform: |
Size: 84992 |
Author: 心港 |
Hits:
Description: for VB6,使用StretchBlt API来做图形水平、垂直、90、180、270度翻转特效
-for VB6, using StretchBlt do graphics API level, vertical, 90, 180,270 was turned effects
Platform: |
Size: 4096 |
Author: 王明仁 |
Hits:
Description: 一个华丽的界面
使用方法
方法一:
ModifyStyle( WS_CAPTION, WS_MINIMIZEBOX, SWP_DRAWFRAME ) //设置图标
方法二:
不用上面的,但是要去掉对话框的title属性
void CPageDlg::OnPaint()
{
if (IsIconic())
{
...
}
else
{
// CDialog::OnPaint() //一定要去掉该句
CPaintDC dc(this) //对话框的dc
CDC dcMem
dcMem.CreateCompatibleDC(&dc) //创建与对话框dc兼容的内存dc
CRect rect
GetClientRect(&rect)
BITMAP bitMap
m_bmpBackground.GetBitmap(&bitMap)
CBitmap *pbmpOld=dcMem.SelectObject(&m_bmpBackground) //将背景位图选入内存dc中
dc.StretchBlt(0,0,rect.Width(),rect.Height(),&dcMem,0,0,bitMap.bmWidth,bitMap.bmHeight,SRCCOPY) //将内存dc中的位图拉伸显示在对话框的dc中
//dc.BitBlt(0,0,rect.Width(),rect.Height(),&dcMem,0,0,SRCCOPY)
}
}
-a gorgeous interface to use a method : ModifyStyle (WS_CAPTION, WS_MINIMIZEBOX. SWP_DRAWFRAME)// Settings icon two ways : not above, However, to remove the title attribute dialog void CPageDlg : : OnPaint () (if (IsIconic ()) (...) else (//CDia log : : OnPaint ()// must remove the sentence CPaintDC dc (this)// Dialog dc CDC dcMem dcMem.CreateCompatibleDC (
Platform: |
Size: 148480 |
Author: 黄景天 |
Hits:
Description: 最临近插值、双线性内插值、三次卷积法、StretchBlt法实现图像平滑放大-Most near the interpolation, bilinear with interpolation, cubic convolution method, StretchBlt Larger Image Smoothing Method
Platform: |
Size: 39936 |
Author: |
Hits:
Description: 巧用StretchBlt实现图像放大镜,供大家学习使用-Using a magnifying glass StretchBlt image for all to learn to use
Platform: |
Size: 58368 |
Author: chengcantao |
Hits:
Description: 可以轻松实现位图的拉升缩放等操作,可以轻松实现位图的拉升缩放等操作-Can easily achieve the try for bitmap scaling operations, can easily achieve the try for bitmap scaling operations
Platform: |
Size: 45056 |
Author: meiyi |
Hits:
Description: 在单文档框架结构的背景窗口上显示图案。重载视图OnEraseBkgnd函数,添加代码:if(!m_bAnimatedBkgnd)
pDC->StretchBlt(0,0,
rcClient.right-rcClient.left,
rcClient.bottom-rcClient.top,
&dcMem,
0,0,
bm.bmWidth,
bm.bmHeight,
SRCCOPY)
else
{
int x=0
int y=0
while(y<rcClient.bottom-rcClient.top)
{
while(x<rcClient.right-rcClient.left)
{
pDC->BitBlt(x,y,
bm.bmWidth,
bm.bmHeight,
&dcMem,
0,0,
SRCCOPY)
x+=bm.bmWidth
}
x=0
y+=bm.bmHeight
}
}-Frame structure in a single document window to show the background patterns. View OnEraseBkgnd overloaded function, add the code: if (! M_bAnimatedBkgnd) pDC-
Platform: |
Size: 217088 |
Author: linxiuguo |
Hits:
Description: 图形图像处理,是本人最近用到的几个技术,希望跟大家交流交流,共同学习,共同进步-picture combin
Platform: |
Size: 3072 |
Author: 郭大万 |
Hits:
Description: 读入位图,并对位图进行伸缩处理,使用StretchBlt()函数实现-Read into the bitmap, and bitmap to scalable processing, use StretchBlt () function implementation
Platform: |
Size: 570368 |
Author: 清风斜阳 |
Hits:
Description: 其实原理就是捕获屏幕画面然后再把图像传给客户机。原理很简单:
1、先利用hdc=GetWindowDC(NULL) 得到桌面的hdc
2、memhdc=CreateCompatibleDC(hdc) 根据桌面的hdc创建一个和屏幕相同的内存DC
3、StretchBlt(memhdc,0, 0, nWid,nHei, hdc, 0, 0,nWid,nHei, SRCCOPY) ,把屏幕的图像复制到内存DC这时你已经在内存中得到了屏幕的图像了。这是设备相关的DDB图像,如果希望转换成设备无关的DIB图像,只要在DDB图像前创建一个标准的BITMAP文件头就可以了(DDBtoDIB( bitmap, BI_RGB, pal ))。
4、得到图像数据(如果考虑速度的话可以把图像压缩)
5、数据传输(远程监控)
“在这里,我们先来看看截获当前桌面是如何实现的。关于远程捕获,只要在下面的基础上加上网络传输部分就OK了。下面介绍的是捕获桌面技术的基础,具体截屏代码如下:
-In principle is to capture screen picture then pictures to the client. Principle is very simple:
1, first using HDC detected by FCM (NULL) GetWindowDC = Get the desktop HDC detected by FCM
2, memhdc = CreateCompatibleDC (HDC detected by FCM), According to the desktop HDC detected by FCM create a same memory DC and screen
3 and StretchBlt (0, 0, memhdc, nWid, nHei, 0, 0, HDC detected by FCM, nWid, nHei SRCCOPY) , The screen, the image to the memory when you are already in memory DC got screen image. This is related to the equipment, if hope DDB image converted image of device-independent DIB in DDB images, before creating a BITMAP standard file header can (DDBtoDIB BITMAP, Pal, BI_RGB ().
4 and image data (if consider speed can put the image compression)
5 and data transmission (remote monitoring)
"Here, we ll look at how the desktop is intercepted. About remote capture, just below the basis and network transmission parts with respect to OK. Here is the foundation, the desktop
Platform: |
Size: 2048 |
Author: xushuangjay |
Hits:
Description: VC 用CDC的StretchBlt实现图像放大镜,很值得初学VC图像编程人员参考。-VC Image with the CDC' s StretchBlt magnifying glass, it is worthy of reference for beginner programmers VC images.
Platform: |
Size: 1024 |
Author: yumin |
Hits:
Description: win32 stretchblt example
Platform: |
Size: 30720 |
Author: cjkim |
Hits: