#if 0 int PASCAL WinMain(HINSTANCE hInstance,HINSTANCE /*hPrevInstance*/,LPSTR /*lpszCmdLine*/,int /*nCmdShow*/) { PureBitmap pureBitmap; PureImage pureImage; GlobalData bitmapBytes; HWND hDesktopWindow; RGB555 *pRGB555; RGB888 *pRGB888; RGB555 rgb555; RGB888 rgb888; hDesktopWindow(::GetDesktopWindow()); PureDevice pureDevice(hDesktopWindow); pureBitmap.windowBitmap(hDesktopWindow); if(!pureBitmap.isOkay())return 0; pureBitmap.getBitmapBits(bitmapBytes,true); pureImage.getBitmapInfo().rgbColors(0); pureImage.getBitmapInfo().bitCount(BitmapInfo::Bit24); pureImage.getBitmapInfo().width(pureBitmap.width()); pureImage.getBitmapInfo().height(-pureBitmap.height()); // make this negative when you push it in here pureImage.getBitmapInfo().planes(1); pureImage.getBitmapInfo().compression(BI_RGB); pureImage.getBitmapInfo().sizeImage(0); pureImage.getBitmapInfo().colorUsed(0); pureImage.getBitmapInfo().colorImportant(0); pureImage.getBitmapInfo().verifyDimensions(); pureImage.getRGBArray().size(pureImage.getBitmapInfo().width()*(-pureImage.getBitmapInfo().height())); pRGB555=(RGB555*)(BYTE*)&bitmapBytes[0]; pRGB888=&(pureImage.getRGBArray()[0]); for(int row=0;row &bitmapBytes,PureDevice &pureDevice) { RGB555 *pRGB555; RGB888 *pRGB888; RGB555 rgb555; RGB888 rgb888; destroy(); getBitmapInfo().rgbColors(0); getBitmapInfo().bitCount(BitmapInfo::Bit24); getBitmapInfo().width(bmWidth); getBitmapInfo().height(bmHeight); getBitmapInfo().planes(1); getBitmapInfo().compression(BI_RGB); getBitmapInfo().sizeImage(0); getBitmapInfo().colorUsed(0); getBitmapInfo().colorImportant(0); getBitmapInfo().verifyDimensions(); getRGBArray().size(bmWidth*bmHeight); pRGB555=(RGB555*)(BYTE*)&bitmapBytes[0]; pRGB888=&getRGBArray()[0]; for(int row=0;row bitmapBytes; HWND hDesktopWindow; hDesktopWindow=::GetDesktopWindow(); PureDevice pureDevice(hDesktopWindow); pureBitmap.windowBitmap(hDesktopWindow); if(!pureBitmap.isOkay())return 0; pureBitmap.getBitmapBits(bitmapBytes,BitmapInfo::Bit24,true); HWND hWnd=::CreateWindow("BUTTON","",WS_VISIBLE|WS_POPUP|WS_BORDER,CW_USEDEFAULT,CW_USEDEFAULT,windowWidth,windowHeight,(HWND)0,(HMENU)0,::GetModuleHandle(0),0); if(!hWnd)return 0; ::ShowWindow(hWnd,SW_SHOW); ::UpdateWindow(hWnd); PureDevice displayDevice(hWnd); rawImage.width(pureBitmap.width()); rawImage.height(pureBitmap.height()); rawImage.setRawData(bitmapBytes); rawImage.stretch(displayDevice,Point(windowWidth,windowHeight)); ::Sleep(1000);