#include "stdafx.h" LEAD_START_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_INIT_LMemoryFile(LUserMemoryFile) LEAD_END_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_IMPLEMENTOBJECT(LUserBitmap); LEAD_IMPLEMENTOBJECT(LUserMemoryFile); ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LUserBitmap::LUserBitmap() { } LUserBitmap::~LUserBitmap() { } //------------------------------------------------------------------------- // LUserMemoryFile class section //------------------------------------------------------------------------- //------------------------------------------------------------------------- L_INT LUserMemoryFile::LoadMemoryCallBack(pFILEINFO pFileInfo, LBitmapBase L_FAR *pLBitmap, LBuffer L_FAR *pLBuffer, L_UINT uFlags, L_INT iRow, L_INT iLines) { if(pLBitmap->PutRow(*pLBuffer,iRow) == FAILURE ) return FAILURE; if((uFlags&FILEREAD_FIRSTROW) && (uFlags&FILEREAD_FIRSTPASS)) pView->HandlePalette(WM_QUERYNEWPALETTE,pView->m_hWnd); HDC hdc = ::GetDC(pView->m_hWnd); // Set the dc. pLBitmap->Paint()->SetDC(hdc); // Paint from the buffer pLBitmap->Paint()->PaintDCBuffer(*pLBuffer, iRow, iLines); ::ReleaseDC(pView->m_hWnd,hdc); return SUCCESS; }