Brings up the Vector Render Options dialog.
#include "ltwrappr.h"
virtual L_INT LVectorDialog::DoModalVectorRender(hWndParent=NULL, pnPolygonMode=NULL)
Handle of the window that owns the dialog.
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.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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.
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;
}