Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS Vector C++ Class Library Help

LVectorDialog::IsValid

Show in webframe

#include "ltwrappr.h"

L_BOOL LVectorDialog::IsValid(L_VOID)

Determines whether the LVectorDialog object is valid.

Returns

TRUE

There is a pointer to a valid bitmap object.

FALSE

There is not a pointer to a valid bitmap object.

Comments

Call this function to check if the class object has been associated with a valid LVectorBase object.

Before you can use some of the LVectorDialog functions, a vector must be associated with the class object. Until you have associated a valid vector object with the LVectorDialog object, this function will return false.

In particular, you cannot perform auto-processing without a valid bitmap.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

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:

LVectorDialog::LVectorDialog, LVectorDialog::SetVector, Class Members

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LVectorDialog__IsValidExample(HWND hWnd)
{
   L_INT          nRet;
   LVectorBase    Vector;
   LVectorDialog  VectorDlg;
   //Dialog is invalid unless associated with a vector
   if (VectorDlg.IsValid ())
      MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
   else
      MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);
   nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf")));
   if(nRet != SUCCESS)
      return nRet;
   VectorDlg.SetVector(&Vector);
   //Now dialog is valid
   if (VectorDlg.IsValid())
      MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
   else
      MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);
   //destructor called when out of scope
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.