In this example, objects that are not file system objects are prevented from being dropped on the Browse_O_matic.
SOM_Scope MRESULT SOMLINK Browse_O_Maticwps_wpDragOver(Browse_O_Matic *somSelf, HWND hwndCnr, PDRAGINFO pdrgInfo) { MRESULT mResult; ULONG ulCount; ULONG ulNumberOfObjects; /* Browse_O_MaticData *somThis = Browse_O_MaticGetData(somSelf); */ Browse_O_MaticMethodDebug("Browse_O_Matic","Browse_O_Maticwps_wpDragOver"); /********************************************************************/ /* Don't call the parent. Initialize mResult to allow the drag over */ /* to proceed. */ /********************************************************************/ mResult = MRFROM2SHORT( DOR_DROP, DO_MOVE); /*******************************************************************/ /* Determine the number of objects dragged over the Browse-O-Matic */ /*******************************************************************/ ulNumberOfObjects = DrgQueryDragitemCount( pdrgInfo); /*************************/ /* Check all the objects */ /*************************/ for( ulCount=0; ulCount < ulNumberOfObjects && SHORT1FROMMR( mResult) != DOR_NEVERDROP; ulCount++){ /*****************************************/ /* It must be a file system type object. */ /*****************************************/ if( DrgVerifyRMF( DrgQueryDragitemPtr( pdrgInfo, ulCount), "DRM_OS2FILE", NULL)) mResult = MRFROM2SHORT( DOR_DROP, SHORT2FROMMR( mResult)); else mResult = MRFROM2SHORT( DOR_NEVERDROP, SHORT2FROMMR( mResult)); } return( mResult); }