MRESULT EXPENTRY wpSubList(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
{
  switch (msg)
  {
  /***********************/
  /*Drag-Initialisierung */
  /***********************/
  case WM_BEGINDRAG:
    if( bDrgDrag == TRUE )
    {
      hwndTarget = DoDrgDrag( hwnd );
      return (MRESULT)(hwndTarget ? TRUE : FALSE);
    }
    else
    {
      DoDragFiles( hwnd );
      return (MRESULT)TRUE;
    }
    break;
  /****************************************/
  /* messages to drag source window       */
  /****************************************/
  case DM_DRAGOVERNOTIFY:   /* Objekt �ber anderem window */
                            /* mp1: Draginfo, mp2: Target indicators */
    /*PutMsg( 1, msg, mp1, mp2 );*/
    return (MRESULT)FALSE;
    break;
  case DM_RENDER:           /* Render-Anforderung */
    /* mp1: DragTransfer, return: success/error */
    PutMsg( 1, msg, mp1, mp2 );
    return (MRESULT)FALSE;
    break;
  case DM_PRINTOBJECT:      /* Print-Anforderung */
    /* mp1: Draginfo, mp2: PrintDest, returns: action */
    PutMsg( 1, msg, mp1, mp2 );
    return (MRESULT)usDrgReturn;      
    break;
  case DM_DISCARDOBJECT:    /* Discard-Anforderung */
    /* mp1: Draginfo, mp2: reserved, returns: action */
    PutMsg( 1, msg, mp1, mp2 );
    return (MRESULT)usDrgReturn;  
    break;
  case DM_ENDCONVERSATION:  /* Ende-Meldung */
    /* mp1: ItemId, mp2: success/fail */ 
    PutMsg( 1, msg, mp1, mp2 );
    return (MRESULT)FALSE;
    break;
  /*****************************/
  /* messages to target window */
  /*****************************/
  case DM_DRAGOVER:
    /* mp1: Draginfo, mp2: Koordinaten, return: indicator */
    PutMsg( 1, msg, mp1, mp2 );
    return(MPFROM2SHORT(DOR_NEVERDROP, DO_UNKNOWN));
    break;
  case DM_EMPHASIZETARGET:
    /* mp1: Koordinaten, mp2: Flag */
  case DM_DRAGLEAVE:
    /* mp1: Draginfo */
  case DM_DROP:
    /* mp1: Draginfo, return: indicator */
  /**********************************/
  /*Messages f�r DrgDragFiles usw.. */
  /**********************************/
  case DM_DRAGERROR:
    /* nur DrgDragFiles.. */
  case DM_FILERENDERED:
    /* mp1: Renderfile, mp2: success/fail */
  case DM_DRAGFILECOMPLETE:
    /* nur DrgDragFiles.. */
    PutMsg( 1, msg, mp1, mp2 );
    return (MRESULT)FALSE;
    break;

  } /* endswitch */

  return((MRESULT)pwpList(hwnd, msg, mp1, mp2));
}
Exemple #2
0
FX_BOOL CFWL_NoteDriver::DispatchMessage(CFWL_Message* pMessage,
                                         IFWL_Widget* pMessageForm) {
  FX_BOOL bRet = FALSE;
  switch (pMessage->GetClassID()) {
    case FWL_MSGHASH_Activate: {
      bRet = DoActivate(static_cast<CFWL_MsgActivate*>(pMessage), pMessageForm);
      break;
    }
    case FWL_MSGHASH_Deactivate: {
      bRet = DoDeactivate(static_cast<CFWL_MsgDeactivate*>(pMessage),
                          pMessageForm);
      break;
    }
    case FWL_MSGHASH_SetFocus: {
      bRet = DoSetFocus(static_cast<CFWL_MsgSetFocus*>(pMessage), pMessageForm);
      break;
    }
    case FWL_MSGHASH_KillFocus: {
      bRet =
          DoKillFocus(static_cast<CFWL_MsgKillFocus*>(pMessage), pMessageForm);
      break;
    }
    case FWL_MSGHASH_Key: {
      bRet = DoKey(static_cast<CFWL_MsgKey*>(pMessage), pMessageForm);
      break;
    }
    case FWL_MSGHASH_Mouse: {
      bRet = DoMouse(static_cast<CFWL_MsgMouse*>(pMessage), pMessageForm);
      break;
    }
    case FWL_MSGHASH_MouseWheel: {
      bRet = DoWheel(static_cast<CFWL_MsgMouseWheel*>(pMessage), pMessageForm);
      break;
    }
    case FWL_MSGHASH_Size: {
      bRet = DoSize(static_cast<CFWL_MsgSize*>(pMessage));
      break;
    }
    case FWL_MSGHASH_Cursor: {
      bRet = TRUE;
      break;
    }
    case FWL_MSGHASH_WindowMove: {
      bRet = DoWindowMove(static_cast<CFWL_MsgWindowMove*>(pMessage),
                          pMessageForm);
      break;
    }
    case FWL_MSGHASH_DropFiles: {
      bRet =
          DoDragFiles(static_cast<CFWL_MsgDropFiles*>(pMessage), pMessageForm);
      break;
    }
    default: {
      bRet = TRUE;
      break;
    }
  }
  if (bRet) {
    IFWL_WidgetDelegate* pDelegate = pMessage->m_pDstTarget->SetDelegate(NULL);
    if (pDelegate) {
      pDelegate->OnProcessMessage(pMessage);
    }
  }
  return bRet;
}