Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LImageListControl::GetFirstVisible

Show in webframe

#include "ltwrappr.h"

L_INT LImageListControl::GetFirstVisible ()

Gets the index of the first visible item in the ImageList Control. This item is the one at the upper left corner of the control's view.

Returns

>= 0

The zero-based index of the first visible item.

< 0

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTDIS
LTFIL
LTIMG

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

Platforms

Win32, x64.

See Also

Functions:

Class Members

Topics:

Using the ImageList Control

Example

L_INT LImageListControl__GetFirstVisibleExample(LImageListControl & ImageList, L_INT& nLastVisible)
{
   L_INT nViewSize, nFirstVisible;
   L_INT nColsOrRowsCount, nItemsCount;
   nViewSize = ImageList.GetViewSize();
   nFirstVisible = ImageList.GetFirstVisible();
   if (ImageList.GetScrollStyle() == SCROLLSTYLE_VERTICAL)
      nColsOrRowsCount = ImageList.GetColumnCount();
   else
      nColsOrRowsCount = ImageList.GetRowCount();
   nLastVisible = nFirstVisible + (nViewSize * nColsOrRowsCount) - 1;
   nItemsCount = ImageList.GetItemCount();
   if (nLastVisible > nItemsCount - 1)
      nLastVisible = nItemsCount - 1;
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.