L_DispContainerGetPrePaintCallBack

#include "l_bitmap.h"

L_LTIVW_API L_INT EXT_FUNCTION L_DispContainerGetPrePaintCallBack(hCon, ppfnCallBack, ppUserData)

HDISPCONTAINER hCon;

/* handle to the container */

DISPCONTAINERPREPAINTCALLBACK * ppfnCallBack;

/* pointer to the callback function */

LPVOID * ppUserData;

/* pointer to be updated with user data */

Gets the current action callback function along with the user data, which were set using L_DispContainerSetPrePaintCallBack.

Parameter

Description

hCon

Handle to the Container.

ppfnCallBack

Pointer to a pointer to a callback function to be updated with the last pre-paint callback function set using L_DispContainerSetPrePaintCallBack.

ppUserData

Void pointer to be updated with the value of user defined data associated with the tag callback. If you are not interested in the user-defined data, pass NULL for this parameter.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTIVW
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DispContainerSetMouseCallBack, L_DispContainerSetActionCallBack, L_DispContainerSetTagCallBack, L_DispContainerGetTagCallBack, L_DispContainerSetAnnotationCallBack, L_DispContainerGetAnnotationCallBack, L_DispContainerGetAnnotationCreatedCallBack, L_DispContainerSetAnnotationCreatedCallBack, L_DispContainerSetPrePaintCallBack, DISPCONTAINERPREPAINTCALLBACK, L_DispContainerGetPostPaintCallBack, L_DispContainerSetPostPaintCallBack, DISPCONTAINERPOSTPAINTCALLBACK, DISPCONTAINERANNOTATIONCALLBACK, DISPCONTAINERANNOTATIONCREATEDCALLBACK, DISPCONTAINERTAGCALLBACK, DISPCONTAINERACTIONCALLBACK

Topics:

Image Viewer Cells

 

Image Viewer Functions: Image Viewer Cells

Example

This example hides the odd frames

L_INT EXT_CALLBACK PrePaintCallBack(pDISPCONTAINERCELLINFO pCellInfo,
                                    L_VOID *               pUserData)
{
   UNREFERENCED_PARAMETER(pUserData);
   if ((pCellInfo->nSubCellIndex | 0x1) != pCellInfo->nSubCellIndex)
   {
      FillRect(pCellInfo->hDC, &pCellInfo->rcRect, GetStockBrush(GRAY_BRUSH));
      return FAILURE;
   }
   return SUCCESS;
}

L_INT DispContainerPrePaintExample(HDISPCONTAINER hCon)
{
   DISPCONTAINERPREPAINTCALLBACK oldCallBack;
   L_VOID *                      pOldUserData;


   L_DispContainerGetPrePaintCallBack(hCon, &oldCallBack, &pOldUserData);

   L_DispContainerSetPrePaintCallBack(hCon, PrePaintCallBack, hCon);

   return SUCCESS;
}