All pastes #417266 Raw Edit

Unnamed

public cpp v1 · immutable
#417266 ·published 2007-03-30 19:30 UTC
rendered paste body
			RECT rto, rfrom;			POINT startpoint;			HRESULT hres;			DDSURFACEDESC2 ddsd;						ddsd.dwSize = sizeof(ddsd);			directdraw.back->Lock(0, &ddsd, DDLOCK_WAIT, NULL);			unsigned int *buffer = (unsigned int *)ddsd.lpSurface;			for (int i=0; i<width*height; i++) *buffer++=*pixel++;			directdraw.back->Unlock((LPRECT)ddsd.lpSurface);			startpoint.x = 0;			startpoint.y = 0;//29;			ClientToScreen(hwnd, &startpoint);			GetClientRect(hwnd, &rto);			rto.left = startpoint.x;			rto.right = startpoint.x + width;			rto.top = startpoint.y;			rto.bottom = startpoint.y + height;//+GetSystemMetrics(SM_CYCAPTION);			SetRect(&rfrom,0,0,width,height);			hres = directdraw.primary->Blt(&rto, directdraw.back, &rfrom, DDBLT_WAIT, NULL);