This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, December 1, 2011 2:09:13 PM(UTC)
Groups: Registered
Posts: 5
Has anyone implemented the L_StatusCallback function in Delphi? If so, can I get an example?
TIA.
#2
Posted
:
Sunday, December 4, 2011 1:10:51 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
If you're using LEADTOOLS 17.5, you can add a menu item named TestFunction to the LoadSave Delphi demo shipped with our toolkit and use the code below with it.
=======================================
{
This example shows how to use the status callback function
It adds delay and refresh to show the progress while the bitmap is flipped
Note: We are passing the application's main form in the userdata parameter
}
//The callback function
Function myStatusCallback(nPercentComplete: L_INT; pUserData: L_PVOID): L_INT; stdcall;
var
theForm : TMainFrm;
begin
theForm := pUserData;
theForm.Caption := 'Status percent = ' + IntToStr(nPercentComplete);
theForm.Refresh();
Sleep(50);
Result := SUCCESS;
end;
//Setting the callback and calling Flip
procedure TMainFrm.TestFunctionClick(Sender: TObject);
begin
L_SetStatusCallBack(myStatusCallback, Self, nil, nil);
L_FlipBitmap(@_hBitmap);
Refresh();
end;
=======================================
Thanks,
Maen Badwan
LEADTOOLS Technical Support
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.