sx_RYOFilterDestroy

<< Click to Display Table of Contents >>

Navigation:  Apollo API Listing >

sx_RYOFilterDestroy

VB Declaration

Declare Function sx_RYOFilterDestroy Lib "Apollo9.dll"

(ByVal iFilterHandle As Integer)  

As Integer

C Declaration

BOOL FAR PASCAL sx_RYOFilterDestroy

(SHORT iFilterHandle);

Description

Destroys a bitmap created by sx_RYOFilterCreate or sx_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 sx_RYOFilterCopy or sx_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.

VB Example

If Button1.Caption = "Activate Filter" Then

sx_RYOFilterActivate( hBitMap, RYOFILTER_NEW )

Button1.Caption = "Clear Filter"

Else

' Deactivate active bitmap does not destroy it  

sx_RYOFilterDestroy( 0 )

' Destroys bitmap, freeing allocated memory  

sx_RYOFilterDestroy( hBitMap )

' Create new, empty bitmap  

hBitMap = sx_RYOFilterCreate  

Button1.Caption = "Activate Filter"

End If

sx_GoTop

C Example

SHORT hBitMap;

 

if (!lstrcmpi(Button1.Caption, "Activate Filter")

{

sx_RYOFilterActivate( hBitMap, RYOFILTER_NEW );

lstrcpy(Button1.Caption, "Clear Filter");

}

else

{

// Deactivate active bitmap does not destroy it  

sx_RYOFilterDestroy( 0 );

// Destroys bitmap, freeing allocated memory  

sx_RYOFilterDestroy( hBitMap );

// Create new, empty bitmap  

hBitMap = sx_RYOFilterCreate();  

lstrcpy(Button1.Caption, "Activate Filter");

}

sx_GoTop();

See Also

sx_RYOFilterActivate, sx_RYOFilterCopy, sx_RYOFilterCreate, sx_RYOFilterRestore, sx_RYOFilterSave, sx_RYOFilterSetBit