????????????
??????C++????????????????????????????????????C++????
??????Delphi???????????Ч???????????????PASCAL????????????BASM??
??????????????????????£??????????
???????????????????C++????? -- ????????????ú??????????е?BmpData.h?????????C++????? -- ????ɡ??е??й????
???????C++????? -- ????ɡ?????п?????????????????????????????????????????????????????????????????C++????? -- ????ɡ??????????????????Windows?????????????????
?????????????????£?

 

VOID GetBitmapInfoHeader(CONST BitmapData *data?? CONST PBITMAPINFO pbi)
{
pbi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
pbi->bmiHeader.biWidth = data->Width;
pbi->bmiHeader.biHeight = data->Height;
pbi->bmiHeader.biPlanes = 1;
pbi->bmiHeader.biBitCount = (data->PixelFormat >> 8) & 0xff;
pbi->bmiHeader.biCompression = BI_RGB;
}
//---------------------------------------------------------------------------
VOID GetDCImageData(HDC DC?? INT x?? INT y?? BitmapData *data?? PBITMAPINFO pbi)
{
HBITMAP bitmap = CreateCompatibleBitmap(DC?? data->Width?? data->Height);
HDC memDC = CreateCompatibleDC(DC);
HBITMAP saveBitmap = (HBITMAP)SelectObject(memDC?? bitmap);
BitBlt(memDC?? 0?? 0?? data->Width?? data->Height?? DC?? x?? y?? SRCCOPY);
SelectObject(memDC?? saveBitmap);
DeleteDC(memDC);
GetDIBits(DC?? bitmap?? 0?? data->Height?? data->Scan0?? pbi?? DIB_RGB_COLORS);
DeleteObject(bitmap);
}
//---------------------------------------------------------------------------
VOID BitBltImageData(HDC DC?? INT x?? INT y?? CONST BitmapData *data?? PBITMAPINFO pbi)
{
HBITMAP bitmap = CreateDIBitmap(DC?? &pbi->bmiHeader?? CBM_INIT?? data->Scan0?? pbi?? DIB_RGB_COLORS);
HDC memDC = CreateCompatibleDC(DC);
HBITMAP saveBitmap = (HBITMAP)SelectObject(memDC?? bitmap);
BitBlt(DC?? x?? y?? data->Width?? data->Height?? memDC?? 0?? 0?? SRCCOPY);
SelectObject(memDC?? saveBitmap);
DeleteDC(memDC);
DeleteObject(bitmap);
}
//---------------------------------------------------------------------------