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 
  };
}

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

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);
}

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

  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;
  }

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

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

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);
  }
}