b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

bitblt_bitblt stretchblt_bitblt中源设备的像素(4)

电脑杂谈  发布时间:2017-01-20 00:03:23  来源:网络整理

if( mPos.y < 0 ) mPos.y= 0;

if( mFullViewTog == 0)

{

// 显示真彩位图

::BitBlt(dc.m_hDC,0,0, mDispR.Width(), mDispR.Height(),

hMemDC,mPos.x,mPos.y, SRCCOPY);

} else {

::StretchBlt(dc.m_hDC,0,0, mDispR.Width(), mDispR.Height(),

hMemDC,0,0, mpBitmapInfo- >biWidth, mpBitmapInfo-

>biHeight, SRCCOPY);

}

// 结束显示真彩位图

::DeleteObject(SelectObject(hMemDC,hBitmapOld));

// 删 除 位 图

} else {

// 使用视频函数显示位图

if( mPos.x > (mpBitmapInfo- >biWidth - mDispR.Width() ))

mPos.x= mpBitmapInfo- >biWidth - mDispR.Width() ;

if( mPos.y > (mpBitmapInfo- >biHeight- mDispR.Height()))

mPos.y= mpBitmapInfo- >biHeight- mDispR.Height();

if( mPos.x < 0 ) mPos.x= 0;

if( mPos.y < 0 ) mPos.y= 0;

// 显示真彩位图

DrawDibRealize( m_hDrawDib, dc.GetSafeHdc(), TRUE);

if( mFullViewTog == 0)

{

Wid.x= mDispR.Width();

Wid.y= mDispR.Height();

// 1:1 显示时, 不能大于图形大小

if( Wid.x > mpBitmapInfo- >biWidth )

Wid.x = mpBitmapInfo- >biWidth;

if( Wid.y > mpBitmapInfo- >biHeight)

Wid.y = mpBitmapInfo- >biHeight;

DrawDibDraw( m_hDrawDib, dc.GetSafeHdc()

, 0, 0, Wid.x, Wid.y,

mpBitmapInfo, (LPVOID) (mpBitsSrc+bfoffBits),

mPos.x, mPos.y, Wid.x, Wid.y, DDF_BACKGROUNDPAL);

} else {

DrawDibDraw( m_hDrawDib, dc.GetSafeHdc(),

0, 0, mDispR.Width(), mDispR.Height(),

mpBitmapInfo, (LPVOID) (mpBitsSrc+bfoffBits),

0, 0, mpBitmapInfo- >biWidth, mpBitmapInfo- >biHeight,

DDF_BACKGROUNDPAL);

}

}

return;

}

---- 五、使用CViewBimap类显示BMP位图

---- 2. 在Visual C++5.0中点击下拉式菜单Project- >Add To project- >Files...,将Bitmap0.h和Bitmap0.cpp添加到工程文件中。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-27468-4.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...