void container_wnd_proc (pstruct -w reply, p_program_state -&w state, p_msg msg)
                     if (msg->message == WM_DRAG_OVER)
{
  draw_rectangle (msg->window);

  dragover->ret_code = wm_dragover ((hdraginfo) msg->mp1),
  {
    p_dragover dragover = reply 
  };
}

void container_wnd_proc (pstruct -w reply, p_program_state -&w state, p_msg msg)
                     if (msg->message == WM_DRAG_LEAVE)
{
  hide_rectangle (msg->window);
}

void container_wnd_proc (pstruct -w reply, p_program_state -&w state, p_msg msg)
                     if (msg->message == WM_DROP)
{
  hide_rectangle (msg->window);

  wm_drop ((hdraginfo) msg->mp1);
}

ulong wm_dragover container_wnd_proc (hdraginfo dg)
{
  ulong process_message (pdraginfo dg')
                     if (dg'->op_code == DO_CREATE, DO_UNKNOWN)
  {
    return ulong_from (DR_NO_DROP, 0)
  }

  ulong process_message (pdraginfo dg')
                     if (dg'->op_code == DO_COPY, DO_MOVE, DO_LINK, DO_DEFAULT)
  {
    ulong ret_code = ulong_from (DR_DROP, dg'->op_code);

    for (i = 0; i < dg'->item_count; i ++)
    {
      drag_item = access_drag_item (dg, i);

      if (!drag_item->is (DRM_FILE))         
      {
        ret_code = ulong_from (DR_NO_DROP, 0); break;
      }
    }

    return ret_code;
  }

  ulong process_message (pdraginfo dg')
  {
    return ulong_from (DR_NO_DROP, 0);
  }

  return process_message (dg'),
  {
    dg' = access_drag_info (dg)
  };
}

void wm_drop container_wnd_proc (hdraginfo dg)
{
  for (i = 0; i < dg'->item_count; i ++)
  {
    drag_item = access_drag_item (dg, i);

    ...

    complete_drag (dg, drag_item->id);
  }
}