Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, December 1, 2011 2:09:13 PM(UTC)

kbailey  
kbailey

Groups: Registered
Posts: 5


Has anyone implemented the L_StatusCallback function in Delphi? If so, can I get an example?

TIA.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, December 4, 2011 1:10:51 AM(UTC)
Maen Hasan

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.039 seconds.