LL_CMND_EDIT_USEROBJ

Task:

Requests the program to start an object-specific dialog through which the user can enter and change the corresponding presentation parameters.

Activation:

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

Parameters:

Meaning of the parameter lParam:

Pointer to an scLlEditUserObj structure:

_nSize: Size of the structure, sizeof(scLlEditUserObj)

_lpszName: Name of the variable which is assigned to the object

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

_lpPtr: lpPtr of the variable assigned to the object. This refers to the 5th parameter of the call LlDefineVariableExt().

_hPara: Handle-contents of the variable assigned to the object. This value is only 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 optimally into the rectangle

_hWnd: Window-handle of the dialog. This should be taken as parent-handle of your dialogs.

_lpszParameters: Pointer to a buffer with the maximum size _nParaBufSize.

_nParaBufSize: Size of the buffer allocated by List & Label.

Return Value:

0

Hints:

This callback is sent if objects that are set to a variable of type LL_DRAWING_USEROBJ_DLG need to be edited.

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

See: Hints on the use of GDI-objects.

The editing of the _bIsotropic flag is optional, as this can be set by the user in the calling dialog. If you change this flag, the change will be adopted by List & Label.

_lpszParameter points to string in which the values entered in the last dialog call are stored. You can copy your parameter string into the buffer when it is smaller or the same size as the buffer. Otherwise, you can change the pointer value to a pointer that points to your data. The problem of a longer parameter string is that it cannot be released by List & Label if it is an allocated storage area. (Basic principle: you can pass up to 1024 characters. The string cannot be extended, superfluous characters are cut off).

The characters permitted in the parameter string are all printable characters, i.e. characters with codes > = 32 (' ').

Example:

case LL_CMND_EDIT_USEROBJ:
   pSCE = (PSCLLEDITUSEROBJ)pSC->_lParam;
  
   lpszNewParas = MyDialog(pSCE->_hWnd, ..., );
  
   if (strlen(lpszNewParams) < pSCE->_lpszParameters)
      strcpy(pSCE->_lpszParameters, lpszNewParas);
   else
      pSCE->_lpszParameters = lpszNewParas;
   break;