How to Display progress in C++ Builder by using eraser.dll

cooor

New Member
I wanna know how to display the progress bar by calling eraser.dll ,
so I took a look at EraserDlg.cpp and found that EraserDlg::OnEraserNotify(WPARAM wParam, LPARAM) ,EraserWipeBegin(),EraserWipeUpdate(), EraserWipeDone() are the key. But I don't exactly know how to call the progress window when erasing files,directory, drive.

Does any one can give a sample to do that ?

Regards.

Cooor
cooor89@hotmail.com
 

cooor

New Member
Please look at my codes and give some more helps

I create a dialog TMyDlgEraser, and post m_pcProgress,m_pcProgressTotal. In my Main form,take something like following:
xResult = eraserInit();
xResult = eraserCreateContext(&Context);
xResult = eraserSetDataType(Context, ERASER_DATA_FILES);//dir

for (int i = 0; i <iSize>Strings.c_str(), (E_UINT16)m_saFiles->Strings.Length());
TMyDlgEraser*frm=new TMyDlgEraser(this);
frm->ShowModal();

xResult =eraserSetWindow(Context,frm->Handle);
xResult =eraserSetWindowMessage(Context,WM_ERASERNOTIFY);
bReturn = eraserStartSync(Context);

In MyDlgEraser.cpp, I modified the EraserDlg.cpp from eraser,and add the message:

void __fastcall TMyDlgEraser::OnEraserNotify(TMessage &Msg)
{
if(Msg.Msg == WM_ERASERNOTIFY)
{
switch (Msg.WParam)
{
case ERASER_WIPE_BEGIN:
EraserWipeBegin();
break;
case ERASER_WIPE_UPDATE:
EraserWipeUpdate();
break;
case ERASER_WIPE_DONE:
EraserWipeDone();
break;
}
}
}

But it doesn't display the eraser progress as I wish, please give me some advises or suggestions,thanks.

Regards.
 

cooor

New Member
I have got it

I read the progress codes and have resolved it.
 
Top