LRasterPaint::IsValid

Summary

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

Syntax

#include "Ltwrappr.h"

L_INT LRasterPaint::IsValid()

Returns

Value Meaning
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

See Also

Functions

Topics

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 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

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