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::DoModalVectorRender

Show in webframe

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorRender(hWndParent=NULL, pnPolygonMode=NULL)

HWND hWndParent;

/* window handle */

L_INT *pnPolygonMode;

/* polygon draw mode */

Brings up the Vector Render Options dialog.

Parameter

Description

hWndParent

Handle of the window that owns the dialog.

pnPolygonMode

Pointer to an L_INT variable that contains a polygon mode value. The value present in the variable when the function is called is used to initialize the dialog. If this parameter is NULL when the function is called, the value used to initialize the dialog will come from the vector handle. When this function returns, if this parameter is not NULL, the variable pointed to by pnPolygonMode is updated with the value entered through the dialog.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function lets you change the polygon draw mode. Updating the variables is not affected by whether or not an object is selected.

If the GDI engine is being used, the bUseLights and pColorAmbient variables are not used.

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:

 

Topics:

Vector CommonDialogs

Example

L_INT LVectorDialog__DoModalVectorRenderExample(HWND hWnd, LVectorBase *pVector)
{
   L_INT          nRet;
   LVectorDialog  VectorDlg;
   VectorDlg.SetVector (pVector);
   VectorDlg.EnablePreview ();
   VectorDlg.EnableAutoProcess();
   L_BOOL bUseLights = TRUE;
   COLORREF ColorAmbient = RGB(100,200,50);
   L_INT nPolygonMode = VECTOR_POLYGON_POINT;
   L_TCHAR szMsg[200], *pszPolygonMode = NULL;
   nRet = VectorDlg.DoModalVectorRender(hWnd, &nPolygonMode);
   if(nRet != SUCCESS)
      return nRet;
   switch(nPolygonMode)
   {
   case VECTOR_POLYGON_POINT:
      pszPolygonMode = TEXT("VECTOR_POLYGON_POINT");
      break;
   case VECTOR_POLYGON_LINE:
      pszPolygonMode = TEXT("VECTOR_POLYGON_LINE");
      break;
   case   VECTOR_POLYGON_FILL:
      pszPolygonMode = TEXT("VECTOR_POLYGON_FILL");
      break;
   }
   wsprintf(szMsg, TEXT("bUseLights[%d]\nColorAmbient[%x,%x,%x]\nPolygonMode[%s]"),
            bUseLights,
            GetRValue(ColorAmbient),
            GetGValue(ColorAmbient),
            GetBValue(ColorAmbient),
            pszPolygonMode
            );
   MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.