本文整理汇总了C++中LPDIRECTDRAWSURFACE4::Blt方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECTDRAWSURFACE4::Blt方法的具体用法?C++ LPDIRECTDRAWSURFACE4::Blt怎么用?C++ LPDIRECTDRAWSURFACE4::Blt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECTDRAWSURFACE4
的用法示例。
在下文中一共展示了LPDIRECTDRAWSURFACE4::Blt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateFrameWin
void updateFrameWin()
{
RECT rcRect;
RECT destRect;
HRESULT ddrval;
POINT pt;
GetClientRect(hwnd,&destRect);
pt.x=pt.y=0;
ClientToScreen(hwnd,&pt);
OffsetRect(&destRect,pt.x,pt.y);
//////////////////////////////////////////////////////////////
// 두개의 페이지 전환이 이루어 지는 곳
// Blt() 함수가 실제로 비트맵을 그리는 함수
rcRect.left = 0;
rcRect.right = smScreenWidth;
rcRect.top = 0;
rcRect.bottom = smScreenHeight;
while(1)
{
ddrval=lpDDSPrimary->Blt(&destRect,lpDDSBack,&rcRect,NULL,NULL);
if(ddrval == DD_OK) break;
if(ddrval == DDERR_SURFACELOST)
{
// ddrval = restoreAll();
if(ddrval != DD_OK) return;
}
if(ddrval != DDERR_WASSTILLDRAWING) break;
}
}
示例2: updateFrameWin_Video
void updateFrameWin_Video()
{
RECT rcRect;
RECT rcRect1;
RECT rcRect2;
RECT rcRect3;
RECT rcRect4;
RECT destRect;
RECT destRect1;
RECT destRect2;
RECT destRect3;
RECT destRect4;
HRESULT ddrval;
POINT pt;
GetClientRect(hwnd,&destRect);
pt.x=pt.y=0;
ClientToScreen(hwnd,&pt);
OffsetRect(&destRect,pt.x,pt.y);
//////////////////////////////////////////////////////////////
// 두개의 페이지 전환이 이루어 지는 곳
// Blt() 함수가 실제로 비트맵을 그리는 함수
rcRect.left = 0;
rcRect.right = smScreenWidth;
rcRect.top = 0;
rcRect.bottom = smScreenHeight;
destRect1.left = 0;
destRect1.right = smScreenWidth;
destRect1.top = 0;
destRect1.bottom = ParkPlayRect.top;
destRect2.left = 0;
destRect2.right = ParkPlayRect.left;
destRect2.top = ParkPlayRect.top;
destRect2.bottom = ParkPlayRect.bottom;
destRect3.left = ParkPlayRect.right;
destRect3.right = smScreenWidth;
destRect3.top = ParkPlayRect.top;
destRect3.bottom = ParkPlayRect.bottom;
destRect4.left = 0;
destRect4.right = smScreenWidth;
destRect4.top = ParkPlayRect.bottom;
destRect4.bottom = smScreenHeight;
rcRect1.left = 0;
rcRect1.right = smScreenWidth;
rcRect1.top = 0;
rcRect1.bottom = ParkPlayRect.top;
rcRect2.left = 0;
rcRect2.right = ParkPlayRect.left;
rcRect2.top = ParkPlayRect.top;
rcRect2.bottom = ParkPlayRect.bottom;
rcRect3.left = ParkPlayRect.right;
rcRect3.right = smScreenWidth;
rcRect3.top = ParkPlayRect.top;
rcRect3.bottom = ParkPlayRect.bottom;
rcRect4.left = 0;
rcRect4.right = smScreenWidth;
rcRect4.top = ParkPlayRect.bottom;
rcRect4.bottom = smScreenHeight;
while(1)
{
//ddrval=lpDDSPrimary->Blt(&destRect,lpDDSBack,&rcRect,NULL,NULL);
ddrval=lpDDSPrimary->Blt(&destRect1,lpDDSBack,&rcRect1,NULL,NULL);
ddrval=lpDDSPrimary->Blt(&destRect2,lpDDSBack,&rcRect2,NULL,NULL);
ddrval=lpDDSPrimary->Blt(&destRect3,lpDDSBack,&rcRect3,NULL,NULL);
ddrval=lpDDSPrimary->Blt(&destRect4,lpDDSBack,&rcRect4,NULL,NULL);
if(ddrval == DD_OK) break;
if(ddrval == DDERR_SURFACELOST)
{
// ddrval = restoreAll();
if(ddrval != DD_OK) return;
}
if(ddrval != DDERR_WASSTILLDRAWING) break;
}
}