LRasterPaint::IsValid

#include "Ltwrappr.h"

L_INT LRasterPaint::IsValid()

Determines the validity of the class object's paint handle.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes

Comments

The paint handle will be valid after calling LRasterPaint::Initialize, and will remain valid until LRasterPaint::Free is called.

The paint handle is a private member of the LRasterPaint class object. For more information about the paint handle, refer to the PAINTHANDLE structure.

Required DLLs and Libraries

LTPNT

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:

LRasterPaint::Initialize, LRasterPaint::Free, Class Members

Topics:

Initializing and Freeing DigitalPaint Handles

Example

L_INT LRasterPaint_IsValidExample( LRasterPaint  rstp, CWnd* pWnd ) 
{ 
   L_INT nRet; 
   nRet = rstp.IsValid (); 
   if(nRet == SUCCESS) 
   { 
      CDC*  pDC = pWnd->GetDC(); 
      RECT  rcShape; 
      /* Set the coordinates with respect to the DC dimensions*/ 
      SetRect ( &rcShape, 10, 10, 150, 150 ) ; 
      /* Use the current shape properties to draw an ellipse*/ 
      nRet = rstp.DrawShapeEllipse ( pDC->m_hDC, &rcShape ) ; 
      if(nRet != SUCCESS) 
         return nRet; 
      pWnd->ReleaseDC( pDC ) ; 
   } 
   else 
   { 
      pWnd->MessageBox (TEXT("Invalid PAINTHANDLE"), TEXT("Error"), MB_OK ) ; 
      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