LVectorDialog::IsNoDuplicateEnabled

#include "ltwrappr.h"

virtual L_BOOL LVectorDialog::IsNoDuplicateEnabled() const

Indicates whether to allow duplicate layer names within the same vector.

Returns

TRUE

Do not allow duplicate layer names in a vector.

FALSE

Allow duplicate layer names in a vector.

Comments

This function returns the value of the internal setting that indicates whether to allow duplicate layer names within the same vector.

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::EnableNoDuplicate, Class Members

Topics:

Vector Images: Vector Dialogs

Example

//Example86
// This example will call the DoModalVectorNewLayer() dialog, and return the selected values
// Will not allow creation of duplicate layers
L_VOID Example86(HWND hWnd, LVectorBase *pVector)
{
   LVectorDialog VectorDlg;
   
   VectorDlg.SetVector(pVector);
   VectorDlg.EnableAutoProcess();

   if (VectorDlg.IsNoDuplicateEnabled() == FALSE)
   {
      MessageBox(hWnd, TEXT("Setting the 'No Duplicate Flag'"), TEXT(""), MB_OK);
   }
   VectorDlg.EnableNoDuplicate();
   
   L_BOOL bActiveLayer = TRUE;
   LVectorLayer VectorLayer;
   
   L_INT nRet = VectorDlg.DoModalVectorNewLayer(hWnd, &VectorLayer, &bActiveLayer);
   if (nRet == SUCCESS)
   {
      L_TCHAR szMsg[200];
      VECTORLAYERDESC Desc;
      VectorLayer.GetLayerDesc(&Desc); 
      
      wsprintf(szMsg, TEXT("New Layer\nName[%s]\nVisible[%d]\nLocked[%d]"),
         Desc.szName,
         Desc.bVisible,
         Desc.bLocked
         );
      MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
   }
}