#include "stdafx.h" #include "UsrFile.h" // UserFile Class LUserFile::LUserFile () { } LUserFile::~LUserFile () { } L_INT LUserFile::SaveFileCallBack(LBitmapBase L_FAR* pLBitmap, LBuffer L_FAR* pLBuffer, L_UINT uRow, L_UINT uLines) { L_UINT i; // Row counter L_UINT uRowLast = uRow + uLines; // Used when counting rows DWORD uSize = 0 ; LBuffer LBuf; ProgDlg.m_Progress.SetRange ( 0 , 100 ); ProgDlg.m_Progress.SetPos ( 1 ); ProgDlg.m_Progress.SetStep ( 1 ); pLBitmap->Access(); // Put the required rows in the buffer for (i = uRow; i < uRowLast; i++) { L_INT32 nBytes = pLBitmap->GetRow(pLBuffer,i); ProgDlg.m_Count.Format (_T("%d") , (100 * (pLBitmap->GetHeight() - i) / pLBitmap->GetHeight())); ProgDlg.m_Progress.SetPos((int) (100 * (pLBitmap->GetHeight() - i) / pLBitmap->GetHeight())); ProgDlg.UpdateData (FALSE); ProgDlg.UpdateWindow (); } pLBitmap->Release(); return SUCCESS ; }