#include "Ltwrappr.h"
L_INT LRasterPaint::IsValid()
Determines the validity of the class object's paint handle.
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes |
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 |
Functions: |
|
Topics: |
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 ;}