LRasterPaintWindow::SetBitmap

#include "Ltwrappr.h"

L_INT LRasterPaintWindow::SetBitmap(pLBitmap)

LBitmapBase * pLBitmap;

pointer to an LBitmapBase class object

Attaches a bitmap to the class object.

Parameter

Description

pLBitmap

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

Returns

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

LTPNT
LTDIS
LTFIL
LTAUT
LTCON
LTTLB

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:

LRasterPaintWindow::SetWndHandle, LRasterPaintWindow::GetBitmap, Class Members

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS DigitalPaint C++ Class Library Help