Location:
Search - bitblt srccopy
Search list
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: 双缓冲即在内存中创建一个与屏幕绘图区域一致的对象,先将图形绘制到内存中的这个对象上,再一次性将这个对象上的图形拷贝到屏幕上,这样能大大加快绘图的速度。双缓冲实现过程如下:
1、在内存中创建与画布一致的缓冲区
BufferBmp=new Graphics::TBitmap()
BufferBmp->Canvas->Handle=CreateCompatibleDC(Canvas->Handle)
BufferBmp->Width=Width
BufferBmp->Height=Height
2、在缓冲区画图
BufferBmp->Canvas->Brush->Color=clBtnFace
BufferBmp->Canvas->FillRect(Rect(0,0,Width,Height))
BufferBmp->Canvas->MoveTo(…)
…………………………
3、将缓冲区位图拷贝到当前画布上
BitBlt(Canvas->Handle,0,0,Width,Height,BufferBmp->Canvas->Handle,0,0,SRCCOPY)
4、释放内存缓冲区
delete BufferBmp
Platform: |
Size: 2754 |
Author: Michael |
Hits:
Description: 屏幕抓图的源代码。可以全屏抓图,也可以部分抓图。如果要抓叠加窗口的,需要在bitblt函数加上“SRCCOPY|CAPTUREBLT”
Platform: |
Size: 89890 |
Author: 周锦志 |
Hits:
Description: 本程序通过BitBlt在VC中应用,体现出了BitBlt在贴图过程中的高速,以及它在二维游戏编辑的广泛应用-the procedure BitBlt in VC applications, BitBlt reflected in the mapping process of a high-speed, and its two-dimensional game in the extensive editing application! !
Platform: |
Size: 300032 |
Author: JELL |
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: 屏幕抓图的源代码。可以全屏抓图,也可以部分抓图。如果要抓叠加窗口的,需要在bitblt函数加上“SRCCOPY|CAPTUREBLT”-Screenshot of the source code. Full-screen drawings can also be part of the drawings. If the overlay window grasp the need to bitblt function with SRCCOPY | CAPTUREBLT
Platform: |
Size: 89088 |
Author: 周锦志 |
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: vs2017 c++ mfc
利用CimageDC 类 截屏显示保存文件
CWindowDC winDC(pWnd);
pWnd->GetWindowRect(&rect);
int nBPP = winDC.GetDeviceCaps(BITSPIXEL) * winDC.GetDeviceCaps(PLANES);
if (nBPP < 24)
{
nBPP = 24;
}
bStat = image.Create(rect.Width(), rect.Height(), nBPP);
ASSERT(bStat); //断言
CImageDC imageDC(image);
::BitBlt(imageDC, 0, 0, rect.Width(), rect.Height(), winDC, 0, 0, SRCCOPY); //填充数据(vs2017 c++ mfc
utilize Class CimageDC Screen capture save file)
Platform: |
Size: 66560 |
Author: qq8533 |
Hits: