L_LoadExtensionStamp

Summary

Loads a stamp from the specified extension list.

Syntax

#include "l_bitmap.h"

L_LTFIL_API L_INT L_LoadExtensionStamp(pExtensionList, pBitmap, uStructSize)

Parameters

pEXTENSIONLIST pExtensionList

Pointer to the EXTENSIONLIST structure that contains the stamp to load.

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle that references the bitmap to be updated with the stamp loaded from the specified extension list.

L_UINT uStructSize

Size in bytes, of the structure pointed to by pBitmap, for versioning. Use sizeof(BITMAPHANDLE).

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The extensions referenced by the pExtensionList parameter must be loaded by calling the L_ReadFileExtensions function.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

L_INT LoadExtensionStampExample(HWND hWnd, 
                                                L_TCHAR     * pszName, 
                                                pBITMAPHANDLE pBitmap) 
{ 
   pEXTENSIONLIST pExtensionList; 
   L_INT nRet; 
   L_TCHAR s[300]; 
 
   nRet = L_ReadFileExtensions(pszName, &pExtensionList, NULL); 
   if(nRet != SUCCESS) 
   { 
      wsprintf(s, TEXT("Error %d getting extensions!"), nRet); 
      MessageBox(hWnd, s, TEXT("ERROR"), MB_OK); 
      return nRet; 
   } 
 
   if(pExtensionList->uFlags & EXTENSION_STAMP) 
   { 
      if(pBitmap->Flags.Allocated) 
         L_FreeBitmap(pBitmap); 
      nRet = L_LoadExtensionStamp(pExtensionList, pBitmap, sizeof(BITMAPHANDLE)); 
      if (nRet != SUCCESS) 
      { 
         wsprintf(s, TEXT("Error %d loading the stamp"), nRet); 
         MessageBox(hWnd, s, TEXT("ERROR"), MB_OK); 
         return nRet; 
      } 
   } 
   else 
         MessageBox(hWnd, TEXT("The extensions do not contain a stamp"), TEXT("ERROR"), MB_OK); 
 
   L_FreeExtensions(pExtensionList); 
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.