LVectorDialog::DoModalVectorRender
#include "ltwrappr.h"
virtual L_INT LVectorDialog::DoModalVectorRender(hWndParent=NULL, pbUseLights=NULL, pColorAmbient=NULL, pnPolygonMode=NULL)
HWND hWndParent; |
/* window handle */ |
/* flag that indicates whether to use lights */ | |
COLORREF L_FAR *pColorAmbient; |
/* ambient color */ |
/* polygon draw mode */ |
Brings up the Vector Render Options dialog.
Parameter |
Description |
hWndParent |
Handle of the window that owns the dialog. |
pbUseLights |
Pointer to an L_BOOL variable that indicates whether or not to use lights. The value present in the L_BOOL 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 pbUseLights is updated with the value entered through the dialog. |
pColorAmbient |
Pointer to a COLORREF variable that contains an ambient color. The value present in the COLORREF 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 pColorAmbient is updated with the value entered through 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. For a list of possible polygon mode values, refer to LVectorDialog::GetPolygonMode or LVectorDialog::SetPolygonMode. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function lets you change the current light use, the ambient color, and 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 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::GetUseLights, LVectorDialog::SetUseLights, LVectorDialog::GetPolygonMode, LVectorDialog::SetPolygonMode. |
Topics: |
Example
L_VOID Example82(HWND hWnd, LVectorBase *pVector)
{
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;
VectorDlg.DoModalVectorRender(hWnd, &bUseLights, &ColorAmbient, &nPolygonMode);
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);
}