帮我解析一下VC代码
代码如下:voidInfoNES_LoadFrame(){/**Transferthecontentsofworkframeonthescreen**///Setscre...
代码如下:
void InfoNES_LoadFrame()
{
/*
* Transfer the contents of work frame on the screen
*
*/
// Set screen data
memcpy( pScreenMem, WorkFrame, NES_DISP_WIDTH * NES_DISP_HEIGHT * 2 );
// Screen update
HDC hDC = GetDC( hWndMain );
HDC hMemDC = CreateCompatibleDC( hDC );
HBITMAP hOldBmp = (HBITMAP)SelectObject( hMemDC, hScreenBmp );
StretchBlt( hDC, 0, 0, NES_DISP_WIDTH * wScreenMagnification,
NES_DISP_HEIGHT * wScreenMagnification, hMemDC,
0, 0, NES_DISP_WIDTH, NES_DISP_HEIGHT, SRCCOPY );
SelectObject( hMemDC, hOldBmp );
DeleteDC( hMemDC );
ReleaseDC( hWndMain, hDC );
} 展开
void InfoNES_LoadFrame()
{
/*
* Transfer the contents of work frame on the screen
*
*/
// Set screen data
memcpy( pScreenMem, WorkFrame, NES_DISP_WIDTH * NES_DISP_HEIGHT * 2 );
// Screen update
HDC hDC = GetDC( hWndMain );
HDC hMemDC = CreateCompatibleDC( hDC );
HBITMAP hOldBmp = (HBITMAP)SelectObject( hMemDC, hScreenBmp );
StretchBlt( hDC, 0, 0, NES_DISP_WIDTH * wScreenMagnification,
NES_DISP_HEIGHT * wScreenMagnification, hMemDC,
0, 0, NES_DISP_WIDTH, NES_DISP_HEIGHT, SRCCOPY );
SelectObject( hMemDC, hOldBmp );
DeleteDC( hMemDC );
ReleaseDC( hWndMain, hDC );
} 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询