|
CBitmap m_bitmap
HBITMAP p=SHLoadDIBitmap(_T("\\c.bmp"));
CBitmap m_bitmap.Attach(p);
m_bitmap.GetBitmap(&bm);
CDC pDC = GetDC();
if(!memdc.GetSafeHdc())
{
memdc.CreateCompatibleDC(pDC);
memdc.SelectObject(&m_bitmap);
}
pDC->StretchBlt(AX,AY,ACX,ACY,&memdc,g_ViewPortX,g_ViewPortY,ACX,ACY,SRCCOPY);
pDC->SetBkMode(TRANSPARENT);
pDC->MoveTo(0,ACY/2);
pDC->LineTo(ACX,ACY/2);
pDC->MoveTo(ACX/2,0);
pDC->LineTo(ACX/2,ACY);
pDC->ExtTextOut(30,30,ETO_OPAQUE,NULL,_T("1111"),NULL );
pDC->ExtTextOut(230,30,ETO_OPAQUE,NULL,_T("1222"),NULL );
pDC->ExtTextOut(30,230,ETO_OPAQUE,NULL,_T("1333"),NULL );
怪现象:
1.贴图与后画的线和字不同步,好像图更新的次数多,画的有延迟和缺帧现象
2,写的字中只有第三行不闪烁,其余闪烁非常厉害
|
|