LBitmapList::GetCurrentIndex
#include "ltwrappr.h"
L_UINT LBitmapList::GetCurrentIndex(L_VOID)
Gets the current index for the bitmap list object.
Returns
The current index for the bitmap list object.
Comments
The current index controls which item is returned when calling LBitmapList::GetNextItem and LBitmapList::GetPreviousItem.
Use zero-based indexing. For example, if there are 10 bitmaps in a list, the index of the last one is 9.
Note: If the list is empty, this function will return 0.
Required DLLs and Libraries
| LTFIL 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: | |
| Topics: | Raster Image Functions: Creating and Maintaining Lists of Images | 
| 
 | 
Example
L_VOID BitmapListSamples(HWND hWnd)
{
   LBitmapList BitmapList;
   LBitmapBase Bitmap;
   L_TCHAR szDummyBuffer[50];
   L_UINT uCurrentIndex;
   BitmapList.Create ();
   // load three images and insert them in the list
   Bitmap.Load(TEXT("image1.cmp"), 0,ORDER_BGR);
   BitmapList.InsertItem (&Bitmap);
   Bitmap.Load(TEXT("image2.cmp"), 0,ORDER_BGR);
   BitmapList.InsertItem (&Bitmap);
   Bitmap.Load(TEXT("image3.cmp"), 0,ORDER_BGR);
   BitmapList.InsertItem (&Bitmap);
   // Set list to second item
   BitmapList.SetCurrentIndex(2);
   // get the current index
   uCurrentIndex = BitmapList.GetCurrentIndex ();
   wsprintf(szDummyBuffer, TEXT("This is item number %d in list."), uCurrentIndex);
   MessageBox(hWnd, szDummyBuffer, TEXT("LBitmapList"), MB_OK);
   // destroy bitmaplist
   BitmapList.Destroy ();
}