LRasterPaint::IsValid

#include "Ltwrappr.h"

L_INT LRasterPaint::IsValid(L_VOID)

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 CTest1View::Test ( LRasterPaint  rstp, CWnd* pWnd )
{
   if ( SUCCESS == rstp.IsValid () ) 
   {
      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*/
      rstp.DrawShapeEllipse ( pDC->m_hDC, &rcShape ) ;

      pWnd->ReleaseDC( pDC ) ;

   }
   else
   {
      pWnd->MessageBox (TEXT("Invalid PAINTHANDLE"), TEXT("Error"), MB_OK ) ;
   }

   return SUCCESS ;
}