#include "ltwrappr.h"
L_UINT LBitmapList::GetCurrentIndex()
Gets the current index for the bitmap list object.
The current index for the bitmap list object.
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. |
Win32, x64.
Functions: |
|
Topics: |
Raster Image Functions: Creating and Maintaining Lists of Images |
|
L_INT LBitmapList__GetCurrentIndexExample(HWND hWnd){L_INT nRet;LBitmapList BitmapList;LBitmapBase Bitmap;L_TCHAR szDummyBuffer[50];L_UINT uCurrentIndex;nRet =BitmapList.Create ();if(nRet !=SUCCESS)return nRet;// load three images and insert them in the listnRet =Bitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")), 0,ORDER_BGR);if(nRet !=SUCCESS)return nRet;nRet =BitmapList.InsertItem (&Bitmap);if(nRet !=SUCCESS)return nRet;nRet =Bitmap.Load(MAKE_IMAGE_PATH(TEXT("image2.cmp")), 0,ORDER_BGR);if(nRet !=SUCCESS)return nRet;nRet =BitmapList.InsertItem (&Bitmap);if(nRet !=SUCCESS)return nRet;nRet =Bitmap.Load(MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\Image3.cmp")), 0,ORDER_BGR);if(nRet !=SUCCESS)return nRet;nRet =BitmapList.InsertItem (&Bitmap);if(nRet !=SUCCESS)return nRet;// Set list to second itemnRet =BitmapList.SetCurrentIndex(2);if(nRet !=SUCCESS)return nRet;// get the current indexuCurrentIndex = BitmapList.GetCurrentIndex ();wsprintf(szDummyBuffer, TEXT("This is item number %d in list."), uCurrentIndex);MessageBox(hWnd, szDummyBuffer, TEXT("LBitmapList"), MB_OK);// destroy bitmaplistBitmapList.Destroy ();return SUCCESS;}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
