<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > RYOFilterDestroy |
Declaration
function RYOFilterDestroy( iFilterHandle : Integer ) : Integer;
Description
Destroys a bitmap created by RYOFilterCreate or RYOFilterCopy. Bitmaps no longer in use should be destroyed to conserve memory resources.
Parameters
iFilterHandle: An integer identifier of the bitmap to be destroyed returned from either RYOFilterCopy or RYOFilterCreate. If this parameter is passed as zero, the active bitmap is deactivated, but not destroyed. Bitmaps identified by handle contained in the linked list are retained if this parameter is passed as zero.
Return Value
True or False depending on the outcome of the operation.
Delphi Example
procedure TForm1.Button1Click(Sender: TObject);
begin
if Button1.Caption = 'Activate Filter' then
begin
ApTbl.RYOFilterActivate( hBitMap, RYOFILTER_NEW );
Button1.Caption := 'Clear Filter';
end
else
begin
// Deactivate active bitmap; does not destroy it
ApTbl.RYOFilterDestroy( 0 );
// Destroys bitmap, freeing allocated memory
ApTbl.RYOFilterDestroy( hBitMap );
// Create new, empty bitmap
hBitMap := ApTbl.RYOFilterCreate;
Button1.Caption := 'Activate Filter';
end;
ApTbl.First;
ApTbl.Refresh;
end;
C++Builder Example
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (Button1->Caption == "Activate Filter")
{
ApTbl->RYOFilterActivate( hBitMap, RYOFILTER_NEW );
Button1->Caption = "Clear Filter";
}
else
{
// Deactivate active bitmap; does not destroy it
ApTbl->RYOFilterDestroy( 0 );
// Destroys bitmap, freeing allocated memory
ApTbl->RYOFilterDestroy( hBitMap );
// Create new, empty bitmap
hBitMap = ApTbl->RYOFilterCreate();
Button1->Caption = "Activate Filter";
}
ApTbl->First();
ApTbl->Refresh();
}
See Also
RYOFilterActivate, RYOFilterCopy, RYOFilterCreate, RYOFilterRestore, RYOFilterSave, RYOFilterSetBit