# DN_DRAWDLGITEM

The DN_DRAWDLGITEM event is sent to the dialog callback function before a dialog item is drawn.

### Param1

ID of the dialog item that is about to be drawn.

### Param2

Pointer to the FarDialogItem structure for the item to be drawn.

### Return

If the dialog callback function returns FALSE, the item will not be drawn.

### Controls

Control | Description
--- | ---
All | All dialog items

### Remarks

A dialog item of the DI_USERCONTROL type, but not any other dialog item, can be prepared in advance in a virtual buffer. FAR Manager does not copy the contents of this buffer to its internal structures, so as a response to the DN_DRAWDLGITEM event it is sufficient to change only the state of the virtual buffer:

    case DN_DRAWDLGITEM:
      CHAR_INFO *VBuf=((struct FarDialogItem*)Param2)->Param.VBuf;
      for (I=0; I < 256; I++)
      {
        VBuf[I].Char.AsciiChar = DecodeTable[I];
        VBuf[I].Attributes = Color;
      }
      return TRUE;

### Example

See also:
DialogEx