typedef struct {
FlashDisplay fd;
HWND hwnd;
PBITMAP bmp; // Graphic buffer I want to draw to the screen
} MgContext;
MgContext xc1, *xc=&xc1;
// ...............................
void FlashCopyMg(void)
{
HBITMAP hbmNew;
HDC hdc = GetDC(xc->hwnd);
HDC memDC = CreateCompatibleDC ( hdc );
hbmNew = CreateBitmap( xc->bmp->bmWidth, xc->bmp->bmHeight,
xc->bmp->bmPlanes,xc->bmp->bmBitsPixel,
xc->bmp-
>bmBits);
SelectObject(memDC, hbmNew);
BitBlt(hdc, 0, 0, xc->bmp->bmWidth, xc->bmp->bmHeight,
memDC,
0, 0, BLACKNESS);
//DeleteDC(memDC);
ReleaseDC( xc->hwnd,hdc);
}