L_VecDlgRender

#include "lvdlg.h"

L_INT EXT_FUNCTION L_VecDlgRender(hWnd, pVector, pbUseLights, pColorAmbient, pnPolygonMode, dwFlags, pfnCallback, pUserData)

HWND hWnd;

/* window handle */

pVECTORHANDLE pVector;

/* pointer to a vector handle */

L_BOOL L_FAR * pbUseLights;

/* flag that indicates whether to use lights */

COLORREF L_FAR * pColorAmbient;

/* ambient color */

L_INT L_FAR * pnPolygonMode;

/* polygon draw mode */

L_UINT32 dwFlags;

/* user interface flags for dialog */

LVCOMMDLGHELPCB pfnCallback;

/* pointer to a help callback function */

L_VOID * pUserData;

/* pointer to more parameters for the callback */

Brings up the Vector Render Options dialog.

Parameter

Description

hWnd

Handle of the window that owns the dialog.

pVector

Pointer to the vector handle that references the vector image to be affected by the render options.

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 L_VecGetPolygonMode or L_VecSetPolygonMode.

dwFlags

User interface flags for dialog. Determines the layout and action of the dialog.

 

Value

Meaning

 

VECTOR_DLG_AUTO_PROCESS

[0x80000000] process the image on OK.

 

VECTOR_DLG_SHOW_PREVIEW

[0x40000000] show preview of image in dialog.

pfnCallback

Pointer to an optional help callback function.

 

image\sqrblit.gif If you do not wish to provide help to this dialog, use NULL as the value of this parameter.

 

image\sqrblit.gif To provide help to this dialog, use the function pointer as the value of this parameter.

 

image\sqrblit.gif The callback function must adhere to the prototype described in LVCOMMDLGHELPCB.

pUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs.

 

To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure.

 

If the additional parameters are not needed, you can pass NULL in this parameter.

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

LVDLG

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:

L_VecGetUseLights, L_VecSetUseLights, L_VecGetAmbientColor, L_VecSetAmbientColor, L_VecGetPolygonMode, L_VecSetPolygonMode.

Topics:

Vector Dialogs

Example

/* This example will run the common render options dialog */
void RunRenderptionsDialog( HWND hWnd, pVECTORHANDLE pVector )
{
   L_BOOL   bUseLights;   
   COLORREF ColorAmbient;   
   L_INT    nPolygonMode;      

   bUseLights = L_VecGetUseLights ( pVector );   
   ColorAmbient = L_VecGetAmbientColor ( pVector );   
   nPolygonMode = L_VecGetPolygonMode ( pVector );   
   L_VecDlgRender
( hWnd, pVector, &bUseLights, &ColorAmbient, &nPolygonMode, VECTOR_DLG_AUTO_PROCESS | VECTOR_DLG_SHOW_PREVIEW,  NULL, NULL );

}