LRasterPaintWindow::SetBitmap

#include "Ltwrappr.h"

L_INT LRasterPaintWindow::SetBitmap(pLBitmap)

Attaches a bitmap to the class object.

Parameters

LBitmapBase * pLBitmap

Pointer to an LBitmapBase class object which contains the bitmap to attach to the LRasterPaintWindow class object.

Returns

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

Comments

LRasterPaintWindow::Initialize must be called before calling this function.

The bitmap set by calling this function is the bitmap that will be displayed in the RasterPaint window. This is also the bitmap on which painting will occur.

Required DLLs and Libraries

See Also

Functions

Example

L_INT LRasterPaintWindow_SetBitmapExample(LRasterPaintWindow *pRasterPntWnd ,HWND hWnd) 
{ 
 
   L_INT       nRet; 
   LBitmapBase *LBtmpbase = new LBitmapBase(); 
   pRasterPntWnd = new LRasterPaintWindow(); 
 
   nRet = LBtmpbase->Initialize(); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   LDialogFile  DlgFile; 
 
   nRet = LDialogFile::Initialize (0);  
   if(nRet != SUCCESS) 
      return nRet; 
 
   DlgFile.SetBitmap (LBtmpbase);  
 
   OPENDLGPARAMS DlgParams ; 
   memset ( &DlgParams, 0, sizeof ( OPENDLGPARAMS ) ) ;  
   DlgParams.uStructSize = sizeof ( OPENDLGPARAMS ) ;  
 
   nRet = DlgFile.SetOpenParams (&DlgParams) ;  
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = DlgFile.DoModalOpen(hWnd);  
   if(nRet < 1) 
      return nRet; 
 
   L_TCHAR  szFile[260];  
 
   DlgFile.GetFileName (szFile, sizeof(szFile));  
 
   nRet = LBtmpbase->Load(szFile); 
 
   LRasterPaintWindow::Initialize(); 
 
   nRet = pRasterPntWnd->SetWndHandle(hWnd); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = pRasterPntWnd->SetBitmap(LBtmpbase); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
 
} 
Help Version 22.0.2021.8.20
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DigitalPaint C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.