Changeset 133


Ignore:
Timestamp:
Nov 29, 2023, 5:59:34 PM (21 months ago)
Author:
gyoung
Message:

Merge Lar's 2.9 branch into the trunk

Location:
trunk
Files:
2 deleted
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/classes/mm-progs/MMPlayer/makefile

    r126 r133  
    2525        -rm *.dll
    2626        -rm *.obj
    27         -rm *.res
     27        -rm *.RES
    2828        -rm *.ini
     29        -rm *.def
    2930
    3031cleaner:
  • trunk/classes/mm-progs/audioconverter/makefile

    r126 r133  
    2323        -rm *.dll
    2424        -rm *.obj
    25         -rm *.res
     25        -rm *.RES
    2626        -rm *.ini
     27        -rm *.def
    2728
    2829cleaner:
  • trunk/classes/mm-progs/imageconverter/makefile

    r126 r133  
    2121        -rm *.dll
    2222        -rm *.obj
    23         -rm *.res
     23        -rm *.RES
    2424        -rm *.ini
     25        -rm *.def
    2526
    2627cleaner:
  • trunk/classes/mm-progs/master_volume/makefile

    r126 r133  
    2323        -rm *.exe
    2424        -rm *.obj
    25         -rm *.res
     25        -rm *.RES
    2626        -rm *.ini
     27        -rm *.def
    2728
    2829cleaner:
  • trunk/classes/mm-progs/mmfind/makefile

    r126 r133  
    1212
    1313
    14 OBJECTS         =       image.obj        
     14OBJECTS         =       image.obj       
    1515
    1616
     
    2727        -rm *.dll
    2828        -rm *.obj
    29         -rm *.res
     29        -rm *.RES
    3030        -rm *.ini
     31        -rm *.def
    3132
    3233cleaner:
  • trunk/classes/mm-progs/videoplayer/makefile

    r126 r133  
    3939        -rm *.dll
    4040        -rm *.obj
    41         -rm *.res
     41        -rm *.RES
    4242        -rm *.ini
     43        -rm *.def
    4344
    4445cleaner:
  • trunk/classes/mm-progs/volume/makefile

    r126 r133  
    2626        -rm *.dll
    2727        -rm *.obj
    28         -rm *.res
     28        -rm *.RES
    2929        -rm *.ini
    3030        -rm $(LIBDIR)/*.obj
     31        -rm *.def
    3132
    3233cleaner:
  • trunk/classes/res/de/makefile

    r4 r133  
    99CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
    1010INC     =       ../../inc
    11 DEFS         = 
     11DEFS         =
    1212
    1313OBJDIR  =       ../dll
     
    3131
    3232#(OBJDIR)/mmres$(LANGUAGE).res: mmres$(LANGUAGE).rc $(OBJECTS)
    33 #               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc 
     33#               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc
    3434
    3535
     
    4343        -rm *.*~
    4444        -rm *.flc
    45         -rm *.res
     45        -rm *.RES
    4646        -rm *.obj
    4747
  • trunk/classes/res/en/makefile

    r53 r133  
    99CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
    1010INC     =       ../../inc
    11 DEFS         = 
    12 PROGS        = 
     11DEFS         =
     12PROGS        =
    1313
    1414OBJDIR  =       ../dll
     
    3131
    3232#mmres$(LANGUAGE).res:  mmres$(LANGUAGE).rc $(OBJECTS)
    33 #               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc 
     33#               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc
    3434
    3535
     
    4040        -rm *.*~
    4141        -rm *.flc
    42         -rm *.res
     42        -rm *.RES
    4343        -rm *.obj
    4444
  • trunk/classes/res/es/makefile

    r28 r133  
    99CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
    1010INC     =       ../../inc
    11 DEFS         = 
    12 PROGS        = 
     11DEFS         =
     12PROGS        =
    1313
    1414OBJDIR  =       ../dll
     
    3030
    3131#mmres$(LANGUAGE).res:  mmres$(LANGUAGE).rc $(OBJECTS)
    32 #               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc 
     32#               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc
    3333
    3434
     
    3939        -rm *.*~
    4040        -rm *.flc
    41         -rm *.res
     41        -rm *.RES
    4242        -rm *.obj
    4343
  • trunk/classes/res/fr/makefile

    r26 r133  
    99CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
    1010INC     =       ../../inc
    11 DEFS         = 
    12 PROGS        = 
     11DEFS         =
     12PROGS        =
    1313
    1414OBJDIR  =       ../dll
     
    3030
    3131#mmres$(LANGUAGE).res:  mmres$(LANGUAGE).rc $(OBJECTS)
    32 #               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc 
     32#               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc
    3333
    3434
     
    3939        -rm *.*~
    4040        -rm *.flc
    41         -rm *.res
     41        -rm *.RES
    4242        -rm *.obj
    4343
  • trunk/classes/res/it/makefile

    r2 r133  
    99CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
    1010INC     =       ../../inc
    11 DEFS         = 
    12 PROGS        = 
     11DEFS         =
     12PROGS        =
    1313
    1414OBJDIR  =       ../dll
     
    2121                        cwaudio$(LANGUAGE).rc cwaudio$(LANGUAGE).dlg \
    2222                        cwimage$(LANGUAGE).rc cwvideo$(LANGUAGE).rc \
    23                         mmfind$(LANGUAGE).dlg mmfind$(LANGUAGE).rc 
     23                        mmfind$(LANGUAGE).dlg mmfind$(LANGUAGE).rc
    2424
    2525all:    $(OBJDIR)/mmres$(LANGUAGE).dll
     
    3535        -rm *.*~
    3636        -rm *.flc
    37         -rm *.res
     37        -rm *.RES
    3838        -rm *.obj
    3939
  • trunk/classes/res/nl/makefile

    r2 r133  
    99CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
    1010INC     =       ../../inc
    11 DEFS         = 
    12 PROGS        = 
     11DEFS         =
     12PROGS        =
    1313
    1414OBJDIR  =       ../dll
     
    2020                        imageconv$(LANGUAGE).dlg imageconv$(LANGUAGE).rc \
    2121                        cwaudio_nl.rc cwaudio_nl.dlg cwimage_nl.rc cwvideo_nl.rc \
    22                         mmfind_nl.dlg mmfind_nl.rc 
     22                        mmfind_nl.dlg mmfind_nl.rc
    2323
    2424all:    $(OBJDIR)/mmres$(LANGUAGE).dll
     
    3434        -rm *.*~
    3535        -rm *.flc
    36         -rm *.res
     36        -rm *.RES
    3737        -rm *.obj
    3838
  • trunk/classes/res/tw/makefile

    r4 r133  
    99CPPFLAGS     = /Ge- /Gm+ /G4 /Gl  /O+ /Oc+ /Ol- /Q+ $(VACDEBUG)
    1010INC     =       ../../inc
    11 DEFS         = 
     11DEFS         =
    1212
    1313OBJDIR  =       ../dll
     
    3232
    3333#(OBJDIR)/mmres$(LANGUAGE).res: mmres$(LANGUAGE).rc $(OBJECTS)
    34 #               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc 
     34#               rc -D $(ECS) -i $(INC) -r mmres$(LANGUAGE).rc
    3535
    3636
     
    4444        -rm *.*~
    4545        -rm *.flc
    46         -rm *.res
     46        -rm *.RES
    4747        -rm *.obj
    4848
  • trunk/common_functions/makefile

    r104 r133  
    33#include ../make.inc
    44
    5 CC           = gcc
     5CC           = icc
    66LIB_DIR      = D:/usr/lib
    7 #CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
    8 CPPFLAGS     = -O -Zomf -Zcrtdll -s
     7CPPFLAGS     = -Ge- /Gm+ -G4 -Gl  /O+ -Oc+ -Ol
     8#CPPFLAGS     = -O -Zomf -Zcrtdll -s
    99INC             = ../include
    1010DEFS         =
  • trunk/makefile

    r4 r133  
    274274bld:
    275275        @build.cmd
    276 
  • trunk/mediafolder/ProgFolder/progFOLDER.DEF

    r44 r133  
    1818; */
    1919
    20 LIBRARY PROGFLDR INITGLOBAL
     20LIBRARY PROGFLDR INITINSTANCE TERMINSTANCE
    2121DESCRIPTION '$@#(c) Chris Wohlgemuth :V0.17 (25.06.2004) (PROGFLDR.DLL)#@Support folder class'
    22 PROTMODE
    23 CODE PRELOAD DISCARDABLE
    24 DATA SINGLE SHARED PRELOAD DISCARDABLE
     22DATA MULTIPLE NONSHARED
    2523EXPORTS
    2624        CWProgFolderClassData
  • trunk/mediafolder/c/cddb/res/makefile

    r127 r133  
    8484        -rm *.obj
    8585        -rm *.dll
    86         -rm *.res
     86        -rm *.RES
    8787
    8888cleaner:
  • trunk/mediafolder/c/helper/launchpad.cpp

    r57 r133  
    1818 */
    1919
    20 #define INCL_WIN
    21 #define INCL_GPILCIDS
    22 #define INCL_GPIPRIMITIVES
    23 #define INCL_GPIBITMAPS
    24 
     20#define INC_WIN
     21#define INCL_PM
     22#define INCL_GPI
    2523
    2624#include "mediafolder.hh"
    2725#include "launchpad.hh"
     26#include "cwcdtrack.hh"
    2827
    2928#include <os2.h>
     
    3231
    3332#include "sys_funcs.h"
     33SOMClass* somhlpGetSomClass(char* chrClassName);
    3434
    3535extern HWND hwndShadow;// The handle of the help window
     
    5757MRESULT EXPENTRY shadowProc(HWND hwnd, ULONG msg,MPARAM mp1,MPARAM mp2 );
    5858
     59
     60BOOL APIENTRY myDrgDeleteDraginfoStrHandles(PDRAGINFO pDragInfo)
     61{
     62   /* a replacement for DrgDeleteDraginfoStrHandles */
     63   /* because that routine will fail if any one hstr is invalid */
     64
     65   ULONG i,ulItems;
     66   PDRAGITEM pDragItem;
     67
     68   ulItems = DrgQueryDragitemCount(pDragInfo);
     69   for (i=0;i<ulItems;i++)
     70   {
     71      pDragItem = DrgQueryDragitemPtr(pDragInfo,i);
     72      DrgDeleteStrHandle(pDragItem->hstrType);
     73      DrgDeleteStrHandle(pDragItem->hstrRMF);
     74      DrgDeleteStrHandle(pDragItem->hstrContainerName);
     75      DrgDeleteStrHandle(pDragItem->hstrSourceName);
     76      DrgDeleteStrHandle(pDragItem->hstrTargetName);
     77   }
     78   return TRUE;
     79}
     80
     81
    5982/******************************************************************************/
    6083/*  New button procedure which handles the context menu stuff for the objects */
     
    7598  switch (msg)
    7699    {
    77 #if 0
    78     case WM_BEGINDRAG:
    79       if(SHORT1FROMMP(mp2)||1) {
    80         //  DosBeep(5000,130);
    81         lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
    82         if(lpo) {
    83           wpObject=lpo->wpObject;
    84           if(somIsObj(wpObject)) {
    85 #if 0
    86             DragItem.hwndItem=hwnd;
    87             DragItem.ulItemID=(ULONG)wpObject;
    88             DragItem.hstrType=DrgAddStrHandle("DRT_UNKNOWN");
    89             DragItem.hstrRMF=DrgAddStrHandle("DRM_OBJECT");
    90             DragItem.hstrContainerName=DrgAddStrHandle("E:\\CD-Brenner\\ADC_050\\!AUDIOCD_TOOLBAR!");
    91             DragItem.hstrSourceName=DrgAddStrHandle("E:\\CD-Brenner\\ADC_050\\");
    92 #endif
    93             wpObject->wpFormatDragItem(&DragItem);
    94             //            DragItem.fsSupportedOps=DO_LINKABLE;
    95             DragInfo=DrgAllocDraginfo(1);
    96            
    97             DrgSetDragitem(DragInfo, &DragItem,(ULONG)sizeof(DragItem),0);
    98             memset(&DragImage, 0, sizeof(DragImage));
    99             DragImage.cb=sizeof(DragImage);
    100             DragImage.fl=DRG_ICON;
    101             DragImage.hImage=wpObject->wpQueryIcon();
    102            
    103 
    104             if(DrgDrag(hwnd, DragInfo, &DragImage, 1, VK_ENDDRAG, NULL)) {
    105               lpo->lpParent->lpRefreshLaunchPad();
    106             }
    107 
    108             /* Free DragInfo here!!!!!!!!!!! */
    109             //DrgDeleteDraginfoStrHandles(pDragInfo);
    110             // ????? DrgFreeDraginfo(DragInfo);
    111             return (MRESULT)TRUE;
    112           }/* somIsObj() */
    113         }/* lpo */
    114       }
    115       break;
    116 
    117     case DM_ENDCONVERSATION:
    118     case DM_DRAGFILECOMPLETE:
    119     case DM_DROPNOTIFY:
    120     case DM_FILERENDERED:
    121     case DM_RENDERCOMPLETE:
    122       DosBeep(500,500);
    123 break;
    124       return (MRESULT)FALSE;
    125     case WM_ENDDRAG:
    126       DosBeep(500,500);
    127       return (MRESULT)TRUE;
    128       break;
    129 #endif
    130100    case WM_PAINT:
    131101      lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
     
    166136      {
    167137        BOOL bReturn=FALSE;
    168        
     138
    169139        TRY_LOUD(LP_DRAGOVER) {
    170         lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
    171         if(lpo) {
    172           wpObject=lpo->wpObject;
    173           if(somIsObj(wpObject)) {
    174             char chrClassName[10];
    175             LONG lLength;
    176            
    177             pDragInfo=(PDRAGINFO) mp1;
    178             hwndMenu=pDragInfo->hwndSource;
    179             lLength=sizeof(chrClassName);
    180             WinQueryClassName(hwndMenu, lLength, chrClassName);
    181             if(strcmp(chrClassName,"#37"))
    182               hwndMenu=NULL;/* Source isn't a container */
    183             if(!bDrawn) {
    184               HPS hps;
    185               RECTL rectl;
    186               SWP swp;
    187 
    188               /* Draw the rect */
    189               hps=DrgGetPS(hwnd);
    190               WinQueryWindowPos(hwnd,&swp);
    191               rectl.xLeft=1;
    192               rectl.yBottom=1;
    193               rectl.xRight=swp.cx-1;
    194               rectl.yTop=swp.cy-1;
    195               //WinDrawBorder(hps,&rectl, 3, 3, 0, 0, DB_STANDARD|DB_PATINVERT); 
    196               DrgReleasePS(hps);
    197               //bDrawn=TRUE;
    198             }
    199             bReturn=TRUE;
    200           }
    201         }
     140           lpo=(LPObject*)WinQueryWindowULong(hwnd,QWL_USER);
     141           if(lpo) {
     142             wpObject=lpo->wpObject;
     143             if(somIsObj(wpObject)) {
     144               char chrClassName[10];
     145               LONG lLength;
     146
     147               pDragInfo=(PDRAGINFO) mp1;
     148               hwndMenu=pDragInfo->hwndSource;
     149               lLength=sizeof(chrClassName);
     150               WinQueryClassName(hwndMenu, lLength, chrClassName);
     151               if(strcmp(chrClassName,"#37"))
     152                 hwndMenu=NULL;/* Source isn't a container */
     153               if(!bDrawn) {
     154                 HPS hps;
     155                 RECTL rectl;
     156                 SWP swp;
     157
     158                 /* Draw the rect */
     159                 hps=DrgGetPS(hwnd);
     160                 WinQueryWindowPos(hwnd,&swp);
     161                 rectl.xLeft=1;
     162                 rectl.yBottom=1;
     163                 rectl.xRight=swp.cx-1;
     164                 rectl.yTop=swp.cy-1;
     165                 //WinDrawBorder(hps,&rectl, 3, 3, 0, 0, DB_STANDARD|DB_PATINVERT);
     166                 DrgReleasePS(hps);
     167                 //bDrawn=TRUE;
     168               }
     169               bReturn=TRUE;
     170             }
     171           }
    202172        }
    203173        CATCH(LP_DRAGOVER)
    204           {
    205           } END_CATCH;
    206           if(bReturn)
    207             return wpObject->wpDragOver(hwndMenu,(PDRAGINFO) mp1);
    208           break;
     174        {
     175        } END_CATCH;
     176        if(bReturn)
     177         return wpObject->wpDragOver(hwndMenu,(PDRAGINFO) mp1);
     178        break;
    209179      }
    210180    case DM_DRAGLEAVE:
     
    213183        SWP swp;
    214184        HPS hps;
    215        
     185
    216186        /* Remove target emphasis here */
    217187        hps=DrgGetPS(hwnd);
     
    221191        rectl.xRight=swp.cx-1;
    222192        rectl.yTop=swp.cy-1;
    223         // WinDrawBorder(hps,&rectl,3, 3, 0, 0, DB_STANDARD|DB_PATINVERT); 
     193        // WinDrawBorder(hps,&rectl,3, 3, 0, 0, DB_STANDARD|DB_PATINVERT);
    224194        bDrawn=FALSE;
    225195        DrgReleasePS(hps);
     
    238208          if(lpo) {
    239209            wpObject=lpo->wpObject;
    240             if(somIsObj(wpObject)) { 
     210            if(somIsObj(wpObject)) {
    241211              pDragInfo=(PDRAGINFO) mp1;
    242212              pDragItem=DrgQueryDragitemPtr(pDragInfo, 0);
     
    264234        if(somIsObj(wpObject)) {
    265235          if((SHORT)0x6d==SHORT1FROMMP(mp1)) {
    266             /* Delete menu item */       
     236            /* Delete menu item */
    267237            if(wpObject->wpDelete(CONFIRM_DELETE|CONFIRM_DELETEFOLDER ) == OK_DELETE)
    268238              lpo->lpParent->lpRemoveButton(lpo);
     
    272242        }/* end of if(somIsObj(wpObject)) */
    273243      }
    274       } 
     244      }
    275245      CATCH(LP_COMMAND)
    276246        {
     
    288258static MRESULT handleDragOver(HWND hwnd, MPARAM mp1, MPARAM mp2)
    289259{
    290   MRESULT mResult;
    291260  ULONG ulNumberOfObjects;
    292261  PDRAGINFO pDragInfo;
     
    294263  RECTL rectl;
    295264  SWP swp;
    296 
    297   mResult = MRFROM2SHORT( DOR_NODROPOP, DO_LINK);
    298  
     265  USHORT usIndicator=DOR_NEVERDROP,usOp=0;
     266  WPObject *wpObject = NULL;
     267
    299268  /* Get access to the dragInfo */
    300269  pDragInfo=(PDRAGINFO)mp1;
    301   DrgAccessDraginfo(pDragInfo);
    302   /* Get number of items */
    303   ulNumberOfObjects = DrgQueryDragitemCount( pDragInfo);
    304 
    305   if(ulNumberOfObjects>1) {
    306     /* Free the draginfo */
    307     DrgFreeDraginfo(pDragInfo);
    308     return MRFROM2SHORT( DOR_NODROPOP, DO_LINK);
     270  if (DrgAccessDraginfo(pDragInfo)) {
     271      PDRAGITEM pDragItem = NULL;
     272      SOMClass *cdTrackClass = NULL;
     273
     274        /* Get number of items */
     275        ulNumberOfObjects = DrgQueryDragitemCount( pDragInfo);
     276
     277        if(ulNumberOfObjects>1) {
     278         usIndicator = DOR_NODROP;
     279         usOp = 0;
     280         goto quit;
     281        }
     282
     283      /* check if a WPS object was dropped, we do not accept anything else */
     284      pDragItem = DrgQueryDragitemPtr(pDragInfo,0);
     285      if (!DrgVerifyRMF(pDragItem,"DRM_OBJECT","DRF_OBJECT")) {
     286         usIndicator = DOR_NEVERDROP;
     287         usOp = 0;
     288         goto quit;
     289      } /* endif */
     290
     291      /*
     292         refuse drop if WPS object pointer is not valid or if the object is
     293         a descendant of MMCDTrack class (see Netlabs ticket #19)
     294      */
     295      wpObject = (WPObject *)OBJECT_FROM_PREC(pDragItem->ulItemID);
     296      cdTrackClass = somhlpGetSomClass("MMCDTrack");
     297      if (!somIsObj(wpObject) || wpObject->somIsA(cdTrackClass)) {
     298         usIndicator = DOR_NEVERDROP;
     299         usOp = 0;
     300         goto quit;
     301      } /* endif */
     302
     303        switch(pDragInfo->usOperation)
     304       {
     305       case DO_DEFAULT:
     306       case DO_LINK:
     307         if(!bDrawn) {
     308           POINTL ptl;
     309           launchPad * lp;
     310
     311           ptl.x=SHORT1FROMMP(mp2);
     312           ptl.y=SHORT2FROMMP(mp2);
     313           /* Pos in window coords */
     314           WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptl, 1);
     315
     316           hps=DrgGetPS(hwnd);
     317           WinQueryWindowPos(hwnd,&swp);
     318
     319           rectl.xLeft=swp.cx;//-swp.cy;
     320
     321           lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
     322           if(lp) {
     323             if(lp->lpQueryNumObjects()==0) {
     324               rectl.xLeft=0;
     325             }
     326           }
     327
     328           rectl.yTop=swp.cy-1;
     329           rectl.yBottom=1;
     330           if(ptl.x<rectl.xLeft) {
     331             int numB;
     332
     333             numB=(ptl.x-xButtonOffset)/(swp.cy+xButtonDelta);
     334             rectl.xLeft=((ptl.x-numB*swp.cy) > swp.cy/2 ? numB+1: numB);
     335             rectl.xLeft*=(swp.cy+xButtonDelta);
     336             rectl.xLeft-=(xButtonDelta)-xButtonOffset+xButtonDelta;
     337             rectl.xRight=rectl.xLeft+(xButtonDelta*2);
     338           }
     339           else {
     340             rectl.xRight=swp.cx-1;
     341           }
     342           rclDrawn=rectl;
     343           WinDrawBorder(hps,&rectl, 2, 2, 0, 0, DB_STANDARD|DB_PATINVERT);
     344           bDrawn=TRUE;
     345
     346           DrgReleasePS(hps);
     347         }
     348         usIndicator = DOR_DROP;
     349         usOp = DO_LINK;
     350         break;
     351      default:
     352         usIndicator = DOR_NODROPOP;
     353         usOp = DO_LINK;
     354         break;
     355       }
     356quit:
     357     /* Free the draginfo */
     358     DrgFreeDraginfo(pDragInfo);
    309359  }
    310 
    311   switch(pDragInfo->usOperation)
    312     {
    313     case DO_DEFAULT:
    314     case DO_LINK:
    315       if(!bDrawn) {
    316         POINTL ptl;
    317         launchPad * lp;
    318        
    319         ptl.x=SHORT1FROMMP(mp2);
    320         ptl.y=SHORT2FROMMP(mp2);
    321         /* Pos in window coords */
    322         WinMapWindowPoints(HWND_DESKTOP, hwnd, &ptl, 1);
    323 
    324         hps=DrgGetPS(hwnd);
    325         WinQueryWindowPos(hwnd,&swp);
    326 
    327         rectl.xLeft=swp.cx;//-swp.cy;
    328 
    329         lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
    330         if(lp) {
    331           if(lp->lpQueryNumObjects()==0) {
    332             rectl.xLeft=0;
    333           }
    334         }
    335        
    336         rectl.yTop=swp.cy-1;   
    337         rectl.yBottom=1;
    338         if(ptl.x<rectl.xLeft) {
    339           int numB;
    340 
    341           numB=(ptl.x-xButtonOffset)/(swp.cy+xButtonDelta);
    342           rectl.xLeft=((ptl.x-numB*swp.cy) > swp.cy/2 ? numB+1: numB);
    343           rectl.xLeft*=(swp.cy+xButtonDelta);
    344           rectl.xLeft-=(xButtonDelta)-xButtonOffset+xButtonDelta;
    345           rectl.xRight=rectl.xLeft+(xButtonDelta*2);
    346         }
    347         else {
    348           rectl.xRight=swp.cx-1;
    349         }
    350         rclDrawn=rectl;
    351         WinDrawBorder(hps,&rectl, 2, 2, 0, 0, DB_STANDARD|DB_PATINVERT); 
    352         bDrawn=TRUE;
    353        
    354         DrgReleasePS(hps);
    355       }
    356       mResult = MRFROM2SHORT( DOR_DROP, DO_LINK);
    357       break;
    358     default:
    359       break;
    360     }
    361 
    362   /* Free the draginfo */
    363   DrgFreeDraginfo(pDragInfo);
    364 
    365   return mResult;
     360  return MRFROM2SHORT(usIndicator,usOp);
    366361}
    367362
     
    375370  /* Remove target emphasis here */
    376371  hps=DrgGetPS(hwnd);
    377   WinDrawBorder(hps,&rclDrawn, 2, 2, 0, 0, DB_STANDARD|DB_PATINVERT); 
     372  WinDrawBorder(hps,&rclDrawn, 2, 2, 0, 0, DB_STANDARD|DB_PATINVERT);
    378373  DrgReleasePS(hps);
    379   bDrawn=FALSE; 
     374  bDrawn=FALSE;
    380375  return (MRESULT) FALSE;
    381376}
    382377
    383378
    384 static MRESULT EXPENTRY launchPadWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
     379static MRESULT EXPENTRY launchPadWindowProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    385380{
    386381  WPFolder* thisPtr;
    387382  launchPad * lp;
    388383  LPObject *lpo;
    389   static USHORT id=0;//Initialisation new in V1.00a 
     384  static USHORT id=0;//Initialisation new in V1.00a
    390385
    391386  switch(msg)
    392387    {
    393 #if 0
    394     case DM_ENDCONVERSATION:
    395     case DM_DRAGFILECOMPLETE:
    396     case DM_DROPNOTIFY:
    397     case DM_FILERENDERED:
    398     case DM_RENDERCOMPLETE:
    399       DosBeep(500,500);
    400 break;
    401       return (MRESULT)FALSE;
    402     case WM_ENDDRAG:
    403       DosBeep(500,500);
    404       break;
    405       return (MRESULT)TRUE;
    406 #endif
    407388    case WM_PAINT:
    408389      {
     
    426407    case DM_DROP:
    427408      {
    428         ULONG ulCount;
    429         ULONG ulNumberOfObjects;
    430         PDRAGITEM pDragItem;
    431         SOMClass *folderClass;
    432         WPObject * wpObject;
    433         PDRAGINFO pDragInfo;
    434        
    435         TRY_LOUD(LP_FRAMEDROP) {
     409        TRY_LOUD(LP_FRAMEDROP) {
    436410          /* A new object dropped on the launchpad */
    437           pDragInfo=(PDRAGINFO)mp1;
     411          PDRAGINFO pDragInfo=(PDRAGINFO)mp1;
    438412          if(DrgAccessDraginfo(pDragInfo)) {
    439             /* Get number of items */
    440             ulNumberOfObjects = DrgQueryDragitemCount( pDragInfo);           
    441             if(ulNumberOfObjects>1){
    442               /* Free the draginfo */
    443               DrgDeleteDraginfoStrHandles(pDragInfo);
    444               DrgFreeDraginfo(pDragInfo);
    445             }
    446             else {
    447               ulCount=0;
    448              
    449               pDragItem=DrgQueryDragitemPtr( pDragInfo, ulCount);
    450               wpObject=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, ulCount)->ulItemID);
    451413              lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
    452414              if(lp) {
    453                 if(somIsObj(wpObject)) {
    454  
     415                  PDRAGITEM pDragItem=DrgQueryDragitemPtr( pDragInfo, 0);
     416                  WPObject *wpObject=(WPObject*)OBJECT_FROM_PREC(pDragItem->ulItemID);
    455417                  POINTL ptl;
    456418                  int numB;
    457419                  SWP swp;
    458                  
     420
    459421                  WinQueryWindowPos(hwnd,&swp);
    460422                  ptl.x=pDragInfo->xDrop;
     
    467429                  /* Do a link */
    468430                  lp->lpAddButton(wpObject, numB);
    469                   handleDragLeave(hwnd, mp1, mp2);
    470                 }
    471431              }
    472               DrgDeleteDraginfoStrHandles(pDragInfo);
     432              myDrgDeleteDraginfoStrHandles(pDragInfo);
    473433              DrgFreeDraginfo(pDragInfo);
    474             }
    475434          }
    476435          handleDragLeave(hwnd, mp1, mp2);
     
    479438          {
    480439          } END_CATCH;
    481          
    482           break;
     440          return MRFROMLONG(0);
    483441      }
    484442    case DM_DRAGLEAVE:
     
    496454      return (MRESULT)FALSE;
    497455      /***********************************************/
    498       /* Stuff for fly over help                     */ 
     456      /* Stuff for fly over help                     */
    499457    case WM_MOUSEMOVE:
    500458      launchPad * lp;
     
    506464        }
    507465      }
    508      
    509 #if 0
    510       tempID=WinQueryWindowUShort(hwnd,QWS_ID);/*  get the id of the window under the pointer  */                       
    511       if(id!=tempID) {  // New Button? 
    512         WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,tempID,(ULONG)iTBFlyOverDelay); // New timer for delay
    513         id=tempID;  // Save ID
    514       }
    515       else {
    516         if(!hwndBubbleWindow)
    517           WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,tempID,(ULONG)iTBFlyOverDelay); // New timer for delay   
    518       }
    519 #endif
     466
    520467      if(!hwndBubbleWindow)
    521468        WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, 2,(ULONG)iTBFlyOverDelay); // New timer for delay       
     
    541488      HPS  hps;
    542489      RECTL   rcl;
    543  
     490
    544491      /*  we have to build a new information window  */
    545       if(hwndBubbleWindow){// if(){...} new in V1.00a 
     492      if(hwndBubbleWindow){// if(){...} new in V1.00a
    546493        WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
    547494        hwndBubbleWindow=NULL;
     
    551498      WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1);
    552499      WinQueryWindowRect(hwnd,&rclWork);                               
    553       if(!hwndBubbleWindow 
     500      if(!hwndBubbleWindow
    554501         && WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl)
    555502         && bTBFlyOverEnabled) {
    556        
     503
    557504        static HWND hwndBubbleClient;
    558505        ULONG style=FCF_BORDER|FCF_NOBYTEALIGN;
    559506        char winText[255] = {0};
    560        
     507
    561508        /* Get window text for size calculating */
    562509            lp=(launchPad*)WinQueryWindowULong(hwnd,QWL_USER);
     
    567514
    568515        ulWinTextLen=(LONG)strlen(winText); // Query text length
    569        
     516
    570517        /* Delete 'Returns' in object title */
    571518        char *pBuchst;
     
    579526          pRest=pBuchst;
    580527        }
    581        
     528
    582529        /* Create help window */
    583530        hwndBubbleWindow=WinCreateStdWindow(HWND_DESKTOP,
     
    612559        GpiQueryTextBox(hps,ulWinTextLen,winText,TXTBOX_COUNT,aptlPoints);
    613560        WinEndPaint(hps);
    614        
     561
    615562        /* Set colors */
    616563        WinSetPresParam(hwndBubbleClient,
     
    620567                        PP_FOREGROUNDCOLOR,sizeof(rgbTBFlyForeground) ,
    621568                        &rgbTBFlyForeground );
    622        
     569
    623570        /* Calculate bubble positon and show bubble */
    624571        WinQueryPointerPos(HWND_DESKTOP,&ptl);//Query pointer position in the desktop window
    625572        WinQueryWindowRect(HWND_DESKTOP,&rcl);//Query desktop size
    626         aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+7+xVal+ptl.x 
    627           > rcl.xRight 
    628           ? deltaX=-aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x-xVal-xVal-7 
     573        aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+7+xVal+ptl.x
     574          > rcl.xRight
     575          ? deltaX=-aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x-xVal-xVal-7
    629576              : deltaX=0 ;
    630        
    631         aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2+yVal+ptl.y 
    632           > rcl.yTop 
     577
     578        aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2+yVal+ptl.y
     579          > rcl.yTop
    633580          ? deltaY=-aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y-2*yVal-7
    634581              : deltaY=0 ;             
    635582        WinSetWindowPos(hwndBubbleWindow,
    636583                        HWND_TOP,
    637                         ptl.x+xVal+deltaX,ptl.y+yVal+deltaY, 
     584                        ptl.x+xVal+deltaX,ptl.y+yVal+deltaY,
    638585                        aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+8,
    639586                        aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2,
     
    643590                        hwndBubbleWindow,
    644591                        ptl.x+xVal+deltaX+5
    645                         ,ptl.y+yVal+deltaY-5, 
     592                        ,ptl.y+yVal+deltaY-5,
    646593                        aptlPoints[TXTBOX_BOTTOMRIGHT].x-aptlPoints[TXTBOX_BOTTOMLEFT].x+8,
    647594                        aptlPoints[TXTBOX_TOPLEFT].y-aptlPoints[TXTBOX_BOTTOMLEFT].y+2,
    648595                        SWP_ZORDER|SWP_SIZE|SWP_MOVE|SWP_SHOW);
    649        
     596
    650597        /* Set bubble text */
    651598        WinSetWindowText(hwndBubbleClient,winText);
    652         WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,1,35); 
     599        WinStartTimer(WinQueryAnchorBlock(hwnd),hwnd,1,35);
    653600      } // end if(!hwndBubbleWindow)
    654601      break;
     
    666613            WinQueryWindowRect(hwnd, &rclWork);
    667614            if(!WinPtInRect(WinQueryAnchorBlock(hwnd),&rclWork,&ptl))
    668               { // Window has changed                            
     615              { // Window has changed                           
    669616                WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, 1);  // stop the running timer
    670                 if(hwndBubbleWindow) 
     617                if(hwndBubbleWindow)
    671618                  WinDestroyWindow(hwndBubbleWindow);/*  close the bubblewindow  */
    672619                hwndBubbleWindow=0;
     
    694641      break;
    695642    default:
    696       break;   
     643      break;
    697644    }
    698645  return pfnwpOldLPProc(hwnd, msg, mp1, mp2);
     
    701648void LPList::lplRefreshAllPads()
    702649{
    703  
     650
    704651}
    705652
     
    711658LPObject::~LPObject(void)
    712659{
    713 #if 0
    714   if(hPtr) {
    715     if(!WinDestroyPointer(hPtr))
    716       DosBeep(100,200);
    717   }
    718 #endif
    719660}
    720661
     
    766707  if(hwndLaunchPad)
    767708    WinDestroyWindow(hwndLaunchPad);
    768    
     709
    769710  /* Remove this pad from the list of pads */
    770711  lplTemp=lplAllLPads;
     
    844785      }
    845786    }
    846  
     787
    847788  lpBuildObjectList(chrConfigID);
    848789
     
    859800  /* Refresh all launchpads */
    860801  LPList *lplTemp;
    861  
     802
    862803  //lplTemp=lplAllLPads;
    863804  lplTemp=*lpList;
     
    902843      }
    903844  }
    904  
    905   lpSaveObjectList();   
     845
     846  lpSaveObjectList();
    906847  lpRefreshLaunchPad();
    907848
     
    967908        if((lpoTempNew=new LPObject(wpTempObject->wpQueryIcon()))!=NULL) {
    968909          ULONG ulRC;
    969          
     910
    970911          lpoTempNew->wpObject=wpTempObject;
    971912          lpoTempNew->wpObject->wpLockObject();
     
    1017958      if(!SysCheckFileExists(chrConfigTarget))
    1018959        return FALSE; /* No install dir defined */
    1019      
     960
    1020961      sprintf(chrPath,"OBJECTID=%s",chrConfigID);
    1021962      if((hObject2=WinCreateObject("WPFolder", chrConfigID, chrPath,chrConfigTarget,CO_FAILIFEXISTS))==NULLHANDLE)
    1022963        return FALSE; /* Can't create new toolbar folder */
    1023964    }
    1024  
     965
    1025966  /* Get toolbar folder */
    1026967  if(somIsObj(wpParentFolder)) {
     
    1038979  wpFolder->wpQueryRealName(chrPath, &ulBufferSize, TRUE);
    1039980  strcat(chrPath,"\\objects.ini");/* Ini-File containing the hobjects */
    1040  
    1041   //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrPath, "~launchPad", 123, MB_OK| MB_MOVEABLE); 
     981
     982  //  WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrPath, "~launchPad", 123, MB_OK| MB_MOVEABLE);
    1042983  do{
    1043984    /* Open the ini-file */
    1044985    if((hIni=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),chrPath))==NULLHANDLE)
    1045       break; 
     986      break;
    1046987
    1047988    if((memPtr=(char*)malloc(ulNumObjects*sizeof(HOBJECT)))==NULL)
    1048989      break;
    1049    
     990
    1050991
    1051992    hObject=(HOBJECT*)memPtr;
     
    10641005
    10651006    free(hObject);
    1066    
     1007
    10671008    PrfCloseProfile(hIni);
    10681009    return TRUE;
     
    10831024  WPObject* wpObject;
    10841025
    1085   char chrText[200]; 
     1026  char chrText[200];
    10861027  ULONG ul;
    10871028
     
    11131054  wpFolder->wpQueryRealName(chrPath, &ulBufferSize, TRUE);
    11141055  strcat(chrPath,"\\objects.ini");/* Ini-File containing the hobjects */
    1115  
     1056
    11161057  do{
    11171058    /* Open the ini-file */
    11181059    if((hIni=PrfOpenProfile(WinQueryAnchorBlock(HWND_DESKTOP),chrPath))==NULLHANDLE)
    1119       break; 
    1120  
     1060      break;
     1061
    11211062    if(!PrfQueryProfileSize(hIni,"objects","handles", &ulBufferSize))
    11221063      break;
     
    11271068    if((memPtr=(char*)malloc(ulBufferSize))==NULL)
    11281069      break;
    1129    
    1130     ulNumObjects=ulBufferSize/sizeof(HOBJECT);   
     1070
     1071    ulNumObjects=ulBufferSize/sizeof(HOBJECT);
    11311072
    11321073    if(!PrfQueryProfileData(hIni,"objects","handles", memPtr, &ulBufferSize)){
     
    11491090            strncpy(lpoTemp->chrName, wpTempObject->wpQueryTitle(),sizeof(lpoTemp->chrName));
    11501091            lpoTemp->lpParent=this;
    1151            
     1092
    11521093            lpoTemp->lpoNext=lpoObjectList;
    11531094            lpoObjectList=lpoTemp;
     
    11581099        }
    11591100      }/* for */
    1160    
     1101
    11611102    free(hObjectArray);
    1162    
     1103
    11631104    PrfCloseProfile(hIni);
    11641105    return TRUE;
     
    12491190  for(a=ulNumObjects;a>0 && lpoTemp; a--)
    12501191    {
    1251       /* Create Buttons */ 
     1192      /* Create Buttons */
    12521193      if((hwndTemp=WinCreateWindow(hwndLaunchPad, WC_BUTTON, lpoTemp->chrName, WS_VISIBLE, xButtonOffset+(a-1)*(swp.cy+xButtonDelta), 1, swp.cy-2, swp.cy-2,
    12531194                                   hwndLaunchPad, HWND_TOP, a*100,
     
    12761217      lpoTemp=lpoTemp->lpoNext;
    12771218    }
    1278   return TRUE; 
    1279 }
    1280 
    1281 
    1282 
     1219  return TRUE;
     1220}
     1221
  • trunk/mediafolder/c/m3ufolder/m3ufolderoverriddenwpmethods.cpp

    r2 r133  
    11/*
    22 * This file is (C) Chris Wohlgemuth 2002-2003
    3  * 
     3 *
    44 * It's part of the Media-Folder distribution
    55 */
     
    3333extern ULONG ulQWL_LEFTCTRLHWND;
    3434
    35 #if 0
    36 /* For calling the method in the MMAudio class. Linking to the DLL would require the
    37    new audio classes. By dynamically querying the method the media folder works without
    38    installing the audio classes. */ 
    39 typedef ULONG   SOMLINK somTP_MMCDTrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
    40                 char** chrString,
    41                 ULONG ulSize,
    42                 int iWhich);
    43 typedef somTP_MMCDTrack_cwmmQueryTrackInfo *somTD_MMCDTrack_cwmmQueryTrackInfo;
    44 extern somTD_MMCDTrack_cwmmQueryTrackInfo methodPtrCDTrack;
    45 #endif
    46 
    4735extern LOADEDBITMAP allBMPs[];
    4836extern PFNWP pfnwpGenericFrame;
     
    7058//void HlpWriteToTrapLog(const char* chrFormat, ...);
    7159
    72 #if 0
    73 void _Optlink rexxThreadFunc (void *arg)
    74 {
    75   HAB  hab;
    76   HMQ  hmq;
    77   QMSG qmsg;
    78   CWM3UFolder *thisPtr;
    79   HWND hwnd;
    80 #if 0
    81   char chrFileName[CCHMAXPATH];
    82   char chrFolderName[CCHMAXPATH];
    83   char chrRexxScript[CCHMAXPATH];
    84 #endif
    85   char *chrFileName;
    86   char *chrFolderName;
    87   char *chrRexxScript;
    88   ULONG ulSize;
    89 
    90   thisPtr=(CWM3UFolder*)arg;   
    91   if(!somIsObj(thisPtr))
    92     return;
    93 
    94   if(!somIsObj(thisPtr->wpObjM3UFile))
    95     return;
    96 
    97   chrFileName=thisPtr->wpAllocMem( CCHMAXPATH*3+10 , &ulSize);
    98   if(!chrFileName)
    99     return;
    100  
    101   chrFolderName=chrFileName+CCHMAXPATH+1;
    102   chrRexxScript=chrFolderName+CCHMAXPATH+1;
    103 
    104   ulSize=CCHMAXPATH;
    105   if(!((WPFileSystem*)thisPtr->wpObjM3UFile)->wpQueryRealName(chrFileName, &ulSize, TRUE))
    106     return;
    107  
    108   ulSize=CCHMAXPATH;
    109   if(!thisPtr->wpQueryRealName(chrFolderName, &ulSize, TRUE))
    110     return;
    111 
    112   hab=WinInitialize(0);
    113   if(hab) {
    114     hmq=WinCreateMsgQueue(hab,0);
    115     if(hmq) {     
    116       RXSTRING arg[2];                    /* argument string for REXX  */
    117       RXSTRING rexxretval;                /* return value from REXX    */
    118       APIRET   rc;                        /* return code from REXX     */
    119       SHORT    rexxrc = 0;                /* return code from function */
    120      
    121      
    122       sprintf(chrRexxScript,"%s%s",  chrInstallDir,RX_INSERT_PLAYLISTTRACKS);
    123       //HlpWriteToTrapLog("chrRexxScript: %s\n", chrRexxScript);
    124       /* By setting the strlength of the output RXSTRING to zero, we   */
    125       /* force the interpreter to allocate memory and return it to us. */
    126       /* We could provide a buffer for the interpreter to use instead. */
    127       rexxretval.strlength = 0L;          /* initialize return to empty*/
    128      
    129       MAKERXSTRING(arg[0], chrFileName, strlen(chrFileName));/* create input argument     */
    130       MAKERXSTRING(arg[1], chrFolderName, strlen(chrFolderName));/* create input argument     */             
    131      
    132       TRY_LOUD(RX_START) {
    133         /* Here we call the interpreter.  We don't really need to use    */
    134         /* all the casts in this call; they just help illustrate         */
    135         /* the data types used.                                          */
    136         rc=RexxStart((LONG)       2,             /* number of arguments   */
    137                      (PRXSTRING)  &arg,          /* array of arguments    */
    138                      (PSZ)        chrRexxScript,/* name of REXX file     */
    139                      //   (PSZ)        "H:\\cwmm\\mediafolder\\beep.cmd",/* name of REXX file     */
    140                      (PRXSTRING)  0,             /* No INSTORE used       */
    141                      (PSZ)        "CWRXX",         /* Command env. name     */
    142                      (LONG)       RXSUBROUTINE,  /* Code for how invoked  */
    143                      (PRXSYSEXIT) 0,             /* No EXITs on this call */
    144                      (PSHORT)     &rexxrc,       /* Rexx program output   */
    145                      (PRXSTRING)  &rexxretval ); /* Rexx program output   */
    146        
    147         if(rc) {
    148           sprintf(chrFileName,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n",
    149                   "", rc*-1);
    150           WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrFileName, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR);
    151         }
    152         DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */     
    153       }
    154       CATCH(RX_START)
    155         {}END_CATCH;
    156                
    157         WinDestroyMsgQueue(hmq);
    158     }
    159     WinTerminate(hab);
    160   }
    161   thisPtr->fContentsChanged=FALSE;
    162   thisPtr->wpFreeMem((PBYTE)chrFileName);
    163 }
    164 
    165 BOOL CWM3UFolder::wpSetup(PSZ pSetupString)
    166 {
    167   /**************************************************
    168    *                                                *
    169    *                                                *
    170    **************************************************/
    171   char buffer[25];
    172   ULONG bufferSize;
    173 
    174   /* Set object window HWND */
    175   bufferSize=sizeof(buffer);
    176   if(wpScanSetupString(pSetupString, "M3UOBJECTWINDOW", buffer,&bufferSize))
    177     {
    178       hwndObject=atol(buffer);
    179     }
    180 
    181   /* Set object pointer to M3U-File */
    182   bufferSize=sizeof(buffer);
    183   if(wpScanSetupString(pSetupString, "M3UOBJECTHANDLE", buffer,&bufferSize))
    184     {
    185       WPObject *wpObject;
    186 
    187       wpObjM3UFile=NULLHANDLE;
    188       wpObject=(WPObject*)atol(buffer);
    189       if(somIsObj(wpObject))
    190         wpObjM3UFile=wpObject;
    191     }
    192 
    193 
    194   /* FIXME: Use immediate parent here !!!! */
    195   return CWMediaFolder::wpSetup(pSetupString);
    196 }
    197 #endif
    198 
    19960/*****************************************************/
    20061/*                                                   */
     
    20364/*                                                   */
    20465/*****************************************************/
    205 MRESULT EXPENTRY m3uFldrContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
     66MRESULT EXPENTRY m3uFldrContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    20667{
    20768  CWMediaFolder* thisPtr;
     
    272133/*                                                                          */
    273134/****************************************************************************/
    274 MRESULT EXPENTRY m3uTopCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
    275 {
    276    
     135MRESULT EXPENTRY m3uTopCtrlDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     136{
     137
    277138  switch(msg)
    278139    {
     
    284145        ULONG ulStyle;
    285146        SWP swp;
    286        
     147
    287148        WinSetWindowULong(hwnd,QWL_USER,(ULONG)PVOIDFROMMP(mp2));//Save object ptr.
    288149        WinQueryWindowPos(WinQueryWindow(hwnd,QW_PARENT),&swp);
     
    299160      WinSetFocus(HWND_DESKTOP, WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT));
    300161      return WinSendMsg(WinWindowFromID(WinQueryWindow(hwnd,QW_PARENT),FID_CLIENT),msg,mp1,mp2);
    301      
     162
    302163      /*****************************************************/
    303164      /* Paint the background.                             */
     
    321182          ptl.x=lTemp*rclSource.xRight;
    322183          lTemp=rcl.yBottom/rclSource.yTop;
    323           lTemp*=rclSource.yTop;   
     184          lTemp*=rclSource.yTop;
    324185          while(ptl.x<rcl.xRight) {
    325186            ptl.y=lTemp;
    326187            while(ptl.y<rcl.yTop) {/* y direction */
    327188              WinDrawBitmap(hps, allBMPs[CTRLIDX_BOTTOM].hbm,
    328                             &rclSource, 
     189                            &rclSource,
    329190                            (PPOINTL)&ptl,
    330191                            0, 0,
     
    332193              ptl.y+=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cy;
    333194            };
    334             ptl.x+=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cx; 
     195            ptl.x+=allBMPs[CTRLIDX_BOTTOM].bmpInfoHdr.cx;
    335196          };
    336197          WinEndPaint(hps);
     
    351212        rclSource.xRight=allBMPs[CTRLIDX_TOPLEFT].bmpInfoHdr.cx;
    352213        WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPLEFT].hbm,
    353                       &rclSource, 
     214                      &rclSource,
    354215                      (PPOINTL)&rclSave,
    355216                      0, 0,
     
    364225        rclSource.xRight=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx;
    365226        WinDrawBitmap(hps, allBMPs[CTRLIDX_TOPRIGHT].hbm,
    366                       &rclSource, 
     227                      &rclSource,
    367228                      (PPOINTL)&rclSave,
    368229                      0, 0,
     
    386247 *                                                          *
    387248************************************************************/
    388 MRESULT EXPENTRY m3uFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
     249MRESULT EXPENTRY m3uFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    389250{
    390251  CWM3UFolder* thisPtr;
     
    419280#endif
    420281              case 0x2d1: /* View menu */
    421                 /* Remove change to Tree from menubar menu */ 
     282                /* Remove change to Tree from menubar menu */
    422283                WinSendMsg(HWNDFROMMP(mp2),MM_REMOVEITEM,MPFROM2SHORT(717,TRUE),0);
    423284                /* Icon view */
     
    462323          case ID_MENUITEMEXIT:
    463324            WinPostMsg(hwnd, WM_CLOSE, 0, 0);
    464             return MRFALSE; 
     325            return MRFALSE;
    465326          case ID_MENUITEMSAVE:
    466327            {
     
    472333                  }
    473334                }
    474               return MRFALSE; 
     335              return MRFALSE;
    475336            }
    476337          default:
    477             if(SHORT1FROMMP(mp1)>=FIRSTUSERITEM) { 
     338            if(SHORT1FROMMP(mp1)>=FIRSTUSERITEM) {
    478339              BOOL bHandled=FALSE;
    479              
     340
    480341              TRY_LOUD(AF_MENU) {
    481342#if 0
     
    484345                    thisPtr=(CWMediaFolder*) WinQueryWindowULong(hwndDialog,QWL_USER);
    485346                    if(somIsObj(thisPtr)) {
    486                      
     347
    487348                      CWMenuFolder * wpFolder; 
    488349                      HOBJECT hObject;
     
    490351                      somTD_CWMenuFolder_mfCheckSkriptMenuItems methodPtr;
    491352                      M_WPObject *m_wpObject;
    492                      
     353
    493354                      if(!bHandled)
    494355                        bHandled=thisPtr->cwCheckUserMenuItems(USERMENUFOLDER_MEDIAFOLDER , SHORT1FROMMP(mp1));
     
    557418
    558419  /* Reregister wpFolder window class on first opening */
    559   /* We need this private code to have some private 
     420  /* We need this private code to have some private
    560421     window words */
    561422  if(!g_fRegisteredWindowClass)
    562423    {
    563424      CLASSINFO ci;
    564      
     425
    565426      if(WinQueryClassInfo(WinQueryAnchorBlock(HWND_DESKTOP),
    566427                           (PSZ)"wpFolder window",
     
    589450  /* Skip media folder. Because of this skip we had to register the window words here (see above).
    590451     It's not asured a Mediafolder was already opended. Normaly the window words are added in
    591      wpOpen() of the Mediafolder. 
     452     wpOpen() of the Mediafolder.
    592453     FIXME: This only works if CWProgFolder->CWMediaFolder->CWM3UFolder is the class hierarchy */
    593454  hwnd=CWProgFolder::wpOpen(hwndCnr, ulView, ulParam);
    594455
    595456  /* Only subclass folder frames, not settings notebooks */
    596   if(ulView!=OPEN_SETTINGS){   
     457  if(ulView!=OPEN_SETTINGS){
    597458    if(!hResource) {
    598459      errorResource();
     
    604465      ULONG ulErr;
    605466
    606       /* Remove the title added by XWP */
    607       WinSetWindowText(hwnd, wpObjM3UFile->wpQueryTitle());
     467          if (somIsObj(wpObjM3UFile)) {
     468         /* Remove the title added by XWP */
     469         WinSetWindowText(hwnd, wpObjM3UFile->wpQueryTitle());
     470      }
    608471      if(!getMessage(text, IDSTR_PLAYLISTVIEWTITLE, sizeof(text), queryResModuleHandle(), HWND_DESKTOP))
    609472        sprintf(text, "Playlist Editor");
     
    624487        /* Menu bar found */
    625488
    626         /* Remove folder item from menubar menu */ 
     489        /* Remove folder item from menubar menu */
    627490        WinSendMsg( myFrameCtrlHWND, MM_REMOVEITEM, MPFROM2SHORT(0x2cf,TRUE),0);
    628491
     
    633496        mi.afStyle=MIS_TEXT|MIS_SUBMENU;
    634497        mi.id=ID_MENUFILE;
    635         mi.afAttribute=NULL;               
     498        mi.afAttribute=NULL;
    636499        mi.hwndSubMenu=hwndMenu;
    637500        mi.hItem=NULL;
     
    640503        getMessage(text, IDSTR_MENUFILE,sizeof(text), hResource, hwnd);
    641504        WinSendMsg(myFrameCtrlHWND,MM_INSERTITEM,MPFROMP(&mi),
    642                    (MPARAM)text); 
     505                   (MPARAM)text);
    643506
    644507        /* Insert skript and user menu item if necessary */
     
    675538            iItemCount=(int)WinSendMsg(myFrameCtrlHWND,MM_QUERYITEMCOUNT,(MPARAM)0,
    676539                                       (MPARAM)0);
    677            
     540
    678541            /* Fill the MENUITEM structure */
    679542            mi.iPosition=iItemCount-1;
    680543            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
    681544            mi.id=ID_MBMENUSKRIPTS;
    682             mi.afAttribute=NULL;               
     545            mi.afAttribute=NULL;
    683546            mi.hwndSubMenu=hwndMenu;
    684547            mi.hItem=NULL;
     
    687550            getMessage(text, IDSTR_MENUSKRIPTS,sizeof(text), hResource, hwnd);
    688551            WinSendMsg(myFrameCtrlHWND,MM_INSERTITEM,MPFROMP(&mi),
    689                        (MPARAM)text); 
     552                       (MPARAM)text);
    690553          }/* end of if(hwndMenu) */
    691554        }
     
    700563         the procedure saves this pointer for later use. */
    701564      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd, m3uTopCtrlDialogProc,hResource,IDDLG_TOPFRAME ,this);
    702       /* Save the HWND in the instance data */   
     565      /* Save the HWND in the instance data */
    703566      //      hwndTop=myFrameCtrlHWND;
    704       /* Save the HWND in the Window words */   
    705       WinSetWindowULong( hwnd, ulQWL_TOPCTRLHWND, myFrameCtrlHWND); 
    706    
     567      /* Save the HWND in the Window words */
     568      WinSetWindowULong( hwnd, ulQWL_TOPCTRLHWND, myFrameCtrlHWND);
     569
    707570      if(myFrameCtrlHWND){
    708571        /* Query the size of the dialog */
     
    712575        //        sizel.cy=rectl.yTop-rectl.yBottom;
    713576        sizel.cy=12;
    714         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     577        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    715578           FCTL_TOP means put it at the top of the folder.
    716579           After calling cwUpdateFrame(hwnd) it will be visible */
     
    722585         the procedure saves this pointer for later use. */
    723586      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,leftCtrlDialogProc,hResource,IDDLG_LEFTFRAME ,this);
    724       /* Save the HWND in the instance data */   
     587      /* Save the HWND in the instance data */
    725588      //    hwndLeft=myFrameCtrlHWND;
    726       /* Save the HWND in the Window words */   
     589      /* Save the HWND in the Window words */
    727590      WinSetWindowULong( hwnd, ulQWL_LEFTCTRLHWND, myFrameCtrlHWND);
    728        
    729    
     591
     592
    730593      if(myFrameCtrlHWND){
    731594        /* Query the size of the dialog */
     
    734597        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;//rectl.xRight-rectl.xLeft;
    735598        //  sizel.cx=rectl.xRight-rectl.xLeft;
    736         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     599        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    737600           FCTL_RIGHT means put it at the RIGHT of the folder.
    738601           After calling cwUpdateFrame(hwnd) it will be visible */
     
    744607         the procedure saves this pointer for later use. */
    745608      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,rightCtrlDialogProc,hResource,IDDLG_FRAMERIGHT ,this);
    746       /* Save the HWND in the instance data */   
     609      /* Save the HWND in the instance data */
    747610      //      hwndRight=myFrameCtrlHWND;
    748       /* Save the HWND in the Window words */   
     611      /* Save the HWND in the Window words */
    749612      WinSetWindowULong( hwnd, ulQWL_RIGHTCTRLHWND, myFrameCtrlHWND);
    750      
     613
    751614      if(myFrameCtrlHWND){
    752615        CNRINFO cnrInfo;
    753         HWND hwndContainer; 
     616        HWND hwndContainer;
    754617        PVIEWITEM pView;
    755618
     
    758621        /* It's the right dialog so we need the width but not the height. */
    759622        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;// rectl.xRight-rectl.xLeft;
    760         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     623        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    761624           FCTL_RIGHT means put it at the RIGHT of the folder.
    762625           After calling cwUpdateFrame(hwnd) it will be visible */
    763626        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_RIGHT, FCTL_POSABOVE|FCTL_POSBELOW);
    764        
     627
    765628        //        hwndContainer=WinWindowFromID(myFrameCtrlHWND, IDCNR_PLAYLIST);
    766629        //  WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
     
    772635         the procedure saves this pointer for later use. */
    773636      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,bottomCtrlDialogProc,hResource,IDDLG_BOTTOMFRAME ,this);
    774       /* Save the HWND in the instance data */   
    775       hwndBottom=myFrameCtrlHWND;           
    776       /* Save the HWND in the Window words */   
     637      /* Save the HWND in the instance data */
     638      hwndBottom=myFrameCtrlHWND;
     639      /* Save the HWND in the Window words */
    777640      WinSetWindowULong( hwnd, ulQWL_BOTTOMCTRLHWND, myFrameCtrlHWND);
    778641
     
    783646        sizel.cy=rectl.yTop-rectl.yBottom-2;
    784647        //    sizel.cy=allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy;
    785         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     648        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    786649           FCTL_TOP means put it at the top of the folder.
    787650           After calling cwUpdateFrame(hwnd) it will be visible */
     
    810673        SysWriteToTrapLog("\nTrap occured in %s, file: %s above line %d.\n",
    811674                          __FUNCTION__, __FILE__, __LINE__);
    812        
    813       } END_CATCH;   
     675
     676      } END_CATCH;
    814677
    815678      /* Make sure on open the container is visible */
     
    825688  fContentsChanged=TRUE;
    826689  return CWMediaFolder::wpDeleteFromContent(Object);
    827 }
    828 
    829 MRESULT CWM3UFolder::wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem)
    830 {
    831   return CWMediaFolder::wpDrop(hwndCnr, pDragInfo, pDragItem);
    832690}
    833691
     
    847705    return;
    848706
    849   thisPtr=(CWM3UFolder*)parms->thisPtr;   
     707  thisPtr=(CWM3UFolder*)parms->thisPtr;
    850708  if(!somIsObj(thisPtr))
    851709    return;
     
    862720    hmq=WinCreateMsgQueue(hab,0);
    863721    if(hmq) {
    864       FILE* fStream;     
     722      FILE* fStream;
    865723
    866724      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), parms->hwndCnr))
     
    894752                    else
    895753                      break;/* Error */
    896                                        
     754
    897755                    /* Get the name of the audio file */
    898756                    ulSize=sizeof(chrFileName);
     
    906764                  break;
    907765                }/* for() */
    908             }/* fopen() */   
     766            }/* fopen() */
    909767          fclose(fStream);
    910768        }
     
    918776    /* Close and destroy the folder if requested */
    919777    WinPostMsg(parms->hwndFrame, WM_CLOSE, 0, 0);
    920     if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), thisPtr->hwndObject)) 
     778    if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), thisPtr->hwndObject))
    921779      WinPostMsg(thisPtr->hwndObject, WM_APPTERMINATENOTIFY, 0, 0);
    922780  }
     
    968826                           title, IDSTR_CLOSETITLE, sizeof(title),
    969827                           queryResModuleHandle(),
    970                            HWND_DESKTOP, 
     828                           HWND_DESKTOP,
    971829                           MB_YESNOCANCEL|MB_MOVEABLE|MB_ICONQUESTION))==MBID_CANCEL)
    972830      return FALSE;
  • trunk/mediafolder/c/mediafldr/mediafolder.cpp

    r57 r133  
    11/*
    22 * This file is (C) Chris Wohlgemuth 2002
    3  * 
     3 *
    44 * It's part of the Media-Folder distribution
    55 */
     
    6969  switch(ulAction)
    7070    {
    71     case PLAY_FIRST: 
     71    case PLAY_FIRST:
    7272      /* Send a message to the object window created by the folder play thread */
    7373      WinPostMsg(thisPtr->mfData->hwndPlayObject,WM_APPTERMINATENOTIFY, 0,MPFROMLONG(PLAY_FIRST));
     
    146146              thisPtr->cwSeekAudioFile(LONGFROMMP(mp1));
    147147              /* restart timer */
    148               //    WinStartTimer(WinQueryAnchorBlock(hwnd), WinWindowFromID(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY); 
     148              //    WinStartTimer(WinQueryAnchorBlock(hwnd), WinWindowFromID(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY);
    149149              thisPtr->ulPos=LONGFROMMP(mp1)/1000;
    150150            }
     
    192192      if(hwnd) {
    193193        thisPtr->mfData->hwndPlayObject=hwnd;
     194        WinSetWindowULong(hwnd, QWL_USER,(ULONG)tPt);
    194195        WinSubclassWindow(hwnd,&playObjectProc);
    195         WinSetWindowULong(hwnd, QWL_USER,(ULONG)tPt);
    196196        /* Window created. */
    197197        while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0))
     
    225225    return;
    226226
    227   thisPtr=(CWMediaFolder*)threadParms->thisPtr;   
     227  thisPtr=(CWMediaFolder*)threadParms->thisPtr;
    228228
    229229  if(!somIsObj(thisPtr))
     
    247247  if(!((WPFileSystem*)thisPtr->wpObjM3UFile)->wpQueryRealName(chrFileName, &ulSize, TRUE))
    248248    return;
    249  
     249
    250250  /* Get name of folder */
    251251  ulSize=CCHMAXPATH;
     
    256256  if(hab) {
    257257    hmq=WinCreateMsgQueue(hab,0);
    258     if(hmq) {     
     258    if(hmq) {
    259259      RXSTRING arg[2];                    /* argument string for REXX  */
    260260      RXSTRING rexxretval;                /* return value from REXX    */
     
    266266      /* We could provide a buffer for the interpreter to use instead. */
    267267      rexxretval.strlength = 0L;          /* initialize return to empty*/
    268      
     268
    269269      MAKERXSTRING(arg[0], chrFileName, strlen(chrFileName));/* create input argument     */
    270       MAKERXSTRING(arg[1], chrFolderName, strlen(chrFolderName));/* create input argument     */             
    271      
     270      MAKERXSTRING(arg[1], chrFolderName, strlen(chrFolderName));/* create input argument     */
     271
    272272      TRY_LOUD(RX_START) {
    273273        /* Here we call the interpreter.  We don't really need to use    */
     
    285285                     (PSHORT)     &rexxrc,       /* Rexx program output   */
    286286                     (PRXSTRING)  &rexxretval ); /* Rexx program output   */
    287        
     287
    288288        if(rc) {
    289           sprintf(chrFileName,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 
     289          sprintf(chrFileName,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n",
    290290                  "", rc*-1);
    291291          WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrFileName, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR);
    292292        }
    293         DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */     
     293        DosFreeMem(rexxretval.strptr);          /* Release storage given to us by REXX.  */
    294294      }
    295295      CATCH(RX_START)
    296296        {}END_CATCH;
    297                
     297
    298298        WinDestroyMsgQueue(hmq);
    299299    }
     
    301301  }
    302302  //  thisPtr->fContentsChanged=FALSE;
    303   thisPtr->wpFreeMem((PBYTE)chrFileName); 
     303  thisPtr->wpFreeMem((PBYTE)chrFileName);
    304304  thisPtr->wpFreeMem((PBYTE)threadParms);
    305305}
     
    372372
    373373        WinSetWindowPos(hwndFrame, NULLHANDLE, swp2.x, swp2.y, swp2.cx,swp2.cy,SWP_SIZE|SWP_MOVE);
    374         /* 
     374        /*
    375375           By changing the to contents view we trick the WPS to show the 'Details view' menu item in
    376376           the view menu of the folders system menu. In that sub menu the WPS always inserts all known
     
    379379           The system knows nothing about the 'compact view' and all the handling is done by us.
    380380           As a side effect the folder position information for the details
    381            view isn't changed when the folder is closed in 'Compact view'. 
     381           view isn't changed when the folder is closed in 'Compact view'.
    382382           */
    383383        wpMenuItemSelected(hwndFrame, 0x2cc);
     
    419419                            ",", chrBuf, sizeof(chrBuf));
    420420      chrBuf[sizeof(chrBuf)-1]=0;
    421      
     421
    422422      if(mfData->ulTotalTime<=3600) {
    423423        getMessage( text, IDSTR_STATUSTIME1, sizeof(text), queryResModuleHandle(), HWND_DESKTOP);
     
    432432        sprintf(time, text, mfData->ulTotalTime/(3600*24),
    433433                (mfData->ulTotalTime%(3600*24))/3600,  (mfData->ulTotalTime%3600)/60, mfData->ulTotalTime%60);
    434       }     
     434      }
    435435      if(mfData->ulSize<=0xffffffff) {
    436436        getMessage( text2, IDSTR_STATUSTIME4, sizeof(text2), queryResModuleHandle(),HWND_DESKTOP);
    437         sprintf(text, text2, 
     437        sprintf(text, text2,
    438438                mfData->ulNumTracks, mfData->ulSize/1000000 ,chrBuf, (mfData->ulSize%1000000)/1000,
    439439                chrBuf,  mfData->ulSize%1000,
     
    488488  getMessage(pageName, IDSTRSETTING_TOOLBAR, sizeof(pageName), queryResModuleHandle(), hwndNotebook);
    489489  pageinfo.pszName = pageName;
    490  
     490
    491491  //Insert the page into the settings notebook
    492492  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
     
    497497  PMINIRECORDCORE mrc;
    498498  WPObject * contentObject;
    499  
     499
    500500  /* See if we have an audio file played with doubleclick */
    501501  mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORDEMPHASIS,MPFROMLONG(CMA_FIRST),
     
    551551  /* Get new ID for wave device */
    552552  if(cwRequestMutex(hmtxFileName, 100000)==ERROR_TIMEOUT)
    553     return FALSE; 
     553    return FALSE;
    554554
    555555  iWaveDev++;
     
    565565      WPObject *wpObject;
    566566      PMINIRECORDCORE pmrc;
    567      
     567
    568568#if 0
    569569      /* There's already a file playing using doubleclick */
    570       if(mmGetOtherPlayingAudioFile( this, hwndContainer, &wpObject, &pmrc)) 
     570      if(mmGetOtherPlayingAudioFile( this, hwndContainer, &wpObject, &pmrc))
    571571        return 0;
    572572#endif
     
    605605        else
    606606          return 0;/* Error */
    607        
    608         if( contentObject->somIsA(cwAudioClass) || 
     607
     608        if( contentObject->somIsA(cwAudioClass) ||
    609609           /*contentObject->somIsA(mmAudioClass) ||*/
    610610           contentObject->somIsA(mmMIDIClass)) {
     
    643643                                    MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER));
    644644
    645     if((int)mrc==-1) { 
     645    if((int)mrc==-1) {
    646646      /* Wrong parameter -> user deleted the shadow. */
    647647      /* Stop wave, remove in use emphasis. */
     
    650650    }
    651651    //  HlpWriteToTrapLog("Next mrc is %x\n", mrc);
    652  
     652
    653653    notFound=TRUE;
    654     while(notFound && mrc && (int)mrc!=-1){ 
     654    while(notFound && mrc && (int)mrc!=-1){
    655655      contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
    656656      if(somIsObj(contentObject)) {
     
    664664      else
    665665        return 0;/* Error */
    666      
     666
    667667      if(contentObject->somIsA(cwAudioClass) ||
    668668         /* contentObject->somIsA(mmAudioClass) || */
     
    701701        /* Select the object */
    702702        WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(pmrc),
    703                    MPFROM2SHORT(TRUE, CRA_SELECTED)); 
     703                   MPFROM2SHORT(TRUE, CRA_SELECTED));
    704704
    705705        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing, so start the first one. */
     
    709709        return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing, so start the first one. */
    710710    }
    711  
     711
    712712    /* Check the current time. If we are at the very beginning of the track skip to the previous track
    713713       otherwise skip to the beginning of the current track. */
     
    727727    /* Find an audio file */
    728728    notFound=TRUE;
    729     while(notFound && mrc && (int)mrc!=-1){ 
     729    while(notFound && mrc && (int)mrc!=-1){
    730730      contentObject=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
    731731      if(somIsObj(contentObject)) {
     
    741741
    742742      /* Check if it's an audio file thus playable */
    743       if(contentObject->somIsA(cwAudioClass) || 
     743      if(contentObject->somIsA(cwAudioClass) ||
    744744         /*   contentObject->somIsA(mmAudioClass) || */
    745745         contentObject->somIsA(mmMIDIClass)) {
     
    755755    if(!mrc)
    756756      return 0;
    757    
     757
    758758    break;
    759759  default:
     
    771771  else /*if(contentObject->somIsA(cwAudioClass) || contentObject->somIsA(mmAudioClass))*/
    772772    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
    773  
     773
    774774  chrDevice[sizeof(chrDevice)-1]=0;
    775775
    776776  hwndNotify=playControlDialogFromFrameHWND(hwndFrame);//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
    777777
    778   /* Start audio file */ 
     778  /* Start audio file */
    779779  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, iWavePriv);
    780780  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
     
    789789    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    790790    return 0;
    791   }     
     791  }
    792792
    793793  sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY 1000 notify", iWavePriv);
     
    829829  }
    830830
    831   /* Start pos timer. SET MCIPOSITIONADVICE fails when seeking in the wave. 
     831  /* Start pos timer. SET MCIPOSITIONADVICE fails when seeking in the wave.
    832832     Don't know why. */
    833833
    834   //WinStartTimer(WinQueryAnchorBlock(hwndFrame), WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDTIMER_PLAY, PLAYTIMER_DELAY); 
     834  //WinStartTimer(WinQueryAnchorBlock(hwndFrame), WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDTIMER_PLAY, PLAYTIMER_DELAY);
    835835  WinStartTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY);
    836836
     
    849849  /* Select the object */
    850850  WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
    851              MPFROM2SHORT(TRUE, CRA_SELECTED)); 
     851             MPFROM2SHORT(TRUE, CRA_SELECTED));
    852852
    853853  iWave=iWavePriv;
     
    872872  BOOL bFound=FALSE;
    873873
    874   /** Get a random number in the appropriate range                    */ 
     874  /** Get a random number in the appropriate range                    */
    875875  DosGetDateTime((PDATETIME)&DT);      /* Get the time               */
    876876  seed = DT.hours*60 + DT.minutes;     /* convert to hundreths       */
     
    885885
    886886#ifdef RANDOM_DEBUG
    887     HlpWriteToTrapLog("\n     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]); 
     887    HlpWriteToTrapLog("\n     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]);
    888888#endif
    889889    /* Get a random number in the appropriate range */
     
    891891      mfData->pRandomArray[zufall]=1;
    892892#ifdef RANDOM_DEBUG
    893       HlpWriteToTrapLog("2     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]); 
     893      HlpWriteToTrapLog("2     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]);
    894894#endif
    895895      return zufall;
     
    900900    if (zufall == start && !bFound) {
    901901#ifdef RANDOM_DEBUG
    902       HlpWriteToTrapLog("Error     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]); 
     902      HlpWriteToTrapLog("Error     Zufall: %d       %d\n", zufall, mfData->pRandomArray[zufall]);
    903903#endif
    904904      return -1;
     
    944944  /* Check if we currently play the last track. */
    945945  if((mfData->iNumPlayed>=mfData->iNumToPlay) && mfData->pRandomArray) {
    946     cwStopAudioFile(hwndFrame);/* Reset playing vars and remove in use emphasis */       
     946    cwStopAudioFile(hwndFrame);/* Reset playing vars and remove in use emphasis */
    947947    if(!(ulFlags&FLAG_REPEAT))
    948948      return 0;
     
    959959  /* Get new ID for wave device */
    960960  if(cwRequestMutex(hmtxFileName, 100000)==ERROR_TIMEOUT)
    961     return FALSE; 
     961    return FALSE;
    962962  iWaveDev++;
    963963  if(iWaveDev==1000)
     
    10091009  /* Find an audio file */
    10101010  notFound=TRUE;
    1011   while(notFound){ 
     1011  while(notFound){
    10121012    /* Find track to play */
    10131013    if((iTrack=_getRandomTrack(mfData))==-1) {
     
    10221022  HlpWriteToTrapLog("%s: _getRandomTrack returned: %d.\n", __FUNCTION__, iTrack);
    10231023#endif
    1024    
     1024
    10251025    for(a=0,mrc=(PMINIRECORDCORE)WinSendMsg(hwndContainer,CM_QUERYRECORD,NULL,
    10261026                                            MPFROM2SHORT(CMA_FIRST,CMA_ITEMORDER));
     
    10391039#endif
    10401040
    1041     if(!mrc) 
     1041    if(!mrc)
    10421042      {
    10431043#ifdef RANDOM_DEBUG
     
    10531053
    10541054    /* Check if it's an audio file thus playable */
    1055     if(contentObject->somIsA(cwAudioClass) || 
     1055    if(contentObject->somIsA(cwAudioClass) ||
    10561056       /*       contentObject->somIsA(mmAudioClass) ||*/
    10571057       contentObject->somIsA(mmMIDIClass)) {
     
    10831083  else /*if(contentObject->somIsA(cwAudioClass) || contentObject->somIsA(mmAudioClass))*/
    10841084    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice));
    1085  
     1085
    10861086  chrDevice[sizeof(chrDevice)-1]=0;
    10871087
    10881088  hwndNotify=playControlDialogFromFrameHWND(hwndFrame);//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
    10891089
    1090   /* Start audio file */ 
     1090  /* Start audio file */
    10911091  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait",name, chrDevice, iWavePriv);
    10921092  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
     
    11001100    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    11011101    return 0;
    1102   }     
     1102  }
    11031103
    11041104  sprintf(chrCommand,"SETPOSITIONADVISE wave%d ON EVERY 1000 notify", iWavePriv);
     
    11401140    return 0;
    11411141  }
    1142   /* Start pos timer. SET MCIPOSITIONADVICE fails when seeking in the wave. 
     1142  /* Start pos timer. SET MCIPOSITIONADVICE fails when seeking in the wave.
    11431143     Don't know why. */
    1144   //  WinStartTimer(WinQueryAnchorBlock(hwndFrame), WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDTIMER_PLAY, PLAYTIMER_DELAY); 
    1145   WinStartTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY); 
     1144  //  WinStartTimer(WinQueryAnchorBlock(hwndFrame), WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE), IDTIMER_PLAY, PLAYTIMER_DELAY);
     1145  WinStartTimer(WinQueryAnchorBlock(hwndFrame), playControlDialogFromFrameHWND(hwndFrame), IDTIMER_PLAY, PLAYTIMER_DELAY);
    11461146
    11471147  /* Set emphasis by adding the object to the inuse list */
     
    11581158  /* Select the object */
    11591159  WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
    1160              MPFROM2SHORT(TRUE, CRA_SELECTED)); 
     1160             MPFROM2SHORT(TRUE, CRA_SELECTED));
    11611161
    11621162  iWave=iWavePriv;
     
    11871187        mfData->iNumPlayed=0;
    11881188      }
    1189      
     1189
    11901190      sprintf(chrCommand,"stop wave%d wait", iWave);
    11911191      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    1192      
     1192
    11931193      sprintf(chrCommand,"close wave%d wait", iWave);
    11941194      rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    1195      
     1195
    11961196      _resetDisplay(this);
    11971197        //_resetDisplay(topControlFromFrameHWND(hwndFrame));
     
    12071207              myViewItem.bIsInUseList=FALSE;
    12081208        };
    1209      
     1209
    12101210      //HlpWriteToTrapLog("\n1 line %d.\n");
    1211      
     1211
    12121212      /* Deselect the object */
    12131213      if(WinIsWindow(WinQueryAnchorBlock(hwndFrame), hwndContainer))
    12141214        WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrcPlaying),
    1215                    MPFROM2SHORT(FALSE, CRA_SELECTED)); 
    1216      
     1215                   MPFROM2SHORT(FALSE, CRA_SELECTED));
     1216
    12171217      iWave=0;
    12181218      currentObject=NULLHANDLE;
     
    12341234#endif
    12351235          WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
    1236                      MPFROM2SHORT(FALSE, CRA_SELECTED));       
     1236                     MPFROM2SHORT(FALSE, CRA_SELECTED));
    12371237        }
    12381238#if 0
     
    12581258                  ulPos=0;
    12591259                  WinSendMsg(hwndContainer,CM_SETRECORDEMPHASIS, MPFROMP(mrc),
    1260                              MPFROM2SHORT(FALSE, CRA_SELECTED)); 
     1260                             MPFROM2SHORT(FALSE, CRA_SELECTED));
    12611261
    12621262                };
     
    12731273                        __FUNCTION__, __FILE__, __LINE__);
    12741274    } END_CATCH;
    1275    
     1275
    12761276    return TRUE;
    12771277}
     
    13231323  if((rc & 0x0000ffff)!=MCIERR_SUCCESS) {
    13241324    /* Problem with MCI. Clean up. The Timer will be stopped in the method */
    1325     cwStopAudioFile(hwndFrame); 
     1325    cwStopAudioFile(hwndFrame);
    13261326  }
    13271327  else {
    13281328    if(!stricmp(retMsg, "stopped")) {
    13291329      /* Audio file played. Start next */
    1330       cwPlayAudioFile(hwndFrame, PLAY_NEXT); 
     1330      cwPlayAudioFile(hwndFrame, PLAY_NEXT);
    13311331    }
    13321332    showPlayTimeDisplay(this, TRUE);/* Ensure display is visible */
  • trunk/mediafolder/c/mediafldr/mediafolderoverridenwpclsmethods.cpp

    r47 r133  
    11/*
    22 * This file is (C) Chris Wohlgemuth 1999-2003
    3  * 
     3 *
    44 * It's part of the Audio/Data-CD-Creator distribution
    55 */
     
    132132
    133133  hps=WinGetPS(HWND_DESKTOP);
    134  
     134
    135135  /* The main BMP */
    136136  allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPMIDDLE, 0, 0);
     
    352352          if(DosQueryModuleHandle(pathname,&hmod)) {
    353353            pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
    354               ->wpModuleForClass("CWAudioShadow");           
     354              ->wpModuleForClass("CWAudioShadow");
    355355            if(DosQueryModuleHandle(pathname,&hmod)) {
    356356              pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
    357                 ->wpModuleForClass("M_CWCDFolder");           
     357                ->wpModuleForClass("M_CWCDFolder");
    358358              if(DosQueryModuleHandle(pathname,&hmod)) {
    359359                pathname=((WPClassManager*)SOMClassMgrObject)  //Query Pathname of class file
    360                   ->wpModuleForClass("CWCDFolder");           
     360                  ->wpModuleForClass("CWCDFolder");
    361361                if(DosQueryModuleHandle(pathname,&hmod)) {
    362362                  hmod=0;
     
    378378        if((found=strrchr(chrInstallDir,'\\'))!=NULLHANDLE)
    379379          *found=0;
    380        
     380
    381381        /* Save the dir for config files. */
    382382        //strcpy( chrConfigDir, chrInstallDir);
     
    393393
    394394  if(!hmod) {
    395     char path[CCHMAXPATH]; 
     395    char path[CCHMAXPATH];
    396396    char buf[CCHMAXPATH];
    397397    char* found;
    398398    APIRET rc;
    399    
    400     /* Get the language code of our system and load the 
     399
     400    /* Get the language code of our system and load the
    401401       resource DLL with the right language */
    402402    do {
     
    404404      PCSZ pszLang=chrLang;
    405405      char *chrPtr;
    406      
     406
    407407      /* Get Language var */
    408408      if(NO_ERROR!=DosScanEnv("LANG", &pszLang))
     
    419419      while(*chrPtr==' ')
    420420        chrPtr++;
    421      
     421
    422422      /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */
    423423      if(strlen(chrPtr)<5)
    424424        break;
    425      
     425
    426426      if(DosQueryModuleName(queryModuleHandle("M_CWMediaFolder"),sizeof(path),path)!=NO_ERROR)
    427427        break;
    428      
     428
    429429      found=strrchr(path,'\\');
    430430      if(!found)
    431431        break;
    432432      *found=0;
    433      
    434       /* Extract the first two chars */               
     433
     434      /* Extract the first two chars */
    435435      sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]);
    436436      strcat(path,buf);
     
    438438      if(DosLoadModule(buf,sizeof(buf),path, &hmod)==NO_ERROR)
    439439        break;
    440      
     440
    441441      /* NLS DLL not found. Try to load default */
    442442      found=strrchr(path,'\\');
    443443      if(!found)
    444444        break;
    445      
     445
    446446      *found=0;
    447447      sprintf(buf, DEFRESDLLNAME);
     
    534534  ULONG ulInfoLen=0;
    535535  APIRET rc;
    536   char path[CCHMAXPATH]; 
     536  char path[CCHMAXPATH];
    537537  char* found;
    538538  char buf[CCHMAXPATH];
     
    574574  /* We don't want an automatic template because we create it during
    575575     installation because we need one with an ID so we can create a shadow
    576      without problems. So we return CLSSTYLE_DONTTEMPLATE. 
     576     without problems. So we return CLSSTYLE_DONTTEMPLATE.
    577577     Another way would be an override of wpclsCreateDefaultTemplate()
    578578     but this works, too, and we have to override this method anyway. We must
     
    591591  if(PrfQueryProfileInt(HINI_USERPROFILE, APPKEY_CWMM, MFLDR_NO_TEMPLATE_SHADOW, 0))
    592592    return;
    593  
     593
    594594  if(!WinQueryObject(ID_MEDIALDRTMPL_SHADOW))
    595595    {
     
    778778
    779779    return rc;
    780 #endif   
    781 
    782 }
    783 
    784 
    785 
    786 
    787 
    788 
    789 
    790 
    791 
    792 
     780#endif
     781
     782}
     783
     784
     785
     786
     787
     788
     789
     790
     791
     792
  • trunk/mediafolder/c/mediafldr/mediafolderoverridenwpmethods.cpp

    r4 r133  
    11/*
    22 * This file is (C) Chris Wohlgemuth 2002
    3  * 
     3 *
    44 * It's part of the Media-Folder distribution
    55 */
     
    3636/* For calling the method in the CWAudio class. Linking to the DLL would require the
    3737   new audio classes. By dynamically querying the method the media folder works without
    38    installing the audio classes. */ 
     38   installing the audio classes. */
    3939#include "cwmmquerytrackinfo.h"
    4040
     
    144144        while(!(thisPtr->wpQueryFldrFlags() & FOI_POPULATEDWITHALL))
    145145          DosSleep(300);
    146        
     146
    147147        hwndContainer=WinWindowFromID(tPt->hwndFrame, FID_CLIENT);
    148148        WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
    149149                   MPFROMLONG(sizeof(cnrInfo)));
    150        
     150
    151151        /* Get class object of MMAudio. We need it so we can check if a file is an audio file. */
    152152        if(somIsObj(cwAudioClass)) {
     
    234234  char time[200];
    235235  ULONG ulSecs;
    236  
     236
    237237  if(!methodPtr)
    238238    somhlpQueryCWAudioMethodPtr(this);
    239  
     239
    240240  if(methodPtr){
    241241    if((fsObject=(WPFileSystem*)cwGetFileSystemObject(Object))!=NULLHANDLE){/* Filesystem object or NULL */
     
    248248      }
    249249    }
    250   } 
     250  }
    251251  return CWProgFolder::wpDeleteFromContent(Object);
    252252}
     
    265265
    266266  /* Reregister wpFolder window class on first opening */
    267   /* We need this private code to have some private 
     267  /* We need this private code to have some private
    268268     window words */
    269269  if(!g_fRegisteredWindowClass)
    270270    {
    271271      CLASSINFO ci;
    272      
     272
    273273      if(WinQueryClassInfo(WinQueryAnchorBlock(HWND_DESKTOP),
    274274                           (PSZ)"wpFolder window",
     
    299299    return NULLHANDLE;
    300300
    301 #if 0   
     301#if 0
    302302  for(pViewItem=wpFindViewItem(VIEW_ANY, NULLHANDLE); pViewItem; pViewItem=wpFindViewItem(VIEW_ANY, pViewItem))
    303303    iItemCount+=1;
     
    318318    }
    319319
    320     /* Save this ptr */ 
     320    /* Save this ptr */
    321321    WinSetWindowULong( hwnd, ulQWP_THISPTR, (ULONG)this); /* Moved from outside the if clause */
    322322
     
    338338        ulFlags|=FLAG_ALREADYSIZED;
    339339      }
    340      
     340
    341341      /* Build new menu entries. */
    342342      myFrameCtrlHWND=WinWindowFromID(hwnd,FID_MENU);//Get menu hwnd
     
    388388            iItemCount=(int)WinSendMsg(myFrameCtrlHWND,MM_QUERYITEMCOUNT,(MPARAM)0,
    389389                                       (MPARAM)0);
    390            
     390
    391391            /* Fill the MENUITEM structure */
    392392            mi.iPosition=iItemCount-1;
    393393            mi.afStyle=MIS_TEXT|MIS_SUBMENU;
    394394            mi.id=ID_MBMENUSKRIPTS;
    395             mi.afAttribute=NULL;               
     395            mi.afAttribute=NULL;
    396396            mi.hwndSubMenu=hwndMenu;
    397397            mi.hItem=NULL;
     
    400400            getMessage(text, IDSTR_MENUSKRIPTS,sizeof(text), hResource, hwnd);
    401401            WinSendMsg(myFrameCtrlHWND,MM_INSERTITEM,MPFROMP(&mi),
    402                        (MPARAM)text); 
     402                       (MPARAM)text);
    403403          }/* end of if(hwndMenu) */
    404404        }
     
    422422         the procedure saves this pointer for later use. */
    423423      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,topCtrlDialogProc,hResource,IDDLG_TOPFRAME ,this);
    424       /* Save the HWND in the Window words */   
     424      /* Save the HWND in the Window words */
    425425      WinSetWindowULong( hwnd, ulQWL_TOPCTRLHWND, myFrameCtrlHWND);
    426426
     
    431431           is always the width of the folder. */
    432432        sizel.cy=allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy;
    433         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     433        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    434434           FCTL_TOP means put it at the top of the folder.
    435435           After calling cwUpdateFrame(hwnd) it will be visible */
     
    442442         the procedure saves this pointer for later use. */
    443443      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,leftCtrlDialogProc,hResource,IDDLG_LEFTFRAME ,this);
    444       /* Save the HWND in the Window words */   
     444      /* Save the HWND in the Window words */
    445445      WinSetWindowULong( hwnd, ulQWL_LEFTCTRLHWND, myFrameCtrlHWND);
    446            
     446
    447447      if(myFrameCtrlHWND){
    448448        /* Query the size of the dialog */
     
    450450        /* It's the right dialog so we need the width but not the height. */
    451451        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;//rectl.xRight-rectl.xLeft;
    452         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     452        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    453453           FCTL_RIGHT means put it at the RIGHT of the folder.
    454454           After calling cwUpdateFrame(hwnd) it will be visible */
     
    460460         the procedure saves this pointer for later use. */
    461461      myFrameCtrlHWND=WinLoadDlg(hwnd,hwnd,rightCtrlDialogProc,hResource,IDDLG_FRAMERIGHT ,this);
    462       /* Save the HWND in the Window words */   
     462      /* Save the HWND in the Window words */
    463463      WinSetWindowULong( hwnd, ulQWL_RIGHTCTRLHWND, myFrameCtrlHWND);
    464464
    465465      if(myFrameCtrlHWND){
    466466        CNRINFO cnrInfo;
    467         HWND hwndContainer; 
     467        HWND hwndContainer;
    468468        PVIEWITEM pView;
    469469
     
    472472        /* It's the right dialog so we need the width but not the height. */
    473473        sizel.cx=allBMPs[CTRLIDX_TOPRIGHT].bmpInfoHdr.cx-1-7-2;// rectl.xRight-rectl.xLeft;
    474         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     474        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    475475           FCTL_RIGHT means put it at the RIGHT of the folder.
    476476           After calling cwUpdateFrame(hwnd) it will be visible */
    477477        cwAddFrameCtl(hwnd, myFrameCtrlHWND, sizel, FCTL_RIGHT, FCTL_POSABOVE|FCTL_POSBELOW);
    478        
     478
    479479        hwndContainer=WinWindowFromID(myFrameCtrlHWND, IDCNR_PLAYLIST);
    480480        WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
     
    489489      /* Save the HWND in the instance data */
    490490      hwndBottom=myFrameCtrlHWND;
    491       /* Save the HWND in the Window words */   
     491      /* Save the HWND in the Window words */
    492492      WinSetWindowULong( hwnd, ulQWL_BOTTOMCTRLHWND, myFrameCtrlHWND);
    493    
     493
    494494      if(hwndBottom){
    495495        /* Query the size of the dialog */
     
    498498        sizel.cy=rectl.yTop-rectl.yBottom-2;
    499499        //    sizel.cy=allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy;
    500         /* Call a method of CWProgFolder to add the dialog as a framecontrol. 
     500        /* Call a method of CWProgFolder to add the dialog as a framecontrol.
    501501           FCTL_TOP means put it at the top of the folder.
    502502           After calling cwUpdateFrame(hwnd) it will be visible */
     
    526526        SysWriteToTrapLog("\nTrap occured in %s, file: %s above line %d.\n",
    527527                          __FUNCTION__, __FILE__, __LINE__);
    528        
     528
    529529      } END_CATCH;
    530530  }
     
    543543  QMSG qmsg;
    544544  CWMediaFolder *thisPtr;
    545  
     545
    546546  thisPtr=(CWMediaFolder*)arg;    //Pointer auf CWMediaFolder-Object
    547547  hab=WinInitialize(0);
     
    575575  bufferSize=sizeof(buffer);
    576576  if(!wpScanSetupString(pSetupString, MEDIAFLDR_VOLUME, buffer,&bufferSize))
    577     { 
     577    {
    578578      ulVolume=70;
    579579      /* Set position of slider bar */
     
    593593  if(!wpScanSetupString(pSetupString,"ICONVIEWPOS",buffer,&bufferSize))
    594594    wpSetup( "ICONVIEWPOS=20,10,60,75");/* Fill in defaults */
    595  
     595
    596596  /* Set folder details- and sortclass to CWAudioShadow so track infos are shown */
    597597  bufferSize=sizeof(buffer);
    598598  if(!wpScanSetupString(pSetupString,"DETAILSCLASS",buffer,&bufferSize))
    599599    wpSetup("DETAILSCLASS=CWAudioShadow");/* Fill in defaults */
    600  
     600
    601601  bufferSize=sizeof(buffer);
    602602  if(!wpScanSetupString(pSetupString,"SORTCLASS",buffer,&bufferSize))
    603603    wpSetup("SORTCLASS=CWAudioShadow");/* Fill in defaults */
    604  
     604
    605605  /* This works only on Warp 4 and above */
    606606  bufferSize=sizeof(buffer);
     
    608608    /* This works only on Warp 4 and above */
    609609    wpSetup("DETAILSTODISPLAY=0,1,4,12,13,14,15,16,17,18,19,20,21");/* Fill in defaults */
    610  
     610
    611611  /* This works only on Warp 4 and above */
    612612  bufferSize=sizeof(buffer);
     
    614614    /* This works only on Warp 4 and above */
    615615    wpSetup("SORTBYATTR=6,24,25,26,27,28,29,30,31,32,33");/* Fill in defaults */
    616  
     616
    617617  return rcParent;
    618618}
     
    621621{
    622622  PVIEWITEM pViewItem;
    623  
     623
    624624  /* Check if we close a settings view or a folder view. */
    625625  pViewItem=thisPtr->wpFindViewItem(VIEW_DETAILS|VIEW_CONTENTS, NULLHANDLE);
     
    664664  bufferSize=sizeof(buffer);
    665665  if(wpScanSetupString(pSetupString, MEDIAFLDR_STOP, buffer,&bufferSize))
    666     { 
     666    {
    667667      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
    668668      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
     
    671671  bufferSize=sizeof(buffer);
    672672  if(wpScanSetupString(pSetupString, MEDIAFLDR_NEXT, buffer,&bufferSize))
    673     { 
     673    {
    674674      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
    675675      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
     
    678678  bufferSize=sizeof(buffer);
    679679  if(wpScanSetupString(pSetupString, MEDIAFLDR_PREV, buffer,&bufferSize))
    680     { 
     680    {
    681681      HWND hwndFrame=_findOpenMediaFldrViewHWND(this);
    682682      if(WinIsWindow(WinQueryAnchorBlock(HWND_DESKTOP), hwndFrame))
     
    687687  bufferSize=sizeof(buffer);
    688688  if(wpScanSetupString(pSetupString, MEDIAFLDR_VOLUME, buffer,&bufferSize))
    689     { 
     689    {
    690690      ulVolume=atol(buffer);
    691691      if(ulVolume<0)
     
    699699  bufferSize=sizeof(buffer);
    700700  if(wpScanSetupString(pSetupString, MEDIAFLDR_REPEAT, buffer,&bufferSize))
    701     { 
     701    {
    702702      switch(atol(buffer))
    703703        {
     
    779779ULONG CWMediaFolder::wpAddFolderView1Page(HWND hwndNotebook)
    780780{
    781   /* 
     781  /*
    782782     Removing this page also means removing the XWorkplace
    783783     view page. It would be possible to call the XWP method
     
    836836    }
    837837  /*
    838    
     838
    839839    Climb up the list of parents to make sure we call the right
    840840    method if the parent was replaced. Otherwise we may skip a replacement class
     
    848848                            1,
    849849                            __ClassObject->
    850                             somGetMethodToken(mySomId))                   
    851         )(this, hwndNotebook, ppageinfo); 
     850                            somGetMethodToken(mySomId))
     851        )(this, hwndNotebook, ppageinfo);
    852852    SOMFree(mySomId);
    853853    return rc;
    854854  }
    855   else 
     855  else
    856856    return CWProgFolder::wpInsertSettingsPage(hwndNotebook, ppageinfo);
    857857}
     
    886886      ulPrivFlags&= ~MFLDR_VIEW_COMPACT;
    887887      return rcParent;
    888     case ID_MENUVIEWCOMPACT: /* Compact view */ 
     888    case ID_MENUVIEWCOMPACT: /* Compact view */
    889889      if(cwShrinkFolderToCompact(hwndFrame)) {
    890890        /* Mark that we are in compact view. May be removed later when 'Compact'
     
    950950                            1,
    951951                            __ClassObject->
    952                             somGetMethodToken(mySomId))                   
    953         )(this, ulFlags, hwndCnr, fMultiSelect); 
     952                            somGetMethodToken(mySomId))
     953        )(this, ulFlags, hwndCnr, fMultiSelect);
    954954    SOMFree(mySomId);
    955955    return rc & ~( CTXT_TREE | CTXT_ICON);
    956956  }
    957   else 
     957  else
    958958    return CWProgFolder::wpFilterPopupMenu( ulFlags, hwndCnr, fMultiSelect) & ~( CTXT_TREE | CTXT_ICON);
    959959}
     
    970970                              1,
    971971                              __ClassObject->
    972                               somGetMethodToken(mySomId))                 
    973           )(this, ulView,pReserved); 
     972                              somGetMethodToken(mySomId))
     973          )(this, ulView,pReserved);
    974974      SOMFree(mySomId);
    975975    }
    976     else 
     976    else
    977977      rc=CWProgFolder::wpRefresh(ulView, pReserved);
    978978
     
    993993                              1,
    994994                              __ClassObject->
    995                               somGetMethodToken(mySomId))                   
    996           )(this,hwndNotebook); 
     995                              somGetMethodToken(mySomId))
     996          )(this,hwndNotebook);
    997997      SOMFree(mySomId);
    998998    }
    999     else 
     999    else
    10001000      rc=CWProgFolder::wpAddSettingsPages(hwndNotebook);
    1001    
     1001
    10021002    if(!queryResModuleHandle()) {
    10031003      errorResource();
     
    10111011{
    10121012  WPObject *wpObject;
    1013   WPFileSystem *wpFSObject;
    1014   ULONG ulNum;
    1015   ULONG a;
    1016   MRESULT mr;
    1017   SOMClass *mmAudioClass=somhlpQueryMMAudioClass();
    1018   SOMClass *mmMIDIClass=somhlpGetSomClass("MMMIDI");
    1019   SOMClass *cwAudioClass=somhlpGetSomClass("CWAudioShadow");
    1020 
    1021 
    1022   mr=MRFROM2SHORT( DOR_DROP, DO_LINK);
    1023   ulNum=DrgQueryDragitemCount(pDragInfo);/* Num items */
    1024 
    1025   if(pDragInfo->usOperation!=DO_DEFAULT && pDragInfo->usOperation!=DO_LINK)
    1026     //    return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an audio object */
    1027     {
    1028       /* Only CWAudioShadows may be copied or moved */
    1029       for(a=0;a<ulNum && SHORT1FROMMR(mr)!=DOR_NEVERDROP; a++)
    1030         {
    1031           /* Check every object dragged */
    1032           wpObject=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, a)->ulItemID);
    1033           if(!wpObject->somIsA(cwAudioClass))
    1034             {
    1035               return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an audio object */
    1036             }
    1037         }
    1038       return MRFROM2SHORT( DOR_DROP, DO_MOVE);/*  */
    1039       return MRFROM2SHORT( DOR_DROP, pDragInfo->usOperation);/*  */
    1040     }
    1041 
    1042 
    1043   for(a=0;a<ulNum && SHORT1FROMMR(mr)!=DOR_NEVERDROP; a++)
    1044     {
    1045       /* Check every object dragged */
    1046       wpObject=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, a)->ulItemID);
    1047       /* Get the filesystem object in case it's a shadow */
    1048       wpFSObject=(WPFileSystem*)cwGetFileSystemObject(wpObject);
    1049       if(!somIsObj(wpFSObject))
    1050         return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an object */
    1051       if(!wpFSObject->somIsA(cwAudioClass) && !wpFSObject->somIsA(mmAudioClass) && !wpFSObject->somIsA(mmMIDIClass))
    1052         return MRFROM2SHORT( DOR_NEVERDROP, DO_MOVE);/* It's not an audio object */
    1053     }
    1054   /* The following is necessary because for some reason hwndCnr and pDragInfo->hwndSource
    1055      are equal when the dragged object resides in the same folder as the target and the target
    1056      isn't opened yet. Without this check the dragged object would be moved not linked. */
    1057   if(this->wpQueryFolder()==wpObject->wpQueryFolder())
    1058       return MRFROM2SHORT(DOR_DROP,DO_LINK);
    1059   /* Do not create shadows if the source is the current container */
    1060   if(hwndCnr==pDragInfo->hwndSource)
    1061     return MRFROM2SHORT( DOR_DROP, DO_MOVE);
    1062 
    1063   return mr;
     1013  USHORT usIndicator=DOR_DROP,usOp=DO_LINK;
     1014  SOMClass *mmAudioClass = somhlpGetSomClass("MMAudio");
     1015  SOMClass *cdTrackClass = somhlpGetSomClass("MMCDTrack");
     1016
     1017  if (DrgAccessDraginfo(pDragInfo)) {
     1018     ULONG ulNum=DrgQueryDragitemCount(pDragInfo);/* Num items */
     1019     ULONG a=0;
     1020
     1021     for(a=0;a<ulNum; a++)
     1022       {
     1023         PDRAGITEM pDragItem = DrgQueryDragitemPtr(pDragInfo,a);
     1024         if (!DrgVerifyRMF(pDragItem,"DRM_OBJECT","DRF_OBJECT")) {
     1025            usIndicator = DOR_NEVERDROP;
     1026            usOp = 0;
     1027            goto quit;
     1028         } /* endif */
     1029         /* Check every object dragged */
     1030         wpObject=(WPObject*)OBJECT_FROM_PREC(pDragItem->ulItemID);
     1031         if (!somIsObj(wpObject) || !wpObject->somIsA(mmAudioClass) || wpObject->somIsA(cdTrackClass)) {
     1032            usIndicator = DOR_NEVERDROP;
     1033            usOp = 0;
     1034            goto quit;
     1035         } /* endif */
     1036#if 0
     1037         if (somIsObj(wpObject) && this->wpQueryFolder() == wpObject->wpQueryFolder()) {
     1038            usIndicator = DOR_DROP;
     1039            usOp = DO_LINK;
     1040         } /* endif */
     1041#endif
     1042       }
     1043     /* Do not create shadows if the source is the current container */
     1044     if(hwndCnr==pDragInfo->hwndSource) {
     1045        usIndicator = DOR_DROP;
     1046        usOp = DO_MOVE;
     1047     }
     1048
     1049quit:
     1050     DrgFreeDraginfo(pDragInfo);
     1051  } /* endif */
     1052
     1053  return MRFROM2SHORT(usIndicator,usOp);
    10641054}
    10651055
     
    10781068    return;
    10791069  thisPtr=(CWMediaFolder*)threadParams->thisPtr;    //Pointer auf CWMediaFolder-Object
    1080  
     1070
    10811071  if(!somIsObj(thisPtr))
    10821072    return;
    1083  
     1073
    10841074  if(thisPtr->mfData)
    10851075    thisPtr->mfData->bProcessing=TRUE;
    1086  
     1076
    10871077  hab=WinInitialize(0);
    10881078  if(hab) {
     
    10971087      /* Needed for specifying the drop point */
    10981088      POINTL ptl;
    1099       PMINIRECORDCORE pmrc; 
     1089      PMINIRECORDCORE pmrc;
    11001090      CNRINFO cnrInfo;
    11011091      int ID;
     
    11091099        hwndSource=threadParams->hwndSource;
    11101100        ulNumObjects=threadParams->ulNumObjects;
    1111        
     1101
    11121102        if((mySomId=somIdFromString(SHADOW_CLASS_NAME))!=NULLHANDLE) {
    11131103          WPFileSystem *wpFSObject;
     
    11211111              ptl.x=threadParams->ptl.x;
    11221112              ptl.y=threadParams->ptl.y;
    1123              
     1113
    11241114              /* Map to CNR */
    11251115              WinMapWindowPoints(HWND_DESKTOP, hwndCnr,&ptl, 1);
    1126               ptl.y+=10;         
     1116              ptl.y+=10;
    11271117              /* Window below the mouse ptr. We need it to check if we are over the column title area. */
    11281118              ID=WinQueryWindowUShort(WinWindowFromPoint(hwndCnr,&ptl, TRUE),QWS_ID);
    11291119              ptl.y-=10;
    1130              
     1120
    11311121              /* Find the record near the drop point */
    11321122              qRecRcl.cb=sizeof(qRecRcl);
     
    11381128              pmrc=(PMINIRECORDCORE)WinSendMsg(hwndCnr, CM_QUERYRECORDFROMRECT,MPFROMLONG(CMA_FIRST),
    11391129                                               MPFROMP(&qRecRcl));
    1140               WinSendMsg(hwndCnr, CM_QUERYCNRINFO, MPFROMP(&cnrInfo), MPFROMSHORT(sizeof(cnrInfo)));       
     1130              WinSendMsg(hwndCnr, CM_QUERYCNRINFO, MPFROMP(&cnrInfo), MPFROMSHORT(sizeof(cnrInfo)));
    11411131            }/*if(hwndSource!=hwndCnr)*/
    1142            
    1143             /* For all dropped objects */ 
     1132
     1133            /* For all dropped objects */
    11441134            for(ulCount=0; ulCount<ulNumObjects; ulCount++) {
    11451135              if(ulCount%10)/* Redraw window every 10 objects */
     
    11471137              else
    11481138                WinEnableWindowUpdate(hwndCnr, TRUE);
    1149              
     1139
    11501140              wpObject=(WPObject*) threadParams->wpObject[ulCount];
    11511141              /* Get the filesystem object in case it's a shadow */
     
    11611151                      /* Detailsview */
    11621152                      RECORDINSERT recInsert;
    1163                      
     1153
    11641154                      recInsert.cb=sizeof(recInsert);
    11651155                      recInsert.pRecordParent=NULL;
     
    11671157                      recInsert.zOrder=CMA_TOP;
    11681158                      recInsert.cRecordsInsert=1;
    1169                      
     1159
    11701160                      //     WinEnableWindowUpdate(hwndCnr, FALSE);
    11711161                      /* Create the shadow */
     
    12121202                            __FUNCTION__, __FILE__, __LINE__);
    12131203        } END_CATCH;
    1214        
     1204
    12151205        WinDestroyMsgQueue(hmq);
    12161206    }
     
    12191209  if(thisPtr->mfData)
    12201210    thisPtr->mfData->bProcessing=FALSE;
    1221  
     1211
    12221212  thisPtr->wpFreeMem((PBYTE)threadParams);
    12231213}
     
    12271217MRESULT CWMediaFolder::wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem)
    12281218{
    1229   WPObject *wpObject;
    1230   somId mySomId;
    1231   M_WPObject *mAudioObject;
    1232   SOMClass*  scCWShadowClass;
    1233   ULONG ulCount;
    1234   ULONG ulNumObjects=DrgQueryDragitemCount(pDragInfo);
    1235 
    1236   /* Needed for specifying the drop point */
    1237   POINTL ptl;
    1238   PMINIRECORDCORE pmrc;
    1239   CNRINFO cnrInfo;
    1240   int ID;
    1241  
    1242   /* The objects are already checked by the wpDragOver() method. */
    1243   TRY_LOUD(MEDIAFLDR_DROP) {
    1244     PDROPTHREADPARAMS pThreadParams;
    1245     ULONG ulErr;
    1246     WPObject* wpObj;
    1247    
    1248     /* DROPTHREADPARAMS already contains one WPObject var so only memory for ulNumObjects-1 must be added to the end */
    1249     pThreadParams=(PDROPTHREADPARAMS)wpAllocMem(sizeof(DROPTHREADPARAMS)+(ulNumObjects-1)*sizeof(WPObject*), &ulErr);
    1250     pThreadParams->hwndCnr=hwndCnr;
    1251     pThreadParams->hwndSource=pDragInfo->hwndSource;
    1252     pThreadParams->ulNumObjects=DrgQueryDragitemCount(pDragInfo);
    1253     pThreadParams->thisPtr=this;
    1254     pThreadParams->ptl.x=pDragInfo->xDrop;
    1255     pThreadParams->ptl.y=pDragInfo->yDrop;
    1256              
    1257     /* For all dropped objects */
    1258     for(ulCount=0;ulCount<ulNumObjects ; ulCount++) {
    1259       pThreadParams->wpObject[ulCount]=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, ulCount)->ulItemID);
    1260     }
    1261     _beginthread(dropThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
     1219  if (DrgAccessDraginfo(pDragInfo)) {
     1220    /* The objects are already checked by the wpDragOver() method. */
     1221    TRY_LOUD(MEDIAFLDR_DROP) {
     1222       PDROPTHREADPARAMS pThreadParams;
     1223       ULONG ulErr;
     1224       ULONG ulCount;
     1225       ULONG ulNumObjects=DrgQueryDragitemCount(pDragInfo);
     1226
     1227       /* DROPTHREADPARAMS already contains one WPObject var so only memory for ulNumObjects-1 must be added to the end */
     1228       pThreadParams=(PDROPTHREADPARAMS)wpAllocMem(sizeof(DROPTHREADPARAMS)+(ulNumObjects-1)*sizeof(WPObject*), &ulErr);
     1229       pThreadParams->hwndCnr=hwndCnr;
     1230       pThreadParams->hwndSource=pDragInfo->hwndSource;
     1231       pThreadParams->ulNumObjects=ulNumObjects;
     1232       pThreadParams->thisPtr=this;
     1233       pThreadParams->ptl.x=pDragInfo->xDrop;
     1234       pThreadParams->ptl.y=pDragInfo->yDrop;
     1235
     1236       /* For all dropped objects */
     1237       for(ulCount=0;ulCount<ulNumObjects ; ulCount++) {
     1238         pThreadParams->wpObject[ulCount]=(WPObject*)OBJECT_FROM_PREC(DrgQueryDragitemPtr( pDragInfo, ulCount)->ulItemID);
     1239       }
     1240       _beginthread(dropThreadFunc,NULL,8192*16,(void*)pThreadParams); //Fehlerbehandlung fehlt
     1241    }
     1242    CATCH(MEDIAFLDR_DROP)
     1243    {
     1244       SysWriteToTrapLog("\nTrap occured in %s, file: %s, around line %d.\n",
     1245                         __FUNCTION__, __FILE__, __LINE__);
     1246    } END_CATCH;
     1247    DrgFreeDraginfo(pDragInfo);
    12621248  }
    1263   CATCH(MEDIAFLDR_DROP)
    1264     {
    1265       SysWriteToTrapLog("\nTrap occured in %s, file: %s, around line %d.\n",
    1266                         __FUNCTION__, __FILE__, __LINE__);
    1267     } END_CATCH;
    1268    
    1269   DrgFreeDraginfo(pDragInfo);
    1270   return (MRESULT)RC_DROP_DROPCOMPLETE;
     1249  return MRFROMLONG(RC_DROP_DROPCOMPLETE);
    12711250}
    12721251
     
    13681347    /* Start a timer which will cause the folder to close automatically after some time even
    13691348       if the user doesn't click any button. Get the timeout from the INI file if available. */
    1370     if((lDelay=PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", MFLDR_TIMER_DELAY_KEY, MFLDR_MBOX_TIMER_DELAY)) 
     1349    if((lDelay=PrfQueryProfileInt(HINI_USERPROFILE, "CWMM", MFLDR_TIMER_DELAY_KEY, MFLDR_MBOX_TIMER_DELAY))
    13711350       < MFLDR_MBOX_MIN_TIMER_DELAY)
    13721351      lDelay=MFLDR_MBOX_MIN_TIMER_DELAY;
     
    13831362    }
    13841363  }
    1385   cwStopAudioFile(hwndFrame); 
     1364  cwStopAudioFile(hwndFrame);
    13861365  /* Stop the playing thread */
    13871366  WinPostMsg(mfData->hwndPlayObject, WM_QUIT, 0, 0);
  • trunk/mediafolder/include/m3ufolder.hh

    r51 r133  
    2828  HWND hwndFrame;
    2929  BOOL fSaveOnly;
    30 }M3UTHREADPARMS; 
     30}M3UTHREADPARMS;
    3131
    3232#pragma SOMAsDefault(on)
     
    4848  virtual BOOL wpclsQueryDefaultHelp(PULONG HelpPanelId,PSZ HelpLibrary);
    4949  virtual BOOL wpclsCreateDefaultTemplates(WPObject * wpObject);
    50   /* 
     50  /*
    5151  virtual void wpclsUnInitData();
    5252
     
    7676  virtual ULONG wpFilterPopupMenu(ULONG ulFlags, HWND hwndCnr, BOOL fMultiSelect);
    7777  virtual BOOL wpModifyPopupMenu(HWND hwndMenu, HWND hwndCnr, ULONG ulPosition);
    78   virtual MRESULT wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem); 
    7978#if 0
    8079  virtual BOOL wpRestoreState(ULONG ulReserved);
  • trunk/mediafolder/include/mediafolder.hh

    r4 r133  
    8484  USEITEM useItem;
    8585  VIEWITEM viewItem;
    86 }MYVIEWITEM; 
     86}MYVIEWITEM;
    8787
    8888typedef struct
     
    115115  WPObject* thisPtr;
    116116  char chrRexxScript[CCHMAXPATH];
    117 }INSERTTRACKPARMS; 
     117}INSERTTRACKPARMS;
    118118
    119119typedef  struct _MEDIAFLDRDATA
     
    129129  int iNumPlayed;     /* # of random played tracks */
    130130  int iNumToPlay;
    131   HWND hwndPlayObject;/* Object window which handles the play commands so the WPS is not blocked. */ 
     131  HWND hwndPlayObject;/* Object window which handles the play commands so the WPS is not blocked. */
    132132}MEDIAFLDRDATA;
    133133typedef   MEDIAFLDRDATA*   PMEDIAFLDRDATA;
     
    203203#pragma SOMCallstyle(oidl)
    204204private:
    205   /* 
     205  /*
    206206     Added with V0.2.8 (07.09.2003)
    207207
     
    209209
    210210     Tells the folder:
    211      MFLDR_CURACTION_ADDFOLDERVIEW3: currently processing the wpAddFolderView3Page() 
     211     MFLDR_CURACTION_ADDFOLDERVIEW3: currently processing the wpAddFolderView3Page()
    212212     MFLDR_VIEW_COMPACT:             folder is in compact view
    213213
     
    222222  WPObject* currentObject; /* Currently playing object */
    223223  PMINIRECORDCORE mrcPlaying;
    224   MYVIEWITEM myViewItem; 
     224  MYVIEWITEM myViewItem;
    225225
    226226  HWND hwndTopMiddle;/* */
     
    262262  virtual BOOL    wpSaveState();
    263263  virtual MRESULT wpDragOver(HWND hwndCnr,PDRAGINFO pDragInfo);
    264   virtual MRESULT wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem); 
     264  virtual MRESULT wpDrop(HWND hwndCnr,PDRAGINFO pDragInfo,PDRAGITEM pDragItem);
    265265  virtual BOOL    wpAddSettingsPages(HWND hwndNotebook);
    266266  virtual ULONG   wpInsertSettingsPage(HWND hwndNotebook, PPAGEINFO ppageinfo);
  • trunk/mediafolder/makefile

    r104 r133  
    1212
    1313CMNINC  =       $(COMMONSRC)/include
     14CLSINC    =   $(COMMONSRC)/../classes/include
    1415
    1516HELPERDIR       =       ./c/helper
     
    2526#
    2627#######################################
    27 COMPILE =       $(CC) $(CPPFLAGS) /C+ -I$(INC) -I$(CMNINC) /Fo$@ $<
     28COMPILE =       $(CC) $(CPPFLAGS) /C+ -I$(INC) -I$(CMNINC) -I$(CLSINC) /Fo$@ $<
    2829
    2930#######################################
     
    163164#######################################
    164165$(INC)/cwaudio.hh: ../classes/idl/idl_audio/cwaudio.idl
    165         sc -shh -S 64000  -I $(IDLDIR)/idl_mm  -dinclude -m noqualifytypes $<
     166        sc -shh -S 100000  -I $(IDLDIR)/idl_mm  -dinclude -m noqualifytypes -musexhpass $<
    166167
    167168$(INC)/cwcdtrack.hh: ../classes/idl/idl_audio/cwcdtrack.idl
    168         sc -shh -S 64000  -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -dinclude -m noqualifytypes $<
     169        sc -shh -S 100000  -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -dinclude -m noqualifytypes -musexhpass $<
    169170
    170171$(INC)/cwmmdataf.hh:    ../classes/idl/idl_mm/cwmmdataf.idl
    171         sc -shh -S 64000  -I $(IDLDIR)/idl_mm -dinclude -m noqualifytypes $<
     172        sc -shh -S 100000  -I $(IDLDIR)/idl_mm -dinclude -m noqualifytypes -musexhpass $<
    172173
    173174
  • trunk/mediafolder/res/makefile

    r104 r133  
    5656clean:
    5757        -cd $(OBJDIR) && rm *
    58         -rm *.res
     58        -rm *.RES
    5959
    6060cleaner:
  • trunk/nlv/de/classes/res/makefile

    r4 r133  
    3535        -rm *.*~
    3636        -rm *.flc
    37         -rm *.res
     37        -rm *.RES
    3838        -rm *.obj
  • trunk/stream_ioproc/source/makefile

    r4 r133  
    9797        -rm *.obj
    9898        -rm *.dll
    99         -rm *.res
     99        -rm *.RES
    100100        -rm *.*~
    101101        -rm *.map
Note: See TracChangeset for help on using the changeset viewer.