LL_CMND_DRAW_USEROBJ

Task:

Tells the program to draw the object defined by the user.

Activation:

LlDefineVariableExt(hJob, <Name>, <Content>, LL_DRAWING_USEROBJ, <Parameter>);

LlDefineFieldExt(hJob, <Name>, <Content>, LL_DRAWING_USEROBJ, <Parameter>);

or

LlDefineVariableExt(hJob, <Name>, <Content>, LL_DRAWING_USEROBJ_DLG,<Parameter>);

Parameters:

Pointer to an scLlDrawUserObj structure:

_nSize: Size of the structure, sizeof(scLlDrawUserObj)

_lpszName: Name of the variable assigned to the object

_lpszContents: Text contents of the variable which is assigned to the object. This value is only valid if the variable has been defined by LlDefineVariableExt(), otherwise the _hPara value is valid.

_lPara: lPara of the variable which is assigned to the object (LL_DRAWING_USEROBJ or LL_DRAWING_USEROBJ_DLG). Refers to the 4th parameter of the call LlDefineVariableExt().

_lpPtr: lpPtr of the variable which is assigned to the object. Refers to the 5th parameter of the call LlDefineVariableExt().

_hPara: Handle contents of the variable which is assigned to the object. This value is valid if the variable has been defined by LlDefineVariableExtHandle(), otherwise the value _lpszContents is valid.

_bIsotropic: TRUE: the object should be drawn undistorted FALSE: the drawing should be fitted into the rectangle

_lpszParameters: 1) for user-defined objects as table field: NULL
2) for LL_DRAWING_USEROBJ: Pointer to an empty string
3) for LL_DRAWING_USEROBJ_DLG: Pointer to the string the programmer has returned at LL_CMND_EDIT_USEROBJ.

_hPaintDC: Device Context for the printout

_hRefDC: Device Context for references

_rcPaint: Rectangle in which the object should be drawn. The mapping mode is in the normal drawing units, mm/10, inch/100 or inch/1000.

_nPaintMode: 1: on Designer-preview 0: on Printer/Multi-page-preview

Return Value (_lResult):

0

Hints:

In this callback no List & Label function may be called which will produce output (LlPrint(), etc.))! Functions like LlPrintGetCurrentPage(), LlPrintGetOption() or LlPrintEnableObject() are allowed.

See: Hints for the use of GDI-objects

Example:

case LL_CMND_DRAW_USEROBJ:
   pSCD = (PSCLLUSEROBJ)pSC->_lParam;
   FillRect(pSCD->_hPaintDC, pSCD->_rcPaint, GetStockObject(atoi(lpszContents)));
   break;