Changeset 104 for trunk/classes
- Timestamp:
- Oct 2, 2023, 11:34:35 PM (23 months ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 41 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/v2.9 merged eligible /branches/v2.9_Lars merged eligible
-
Property svn:mergeinfo
set to
-
trunk/classes/c/c_audio/cwaudio.c
r93 r104 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 1 8 2 9 /* … … 664 671 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype: 665 672 */ 673 674 /* 675 * SOM_Scope BOOL SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 676 * char* chrString, 677 * ULONG ulValue, 678 * int iWhich) 679 */ 680 681 /* 682 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype: 683 */ 666 684 SOM_Scope BOOL SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 667 685 char* chrString, 668 686 ULONG ulValue, 669 intiWhich)687 ULONG iWhich) 670 688 { 671 689 ULONG ulError; … … 939 957 /* successful completion. */ 940 958 /*!!******************************************************/ 959 960 /* 961 * SOM_Scope ULONG SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 962 * PSZ chrString, 963 * ULONG ulSize, 964 * int iWhich) 965 */ 966 967 /* 968 * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype: 969 */ 941 970 SOM_Scope ULONG SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 942 971 PSZ chrString, 943 972 ULONG ulSize, 944 intiWhich)973 ULONG iWhich) 945 974 { 946 975 MMAudioData *somThis = MMAudioGetData(somSelf); -
trunk/classes/c/c_audio/cwcdtrack.c
r2 r104 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 1 8 2 9 /* … … 207 214 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpFilterPopupMenu"); 208 215 209 return CTXT_SETTINGS | CTXT_HELP ;216 return CTXT_SETTINGS | CTXT_HELP | CTXT_DELETE; 210 217 211 218 /* We don't want to have XFolder or WPS-Wizard menus here. These are useless … … 281 288 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype: 282 289 */ 290 291 /* 292 * SOM_Scope ULONG SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf, 293 * PSZ chrString, 294 * ULONG ulSize, 295 * int iWhich) 296 */ 297 298 /* 299 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype: 300 */ 283 301 SOM_Scope ULONG SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf, 284 302 PSZ chrString, 285 303 ULONG ulSize, 286 intiWhich)304 ULONG iWhich) 287 305 { 288 306 MMCDTrackData *somThis = MMCDTrackGetData(somSelf); -
trunk/classes/c/c_audio/cwmp3.c
r72 r104 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 8 1 9 /* 2 10 * (C) Chris Wohlgemuth 2002-2004 … … 853 861 * cwmmAddTrackNamePage : override; 854 862 */ 863 864 /* 865 * SOM_Scope ULONG SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 866 * PSZ chrString, 867 * ULONG ulSize, 868 * int iWhich) 869 */ 870 871 /* 872 * The prototype for cwmp3_cwmmQueryTrackInfo was replaced by the following prototype: 873 */ 855 874 SOM_Scope ULONG SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 856 875 PSZ chrString, 857 876 ULONG ulSize, 858 intiWhich)877 ULONG iWhich) 859 878 { 860 879 somId id; -
trunk/classes/c/c_audio/cwogg.c
r2 r104 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 8 1 9 /* 2 10 * (C) Chris Wohlgemuth 2002-2004 … … 88 96 * The prototype for cwogg_cwmmQueryTrackInfo was replaced by the following prototype: 89 97 */ 98 99 /* 100 * SOM_Scope ULONG SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf, 101 * PSZ chrString, 102 * ULONG ulSize, 103 * int iWhich) 104 */ 105 106 /* 107 * The prototype for cwogg_cwmmQueryTrackInfo was replaced by the following prototype: 108 */ 90 109 SOM_Scope ULONG SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf, 91 110 PSZ chrString, 92 111 ULONG ulSize, 93 intiWhich)112 ULONG iWhich) 94 113 { 95 114 /* MMOGGData *somThis = MMOGGGetData(somSelf); */ -
trunk/classes/c/c_common/except.c
r41 r104 130 130 USHORT SS; 131 131 } DbgBuf; 132 /*-------------------------------------*/ 133 APIRET APIENTRY DOSQUERYMODFROMEIP( HMODULE *phMod, 134 ULONG *pObjNum, 135 ULONG BuffLen, 136 PCHAR pBuff, 137 ULONG *pOffset, 138 PVOID Address ); 139 /*APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod, 140 ULONG *pObjNum, 141 ULONG BuffLen, 142 PCHAR pBuff, 143 ULONG *pOffset, 144 PVOID Address );*/ 145 146 /*-------------------------------------*/ 132 147 133 /* CW 148 134 #define DBG_O_OBJMTE 0x10000000L*/ … … 459 445 460 446 return 'c'; 461 } 447 } 462 448 463 449 ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec, … … 515 501 { 516 502 ULONG rc = XCPT_CONTINUE_SEARCH; 517 503 518 504 if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND) 519 505 return (XCPT_CONTINUE_SEARCH); … … 522 508 if (pERepRec->fHandlerFlags & EH_NESTED_CALL) 523 509 return (XCPT_CONTINUE_SEARCH); 524 510 525 511 if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION) 526 512 { … … 655 641 } 656 642 #endif 657 643 658 644 fAlreadyTrapped = TRUE; 659 645 /* end John Currier's recursion prevention */ … … 663 649 (Version[0]>=20) && 664 650 (Version[1]>=10) ) { 665 /* version must be over 2.1 for D OSQUERYMODFROMEIP */651 /* version must be over 2.1 for DosQueryModFromEIP */ 666 652 fprintf(hTrap,"OS/2 Version %d.%d\n",Version[0]/10,Version[1]); 667 rc=D OSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,653 rc=DosQueryModFromEIP( &hMod, &ObjNum, CCHMAXPATH, 668 654 Name, &Offset, pERepRec->ExceptionAddress); 669 655 if (rc==0) { … … 814 800 if ((AllocationFlags&PAG_EXECUTE)&& 815 801 (AllocationFlags&PAG_BASE)) { 816 rc=D OSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,802 rc=DosQueryModFromEIP( &hMod, &ObjNum, CCHMAXPATH, 817 803 Name, &Offset, BaseAddress); 818 804 if (rc==0) { … … 1038 1024 break; /* avoid infinite loops */ 1039 1025 } else { 1040 rc = D OSQUERYMODFROMEIP(&hMod, &ObjNum, sizeof(Name),1026 rc = DosQueryModFromEIP(&hMod, &ObjNum, sizeof(Name), 1041 1027 Name, &Offset, (PVOID)RetAddr); 1042 1028 if (rc == NO_ERROR && ObjNum != -1) … … 1181 1167 } 1182 1168 1183 #include <exe.h>1184 1169 #include <newexe.h> 1185 1170 #define FOR_EXEHDR 1 /* avoid define conflicts between newexe.h and exe386.h */ … … 1835 1820 do { 1836 1821 read(fh,(void *)&FirstLine,sizeof(FirstLine)); 1837 1822 1838 1823 if (FirstLine.LineNum!=0) { 1839 1824 fprintf(hTrap,"Missing Line table information\n"); … … 1864 1849 } 1865 1850 break; 1866 1851 1867 1852 case 1: 1868 1853 lseek(fh, sizeof(struct linlist_rec), SEEK_CUR); 1869 1854 break; 1870 1855 1871 1856 case 2: 1872 1857 lseek(fh, sizeof(struct linsourcelist_rec), SEEK_CUR); 1873 1858 break; 1874 1859 1875 1860 case 3: 1876 1861 lseek(fh, sizeof(struct filenam_rec), SEEK_CUR); 1877 1862 break; 1878 1863 1879 1864 case 4: 1880 1865 lseek(fh, sizeof(struct pathtab_rec), SEEK_CUR); 1881 1866 break; 1882 1867 1883 1868 } 1884 1869 } -
trunk/classes/c/c_common/helper.c
r57 r104 19 19 /* 20 20 * If you need another license for your prject/product contact me at 21 * 21 * 22 22 * http://www.os2world.com/cdwriting 23 23 * http://www.geocities.com/SiliconValley/Sector/5785/ 24 24 */ 25 #define INCL_BASE 25 26 #define INCL_WIN 26 27 #define INCL_DOS … … 41 42 42 43 #ifndef BS_NOTEBOOKBUTTON 43 #define BS_NOTEBOOKBUTTON 8L /* Warp 4 notebook style */ 44 #define BS_NOTEBOOKBUTTON 8L /* Warp 4 notebook style */ 44 45 #endif 45 46 … … 66 67 67 68 68 memset(&pDetails, 0, sizeof(pDetails)); 69 memset(&pDetails, 0, sizeof(pDetails)); 69 70 pDetails.Length = sizeof(PROGDETAILS); 70 71 pDetails.progt.progc = PROG_DEFAULT; … … 81 82 } 82 83 pDetails.pszExecutable = wrapperExe; 83 84 84 85 pDetails.pszEnvironment = NULLHANDLE; 85 86 pDetails.swpInitial.fl = SWP_ACTIVATE|SWP_ZORDER; /* window positioning */ … … 92 93 // pDetails.swpInitial.ulReserved1 = 0; 93 94 // pDetails.swpInitial.ulReserved2 = 0; 94 95 95 96 /* Create an object window which will process the WM_APPTERMINATE message. While processing of this 96 97 message the view item (see below) will be removed from the inuse list thus removing the inuse emphasis. */ … … 150 151 if(!hModule) 151 152 { 152 153 153 154 if(queryModuleHandle()) 154 155 { … … 170 171 if(NO_ERROR!=DosScanEnv("LANG", &pszLang)) 171 172 break; 172 173 173 174 /* Skip leading spaces */ 174 175 chrPtr=pszLang; 175 176 while(*chrPtr==' ') 176 177 chrPtr++; 177 178 178 179 /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */ 179 180 if(strlen(chrPtr)<5) 180 181 break; 181 182 /* Extract the first two chars */ 182 183 /* Extract the first two chars */ 183 184 sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]); 184 185 strcat(resDLLPath,buf); … … 187 188 // HlpWriteToTrapLog(resDLLPath); 188 189 // HlpWriteToTrapLog("\n"); 189 190 190 191 rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule); 191 192 if(rc==NO_ERROR) 192 193 break; 193 194 194 195 /* Insert message in Logfile */ 195 196 // writeLog("Ressource-DLL for the current countrycode not found. Trying to load default one (CDFLD001.DLL).\n"); 196 197 197 198 /* NLS DLL not found. Try to load default */ 198 199 found=strrchr(resDLLPath,'\\'); 199 200 if(!found) 200 201 break; 201 202 202 203 *found=0; 203 204 … … 206 207 // HlpWriteToTrapLog(resDLLPath); 207 208 // HlpWriteToTrapLog("\n"); 208 209 209 210 rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule); 210 211 if(rc!=NO_ERROR) { … … 215 216 //writeLog("Ressource DLL loaded.\n"); 216 217 } 217 218 218 219 break; 219 220 }while(TRUE); … … 223 224 } 224 225 225 /*APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod,226 ULONG *pObjNum,227 ULONG BuffLen,228 PCHAR pBuff,229 ULONG *pOffset,230 PVOID Address );*/231 232 226 /* Get the HMODULE of the MM class DLL */ 233 227 HMODULE queryModuleHandle(void) … … 242 236 ULONG ulObj, ulBufLen, ulOffset; 243 237 char thePath[CCHMAXPATH]; 244 238 245 239 if(DosQueryModFromEIP( &hModule, 246 240 &ulObj, … … 248 242 thePath, 249 243 &ulOffset, 250 ( PVOID)queryModuleHandle )!=NO_ERROR) {244 (ULONG)queryModuleHandle )!=NO_ERROR) { 251 245 SysWriteToTrapLog("Can't get module handle for CWMM class DLL!\n"); 252 246 hModule=0; … … 291 285 strncpy(classDLLPath,moduleName, sizeof(classDLLPath)); 292 286 classDLLPath[sizeof(classDLLPath)-1]=0; 293 287 294 288 /* Get install dir */ 295 289 strncpy(chrInstallDir,moduleName, sizeof(chrInstallDir)); … … 303 297 strncpy(classDLLPath,chrInstallDir, sizeof(classDLLPath)); 304 298 classDLLPath[sizeof(classDLLPath)-1]=0; 305 299 306 300 /* Get install dir */ 307 301 if((chrPtr=strrchr(chrInstallDir,'\\'))!=NULLHANDLE) … … 352 346 HENUM henum; 353 347 HWND hwnd; 354 348 355 349 /* Move the default notebook buttons */ 356 350 if((henum=WinBeginEnumWindows(hwndDlg))!=NULLHANDLE) { … … 396 390 { 397 391 snprintf(setup, sizeof(setup), "LOCATOR=%s;%s", chrUrl, "OPEN=DEFAULT"); 398 WinCreateObject("WPUrl","tempUrl", setup, tempDir, 392 WinCreateObject("WPUrl","tempUrl", setup, tempDir, 399 393 CO_UPDATEIFEXISTS); 400 394 /* WinDestroyObject(hObject); Don't use it, blocks PM */ … … 402 396 } 403 397 404 /* This function checks if the given file exists */ 398 /* This function checks if the given file exists */ 405 399 ULONG checkFileSize(char* chrFileName) 406 400 { … … 410 404 if(stat(chrFileName , &statBuf)==-1) 411 405 return 0; 412 406 413 407 return statBuf.st_size; 414 408 } -
trunk/classes/c/c_mm/mmfolder.c
r71 r104 17 17 * along with this program; see the file COPYING. If not, write to 18 18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 19 */ 20 20 /* 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 28 28 /* 29 29 * This file was generated by the SOM Compiler and Emitter Framework. 30 * Generated using: 30 * Generated using: 31 31 * SOM Emitter emitctm: 2.42 32 32 */ … … 77 77 somId mySomId; 78 78 static SOMClass * mWPFolderClass=NULLHANDLE; 79 79 80 80 if(!mWPFolderClass) { 81 81 if((mySomId=somIdFromString("WPFolder"))!=NULLHANDLE) { … … 107 107 somId mySomId; 108 108 static SOMClass *mWPImgClass=NULL; 109 109 110 110 if(!mWPImgClass) { 111 111 if((mySomId=somIdFromString("MMBitmap"))!=NULLHANDLE) { … … 117 117 } 118 118 119 MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 119 MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 120 120 { 121 121 HWND hwndStore; … … 136 136 137 137 if(pCnrInfo) { 138 // writeLog("flWindowAttr: 0x%x, Mask: 0x%x, cxTreeIndent: %d, cyLineSpacing: %d\n", 138 // writeLog("flWindowAttr: 0x%x, Mask: 0x%x, cxTreeIndent: %d, cyLineSpacing: %d\n", 139 139 // pCnrInfo->flWindowAttr, LONGFROMMP(mp2), pCnrInfo->cxTreeIndent, pCnrInfo->cyLineSpacing); 140 140 … … 147 147 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 148 148 if(somIsObj(somSelf)) { 149 MMFolderData *somThis = MMFolderGetData(somSelf); 150 149 MMFolderData *somThis = MMFolderGetData(somSelf); 150 151 151 pCnrInfo->flWindowAttr&=~CA_DRAWICON; 152 152 pCnrInfo->flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW; 153 153 pCnrInfo->slBitmapOrIcon.cx=_ulCurrentSize; 154 154 pCnrInfo->slBitmapOrIcon.cy=_ulCurrentSize; 155 155 156 156 mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON|CMA_FLWINDOWATTR); 157 157 } … … 183 183 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 184 184 if(somIsObj(somSelf)) { 185 MMFolderData *somThis = MMFolderGetData(somSelf); 185 MMFolderData *somThis = MMFolderGetData(somSelf); 186 186 if(_oldContainerProc) 187 187 return _oldContainerProc(hwnd, msg, mp1, mp2); 188 188 } 189 189 } 190 } 190 } 191 191 return WinDefWindowProc(hwnd, msg, mp1, mp2); 192 192 } … … 239 239 HPOINTER hptrTemplate; 240 240 HMODULE hmodTemplate; 241 241 242 242 if(!DosQueryModuleHandle("PMWP",&hmodTemplate)) 243 243 { 244 244 ULONG ulIconSize; 245 245 246 246 hptrTemplate=WinLoadPointer(HWND_DESKTOP, hmodTemplate, 20); 247 247 WinDrawPointer(hps, rcl->xLeft, rcl->yBottom, hptrTemplate, (flCnr & CV_MINI ? DP_MINI:DP_NORMAL)); … … 255 255 return DP_MINI; 256 256 } 257 257 258 258 return DP_NORMAL; 259 259 } 260 260 261 261 262 MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 262 MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 263 263 { 264 264 HWND hwndStore; … … 273 273 { 274 274 POWNERITEM pOwnerItem=(POWNERITEM)PVOIDFROMMP(mp2); 275 275 276 276 277 277 /* We only draw icons not text */ … … 299 299 POINTL pointl; 300 300 301 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 301 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 302 302 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2); 303 303 pointl.x = rclTemp.xLeft; … … 307 307 pointl.y = rclTemp.yTop - 1; 308 308 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 309 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 310 309 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 310 311 311 } 312 312 /* Check if record is in use */ … … 314 314 POINTL pointl; 315 315 316 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 316 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 317 317 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1); 318 318 pointl.x = rclTemp.xLeft; … … 322 322 pointl.y = rclTemp.yTop - 1; 323 323 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 324 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 324 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 325 325 } 326 326 /* or is it only selected? */ … … 330 330 else 331 331 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 332 /* Emphasis drawn */ 332 /* Emphasis drawn */ 333 333 334 334 /********************************************/ … … 340 340 WPObject *wpObject; 341 341 ULONG ulIconSize=150;/* Default if query fails */ 342 342 343 343 wpObject=(WPObject*)OBJECT_FROM_PREC(mrc); // Get object 344 344 wpObject=somGetFileSystemObject(wpObject); // Get Filesystem object … … 356 356 SysWriteToTrapLog("Object is an image. (%s line: %d)\n", __FUNCTION__, __LINE__); 357 357 #endif 358 /* Get object pointer of lighttable folder */ 358 /* Get object pointer of lighttable folder */ 359 359 if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE) 360 360 { 361 361 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 362 362 if(somIsObj(somSelf)) { 363 MMFolderData *somThis = MMFolderGetData(somSelf); 363 MMFolderData *somThis = MMFolderGetData(somSelf); 364 364 ulIconSize=_ulCurrentSize; 365 365 } … … 423 423 /* And now draw the bitmap */ 424 424 #if 0 425 if(pBmpInfoHeader2->cclrUsed==2) { 425 if(pBmpInfoHeader2->cclrUsed==2) { 426 426 WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem, 427 427 CLR_WHITE, CLR_BLACK, DBM_STRETCH /*| DBM_IMAGEATTRS*/); … … 437 437 /* Done */ 438 438 if(_somIsA(wpObject, cwImageClass)) { 439 440 441 442 MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject);439 MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject); 440 } 441 else { 442 MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject); 443 443 } 444 444 return (MRESULT) TRUE; … … 474 474 { 475 475 SOMClass* wpFolderClass=queryWpFolderClass(); 476 476 477 477 if(somIsObj(wpFolderClass)) { 478 if(_somIsA(wpObject, wpFolderClass)) { 478 if(_somIsA(wpObject, wpFolderClass)) { 479 479 /* It's a folder */ 480 480 HPOINTER hptr; 481 481 482 482 pOwnerItem->rclItem.xLeft=rcl.xLeft; 483 483 pOwnerItem->rclItem.yBottom=rcl.yBottom; 484 484 485 485 /* The following is only for Warp 4 but Warp 3 isn't supported anyway...*/ 486 486 hptr=_wpQueryIconN(wpObject,1); … … 489 489 return (MRESULT) TRUE; 490 490 } 491 491 492 492 } 493 493 }/* if(somIsObj(wpFolderClass)) */ 494 494 }/* if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) */ 495 495 496 496 if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, mrc->hptrIcon, ulMiniOrNormal)) { 497 497 cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY); … … 508 508 /*************************/ 509 509 PCNRDRAWITEMINFO pCnrDrawItemInfo=(PCNRDRAWITEMINFO)pOwnerItem->hItem; 510 510 511 511 if(pCnrDrawItemInfo && pCnrDrawItemInfo->pFieldInfo->flData & CFA_BITMAPORICON) { 512 512 PMINIRECORDCORE mrc=(PMINIRECORDCORE)((PCNRDRAWITEMINFO)pOwnerItem->hItem)->pRecord; … … 517 517 HWND hwndCnr=WinWindowFromID(hwnd, FID_CLIENT); 518 518 RECTL rclTemp=pOwnerItem->rclItem; 519 519 520 520 wpObjToRefresh=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object 521 521 wpObject=somGetFileSystemObject(wpObjToRefresh); 522 522 523 523 /* Draw Background */ 524 524 rclTemp.xLeft+=2; … … 526 526 rclTemp.yBottom+=2; 527 527 rclTemp.yTop-=2; 528 528 529 529 /* Check if record is selected and in use... */ 530 530 if((pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) 531 531 && (pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)) { 532 532 POINTL pointl; 533 533 534 534 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2); 535 535 pointl.x = rclTemp.xLeft; … … 539 539 pointl.y = rclTemp.yTop - 1; 540 540 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 541 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 542 541 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 542 543 543 } 544 544 /* or only in use... */ 545 545 else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) { 546 546 POINTL pointl; 547 547 548 548 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1); 549 549 pointl.x = rclTemp.xLeft; … … 553 553 pointl.y = rclTemp.yTop - 1; 554 554 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 555 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 555 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 556 556 } 557 557 /* or only selected. */ … … 564 564 SOMClass* cwBitmapClass=queryCWBitmapFileClass(); 565 565 SOMClass* cwImageClass=queryCWImageFileClass(); 566 566 567 567 if(somIsObj(cwImageClass)||somIsObj(cwBitmapClass)) { 568 568 HBITMAP hbm=NULLHANDLE; 569 569 PBITMAPINFOHEADER2 pBmpInfoHeader2; 570 570 571 571 /* Query object pointer */ 572 572 if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE) … … 574 574 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 575 575 if(somIsObj(somSelf)) { 576 MMFolderData *somThis = MMFolderGetData(somSelf); 576 MMFolderData *somThis = MMFolderGetData(somSelf); 577 577 ulIconSize=_ulCurrentSize; 578 578 } 579 579 } 580 /* Get the small bitmap from the object */ 580 /* Get the small bitmap from the object */ 581 581 if(_somIsA(wpObject, cwImageClass)) { 582 582 hbm=MMImage_cwmmQuerySmallBitmapHandle( (MMImage*) wpObject, ulIconSize, mrc, hwndCnr); … … 636 636 } 637 637 if(_somIsA(wpObject, cwImageClass)) { 638 639 640 641 642 }638 MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject); 639 } 640 else { 641 MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject); 642 } 643 643 return (MRESULT) TRUE; 644 644 }/* hbm */ … … 684 684 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 685 685 if(somIsObj(somSelf)) { 686 MMFolderData *somThis = MMFolderGetData(somSelf); 686 MMFolderData *somThis = MMFolderGetData(somSelf); 687 687 switch(_usLastSelMenuItem) 688 688 { … … 701 701 /* insert separator */ 702 702 menuInsertMenuSeparator( HWNDFROMMP(mp2), NULLHANDLE, MIT_END); 703 703 704 704 /* Load the menu from the resource */ 705 705 hwndMenu=WinLoadMenu(hwnd,queryResModuleHandle(), ID_MENUICONSIZE); 706 706 707 707 /* Fill the MENUITEM structure */ 708 708 mi.iPosition=MIT_END; 709 709 mi.afStyle=MIS_TEXT|MIS_SUBMENU; 710 710 mi.id=ID_MENUICONSIZE; 711 mi.afAttribute=NULLHANDLE; 711 mi.afAttribute=NULLHANDLE; 712 712 mi.hwndSubMenu=hwndMenu; 713 713 mi.hItem=NULLHANDLE; … … 715 715 strcpy(text, "Icon ~size");; 716 716 menuInsertMenuItem(HWNDFROMMP(mp2), hwndMenu, MIT_END, ID_MENUICONSIZE, text); 717 717 718 718 /* check current menuitem */ 719 719 switch(_ulCurrentSize) … … 738 738 break; 739 739 default: 740 break; 740 break; 741 741 } 742 742 } … … 755 755 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 756 756 if(somIsObj(somSelf)) { 757 MMFolderData *somThis = MMFolderGetData(somSelf); 757 MMFolderData *somThis = MMFolderGetData(somSelf); 758 758 _usLastSelMenuItem=SHORT1FROMMP(mp1); 759 759 } … … 768 768 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 769 769 if(somIsObj(somSelf)) { 770 MMFolderData *somThis = MMFolderGetData(somSelf); 770 MMFolderData *somThis = MMFolderGetData(somSelf); 771 771 if(_oldFrameProc) 772 772 return _oldFrameProc(hwnd, msg, mp1, mp2); 773 773 } 774 774 } 775 775 776 776 return WinDefWindowProc(hwnd, msg, mp1, mp2); 777 777 } … … 781 781 */ 782 782 783 SOM_Scope HWND SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr, 783 SOM_Scope HWND SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr, 784 784 ULONG ulView, ULONG param) 785 785 { 786 786 HWND hwnd; 787 787 788 MMFolderData *somThis = MMFolderGetData(somSelf); 788 MMFolderData *somThis = MMFolderGetData(somSelf); 789 789 MMFolderMethodDebug("MMFolder","mmfldr_wpOpen"); 790 790 791 hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr, 791 hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr, 792 792 ulView, param)); 793 793 794 794 /* Only subclass folder frames, not settings notebooks */ 795 if(ulView!=OPEN_SETTINGS){ 795 if(ulView!=OPEN_SETTINGS){ 796 796 HWND hwndStore; 797 797 … … 799 799 hwnd, HWND_BOTTOM, STOREWINDOWID, NULLHANDLE, NULLHANDLE))!=NULLHANDLE) 800 800 { 801 HWND hwndContainer; 801 HWND hwndContainer; 802 802 803 803 WinSetWindowULong(hwndStore, QWL_USER, (ULONG)somSelf); 804 804 _oldFrameProc=WinSubclassWindow(hwnd, mmFolderFrameProc); 805 805 806 806 if(hwnd) 807 807 { 808 808 CNRINFO cnrInfo; 809 809 HWND hwndContainer=WinWindowFromID(hwnd,FID_CLIENT); 810 810 811 811 /* Change the containerflags */ 812 812 if(WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo), 813 813 MPFROMSHORT(sizeof(cnrInfo)))) 814 814 { 815 if(cnrInfo.flWindowAttr & CV_ICON) { 815 if(cnrInfo.flWindowAttr & CV_ICON) { 816 816 cnrInfo.slBitmapOrIcon.cx=_ulCurrentSize; 817 817 cnrInfo.slBitmapOrIcon.cy=_ulCurrentSize; … … 834 834 835 835 #if 0 836 SOM_Scope BOOL SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf, 836 SOM_Scope BOOL SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf, 837 837 PSZ pszSetupString) 838 838 { … … 859 859 #endif 860 860 861 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf, 861 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf, 862 862 ULONG ulReserved) 863 863 { … … 870 870 } 871 871 872 return (MMFolder_parent_WPFolder_wpRestoreState(somSelf, 872 return (MMFolder_parent_WPFolder_wpRestoreState(somSelf, 873 873 ulReserved)); 874 874 } 875 875 876 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreData(MMFolder *somSelf, 877 PSZ pszClass, ULONG ulKey, 876 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreData(MMFolder *somSelf, 877 PSZ pszClass, ULONG ulKey, 878 878 PBYTE pValue, PULONG pcbValue) 879 879 { … … 882 882 MMFolderMethodDebug("MMFolder","mmfldr_wpRestoreData"); 883 883 884 rc= (MMFolder_parent_WPFolder_wpRestoreData(somSelf, pszClass, 885 ulKey, pValue, 884 rc= (MMFolder_parent_WPFolder_wpRestoreData(somSelf, pszClass, 885 ulKey, pValue, 886 886 pcbValue)); 887 887 switch(ulKey) … … 919 919 MMFolderData *somThis = MMFolderGetData(somSelf); 920 920 MMFolderMethodDebug("MMFolder","mmfldr_wpSaveState"); 921 921 922 922 _wpSaveLong( somSelf, "MMFolder", KEY_ICONSIZE, _ulCurrentSize); 923 923 … … 926 926 927 927 928 SOM_Scope BOOL SOMLINK mmfldr_wpSaveData(MMFolder *somSelf, 929 PSZ pszClass, ULONG ulKey, 928 SOM_Scope BOOL SOMLINK mmfldr_wpSaveData(MMFolder *somSelf, 929 PSZ pszClass, ULONG ulKey, 930 930 PBYTE pValue, ULONG cbValue) 931 931 { … … 937 937 the address of the instance data containing grid spacing and view. So 938 938 we force the object to save the instance data and in wpSaveData we 939 finally get the right addresses to change the object view to gridded. 939 finally get the right addresses to change the object view to gridded. 940 940 This change is done in wpObjectReady() where we called wpSaveImmediate(). */ 941 941 … … 946 946 Check ID for NULL to prevent crash in stricmp(). 947 947 */ 948 psz=_wpQueryObjectID(somSelf); 948 psz=_wpQueryObjectID(somSelf); 949 949 // if(!stricmp(_wpQueryObjectID(somSelf), "<MMPM2_MMFOLDERTEMPLATE>")) 950 950 if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>")) … … 982 982 } 983 983 984 return (MMFolder_parent_WPFolder_wpSaveData(somSelf, pszClass, 985 ulKey, pValue, 984 return (MMFolder_parent_WPFolder_wpSaveData(somSelf, pszClass, 985 ulKey, pValue, 986 986 cbValue)); 987 987 } 988 988 989 SOM_Scope BOOL SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf, 990 HWND hwndFrame, 989 SOM_Scope BOOL SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf, 990 HWND hwndFrame, 991 991 ULONG ulMenuId) 992 992 { … … 1004 1004 char text[200]; 1005 1005 CNRINFO cnrInfo2=cnrInfo; 1006 1006 1007 1007 switch(ulMenuId) 1008 1008 { … … 1054 1054 } 1055 1055 1056 _wpSetup(somSelf, "MENUITEMSELECTED=716");/* Change to icon view */ 1056 _wpSetup(somSelf, "MENUITEMSELECTED=716");/* Change to icon view */ 1057 1057 _wpSetup(somSelf, "MENUITEMSELECTED=309");/* Arrange */ 1058 1058 … … 1062 1062 } 1063 1063 }/* if() */ 1064 return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf, 1065 hwndFrame, 1064 return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf, 1065 hwndFrame, 1066 1066 ulMenuId)); 1067 1067 } … … 1071 1071 *wpSetup:override; 1072 1072 */ 1073 SOM_Scope void SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf, 1073 SOM_Scope void SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf, 1074 1074 ULONG ulCode, WPObject* refObject) 1075 1075 { … … 1100 1100 1101 1101 /* If no ID result is NULL */ 1102 psz=_wpQueryObjectID(somSelf); 1102 psz=_wpQueryObjectID(somSelf); 1103 1103 if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>")) { 1104 1104 /* When the template is created wpRestoreData() isn't called so we don't have … … 1106 1106 we force the object to save the instance data and in wpSaveData we 1107 1107 finally get the right addresses to change the object view to gridded. */ 1108 1108 1109 1109 _wpSaveImmediate(somSelf); 1110 1110 /* Set default view to gridded */ 1111 1111 1112 1112 if(_pFldrLongArray!=NULLHANDLE) { 1113 1113 *_pFldrLongArray=0x80; … … 1120 1120 *(_pulGridSpacing--)=_ulCurrentSize+MMFLDR_SPACINGDELTA_Y; 1121 1121 } 1122 1122 1123 1123 } 1124 1124 break; … … 1137 1137 MMFolderMethodDebug("MMFolder","mmfldr_wpSetup"); 1138 1138 1139 bufferSize=sizeof(buffer); 1139 bufferSize=sizeof(buffer); 1140 1140 if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMTHUMBSIZE, buffer, &bufferSize)) 1141 1141 { … … 1180 1180 pViewItem=_wpFindViewItem(somSelf,VIEW_CONTENTS|VIEW_TREE|VIEW_DETAILS, pViewItem)) 1181 1181 { 1182 _wpMenuItemSelected(somSelf, 1183 pViewItem->handle, 1182 _wpMenuItemSelected(somSelf, 1183 pViewItem->handle, 1184 1184 ulMenuId); 1185 1185 } … … 1189 1189 1190 1190 1191 SOM_Scope BOOL SOMLINK mmfldrM_wpclsCreateDefaultTemplates(M_MMFolder *somSelf, 1191 SOM_Scope BOOL SOMLINK mmfldrM_wpclsCreateDefaultTemplates(M_MMFolder *somSelf, 1192 1192 WPObject* Folder) 1193 1193 { … … 1205 1205 wpFolder=_wpclsQueryFolder(somSelf, MMTEMPLATE_FOLDER_ID, FALSE); 1206 1206 _wpclsNew(somSelf, _wpclsQueryTitle(somSelf), chrSetup, wpFolder,FALSE); 1207 1207 1208 1208 return TRUE; 1209 1209 } … … 1224 1224 1225 1225 1226 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf, 1226 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf, 1227 1227 PICONINFO pIconInfo) 1228 1228 { … … 1246 1246 1247 1247 1248 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf, 1249 ICONINFO* pIconInfo, 1248 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf, 1249 ICONINFO* pIconInfo, 1250 1250 ULONG ulIconIndex) 1251 1251 { -
trunk/classes/c/cwmm.DEF
r3 r104 1 1 ; CWMM.DEF: DEF-file for CWMM.dll 2 2 ; 3 ; (C) Chris Wohlgemuth 2002-20 053 ; (C) Chris Wohlgemuth 2002-2020 4 4 ;/* 5 5 ; * This program is free software; you can redistribute it and/or modify … … 25 25 26 26 LIBRARY CWMM INITGLOBAL 27 DESCRIPTION '$@#(C) C. Wohlgemuth 20 05:0.2 #@##1## 11/05/05 17:35:09My ;-) ::::9::@@CWMM-classes V0.2.9'27 DESCRIPTION '$@#(C) C. Wohlgemuth 2020:0.2 #@##1## 18/07/20 19:38:26 My ;-) ::::9::@@CWMM-classes V0.2.9' 28 28 29 29 PROTMODE -
trunk/classes/create_cwmm_def.CMD
r2 r104 3 3 call SysLoadFuncs 4 4 5 deffile= ARG(1)5 deffile=strip(ARG(1)) 6 6 if ARG(1)="" then deffile="tst.def" 7 7 … … 39 39 def=def||'0d'x||'0a'x 40 40 41 def=def||"LIBRARY CWMM INIT GLOBAL"||'0d'x||'0a'x41 def=def||"LIBRARY CWMM INITINSTANCE TERMINSTANCE"||'0d'x||'0a'x 42 42 def=def||"DESCRIPTION '$@#(C) C. Wohlgemuth " 43 43 def=def||WORD(DATE(),3)||":"||LEFT(theVersion,3)||" #@##1## "||DATE("E")||" "||TIME("N")||" My ;-) ::::"||WORD(TRANSLATE(theVersion," ", "."),3)||"::@@CWMM-classes V"||theVersion||"'"||'0d'x||'0a'x -
trunk/classes/exports.DEF
r2 r104 1 PROTMODE 2 CODE PRELOAD DISCARDABLE 3 DATA SHARED LOADONCALL 4 5 EXPORTS 1 DATA MULTIPLE NONSHARED 2 3 EXPORTS 6 4 ;Audio classes 7 M_MMAudioClassData @18 M_MMAudioCClassData @29 M_MMAudioNewClass @310 MMAudioClassData @411 MMAudioCClassData @512 MMAudioNewClass @613 14 M_MMMP3ClassData @715 M_MMMP3CClassData @816 M_MMMP3NewClass @917 MMMP3ClassData @1018 MMMP3CClassData @1119 MMMP3NewClass @1220 21 M_MMOGGClassData @1322 M_MMOGGCClassData @1423 M_MMOGGNewClass @1524 MMOGGClassData @1625 MMOGGCClassData @1726 MMOGGNewClass @1827 28 M_MMCDTrackClassData @1929 M_MMCDTrackCClassData @2030 M_MMCDTrackNewClass @2131 MMCDTrackClassData @2232 MMCDTrackCClassData @2333 MMCDTrackNewClass @2434 35 M_CWMMDiskClassData @2536 M_CWMMDiskCClassData @2637 M_CWMMDiskNewClass @2738 CWMMDiskClassData @2839 CWMMDiskCClassData @2940 CWMMDiskNewClass @3041 42 M_MMWAVClassData @3143 M_MMWAVCClassData @3244 M_MMWAVNewClass @3345 MMWAVClassData @3446 MMWAVCClassData @3547 MMWAVNewClass @3648 49 M_MMAIFClassData @3750 M_MMAIFCClassData @3851 M_MMAIFNewClass @3952 MMAIFClassData @4053 MMAIFCClassData @4154 MMAIFNewClass @4255 56 M_MMAUClassData @4357 M_MMAUCClassData @4458 M_MMAUNewClass @4559 MMAUClassData @4660 MMAUCClassData @4761 MMAUNewClass @4862 63 M_MM_AUClassData @4964 M_MM_AUCClassData @5065 M_MM_AUNewClass @5166 MM_AUClassData @5267 MM_AUCClassData @5368 MM_AUNewClass @5469 70 M_MMIFFClassData @5571 M_MMIFFCClassData @5672 M_MMIFFNewClass @5773 MMIFFClassData @5874 MMIFFCClassData @5975 MMIFFNewClass @6076 77 M_MMSNDFClassData @6178 M_MMSNDFCClassData @6279 M_MMSNDFNewClass @6380 MMSNDFClassData @6481 MMSNDFCClassData @6582 MMSNDFNewClass @6683 84 M_MMVOCClassData @6785 M_MMVOCCClassData @6886 M_MMVOCNewClass @6987 MMVOCClassData @7088 MMVOCCClassData @7189 MMVOCNewClass @7290 91 M_MMMIDIClassData @7392 M_MMMIDICClassData @7493 M_MMMIDINewClass @7594 MMMIDIClassData @7695 MMMIDICClassData @7796 MMMIDINewClass @785 M_MMAudioClassData 6 M_MMAudioCClassData 7 M_MMAudioNewClass 8 MMAudioClassData 9 MMAudioCClassData 10 MMAudioNewClass 11 12 M_MMMP3ClassData 13 M_MMMP3CClassData 14 M_MMMP3NewClass 15 MMMP3ClassData 16 MMMP3CClassData 17 MMMP3NewClass 18 19 M_MMOGGClassData 20 M_MMOGGCClassData 21 M_MMOGGNewClass 22 MMOGGClassData 23 MMOGGCClassData 24 MMOGGNewClass 25 26 M_MMCDTrackClassData 27 M_MMCDTrackCClassData 28 M_MMCDTrackNewClass 29 MMCDTrackClassData 30 MMCDTrackCClassData 31 MMCDTrackNewClass 32 33 M_CWMMDiskClassData 34 M_CWMMDiskCClassData 35 M_CWMMDiskNewClass 36 CWMMDiskClassData 37 CWMMDiskCClassData 38 CWMMDiskNewClass 39 40 M_MMWAVClassData 41 M_MMWAVCClassData 42 M_MMWAVNewClass 43 MMWAVClassData 44 MMWAVCClassData 45 MMWAVNewClass 46 47 M_MMAIFClassData 48 M_MMAIFCClassData 49 M_MMAIFNewClass 50 MMAIFClassData 51 MMAIFCClassData 52 MMAIFNewClass 53 54 M_MMAUClassData 55 M_MMAUCClassData 56 M_MMAUNewClass 57 MMAUClassData 58 MMAUCClassData 59 MMAUNewClass 60 61 M_MM_AUClassData 62 M_MM_AUCClassData 63 M_MM_AUNewClass 64 MM_AUClassData 65 MM_AUCClassData 66 MM_AUNewClass 67 68 M_MMIFFClassData 69 M_MMIFFCClassData 70 M_MMIFFNewClass 71 MMIFFClassData 72 MMIFFCClassData 73 MMIFFNewClass 74 75 M_MMSNDFClassData 76 M_MMSNDFCClassData 77 M_MMSNDFNewClass 78 MMSNDFClassData 79 MMSNDFCClassData 80 MMSNDFNewClass 81 82 M_MMVOCClassData 83 M_MMVOCCClassData 84 M_MMVOCNewClass 85 MMVOCClassData 86 MMVOCCClassData 87 MMVOCNewClass 88 89 M_MMMIDIClassData 90 M_MMMIDICClassData 91 M_MMMIDINewClass 92 MMMIDIClassData 93 MMMIDICClassData 94 MMMIDINewClass 97 95 98 96 ;Video classes 99 M_MMVideoClassData @79100 M_MMVideoCClassData @80101 M_MMVideoNewClass @81102 MMVideoClassData @82103 MMVideoCClassData @83104 MMVideoNewClass @84105 106 M_MMAVIClassData @85107 M_MMAVICClassData @86108 M_MMAVINewClass @87109 MMAVIClassData @88110 MMAVICClassData @89111 MMAVINewClass @90112 113 M_MMFLIClassData @91114 M_MMFLICClassData @92115 M_MMFLINewClass @93116 MMFLIClassData @94117 MMFLICClassData @95118 MMFLINewClass @96119 120 M_MMMOVClassData @97121 M_MMMOVCClassData @98122 M_MMMOVNewClass @99123 MMMOVClassData @100124 MMMOVCClassData @101125 MMMOVNewClass @102126 127 M_MMMPGClassData @103128 M_MMMPGCClassData @104129 M_MMMPGNewClass @105130 MMMPGClassData @106131 MMMPGCClassData @107132 MMMPGNewClass @10897 M_MMVideoClassData 98 M_MMVideoCClassData 99 M_MMVideoNewClass 100 MMVideoClassData 101 MMVideoCClassData 102 MMVideoNewClass 103 104 M_MMAVIClassData 105 M_MMAVICClassData 106 M_MMAVINewClass 107 MMAVIClassData 108 MMAVICClassData 109 MMAVINewClass 110 111 M_MMFLIClassData 112 M_MMFLICClassData 113 M_MMFLINewClass 114 MMFLIClassData 115 MMFLICClassData 116 MMFLINewClass 117 118 M_MMMOVClassData 119 M_MMMOVCClassData 120 M_MMMOVNewClass 121 MMMOVClassData 122 MMMOVCClassData 123 MMMOVNewClass 124 125 M_MMMPGClassData 126 M_MMMPGCClassData 127 M_MMMPGNewClass 128 MMMPGClassData 129 MMMPGCClassData 130 MMMPGNewClass 133 131 134 132 ;MM-Data file class 135 M_CWMMDataFileClassData @109136 M_CWMMDataFileCClassData @110137 M_CWMMDataFileNewClass @111138 CWMMDataFileClassData @112139 CWMMDataFileCClassData @113140 CWMMDataFileNewClass @114133 M_CWMMDataFileClassData 134 M_CWMMDataFileCClassData 135 M_CWMMDataFileNewClass 136 CWMMDataFileClassData 137 CWMMDataFileCClassData 138 CWMMDataFileNewClass 141 139 142 140 ;Image classes 143 M_MMImageClassData @115144 M_MMImageCClassData @116145 M_MMImageNewClass @117146 MMImageClassData @118147 MMImageCClassData @119148 MMImageNewClass @120149 150 M_MMAVCClassData @121151 M_MMAVCCClassData @122152 M_MMAVCNewClass @123153 MMAVCClassData @124154 MMAVCCClassData @125155 MMAVCNewClass @126156 157 M_MMDIBClassData @127158 M_MMDIBCClassData @128159 M_MMDIBNewClass @129160 MMDIBClassData @130161 MMDIBCClassData @131162 MMDIBNewClass @132163 164 M_MMGIFClassData @133165 M_MMGIFCClassData @134166 M_MMGIFNewClass @135167 MMGIFClassData @136168 MMGIFCClassData @137169 MMGIFNewClass @138170 171 M_MMJPGClassData @139172 M_MMJPGCClassData @140173 M_MMJPGNewClass @141174 MMJPGClassData @142175 MMJPGCClassData @143176 MMJPGNewClass @144177 178 M_MMPhotoCDClassData @145179 M_MMPhotoCDCClassData @146180 M_MMPhotoCDNewClass @147181 MMPhotoCDClassData @148182 MMPhotoCDCClassData @149183 MMPhotoCDNewClass @150184 185 M_MMPCXClassData @151186 M_MMPCXCClassData @152187 M_MMPCXNewClass @153188 MMPCXClassData @154189 MMPCXCClassData @155190 MMPCXNewClass @156191 192 M_MMTargaClassData @157193 M_MMTargaCClassData @158194 M_MMTargaNewClass @159195 MMTargaClassData @160196 MMTargaCClassData @161197 MMTargaNewClass @162198 199 M_MMTIFFClassData @163200 M_MMTIFFCClassData @164201 M_MMTIFFNewClass @165202 MMTIFFClassData @166203 MMTIFFCClassData @167204 MMTIFFNewClass @168205 206 M_MMMMotionClassData @169207 M_MMMMotionCClassData @170208 M_MMMMotionNewClass @171209 MMMMotionClassData @172210 MMMMotionCClassData @173211 MMMMotionNewClass @174212 213 M_MMBitmapClassData @175214 M_MMBitmapCClassData @176215 M_MMBitmapNewClass @177216 MMBitmapClassData @178217 MMBitmapCClassData @179218 MMBitmapNewClass @180141 M_MMImageClassData 142 M_MMImageCClassData 143 M_MMImageNewClass 144 MMImageClassData 145 MMImageCClassData 146 MMImageNewClass 147 148 M_MMAVCClassData 149 M_MMAVCCClassData 150 M_MMAVCNewClass 151 MMAVCClassData 152 MMAVCCClassData 153 MMAVCNewClass 154 155 M_MMDIBClassData 156 M_MMDIBCClassData 157 M_MMDIBNewClass 158 MMDIBClassData 159 MMDIBCClassData 160 MMDIBNewClass 161 162 M_MMGIFClassData 163 M_MMGIFCClassData 164 M_MMGIFNewClass 165 MMGIFClassData 166 MMGIFCClassData 167 MMGIFNewClass 168 169 M_MMJPGClassData 170 M_MMJPGCClassData 171 M_MMJPGNewClass 172 MMJPGClassData 173 MMJPGCClassData 174 MMJPGNewClass 175 176 M_MMPhotoCDClassData 177 M_MMPhotoCDCClassData 178 M_MMPhotoCDNewClass 179 MMPhotoCDClassData 180 MMPhotoCDCClassData 181 MMPhotoCDNewClass 182 183 M_MMPCXClassData 184 M_MMPCXCClassData 185 M_MMPCXNewClass 186 MMPCXClassData 187 MMPCXCClassData 188 MMPCXNewClass 189 190 M_MMTargaClassData 191 M_MMTargaCClassData 192 M_MMTargaNewClass 193 MMTargaClassData 194 MMTargaCClassData 195 MMTargaNewClass 196 197 M_MMTIFFClassData 198 M_MMTIFFCClassData 199 M_MMTIFFNewClass 200 MMTIFFClassData 201 MMTIFFCClassData 202 MMTIFFNewClass 203 204 M_MMMMotionClassData 205 M_MMMMotionCClassData 206 M_MMMMotionNewClass 207 MMMMotionClassData 208 MMMMotionCClassData 209 MMMMotionNewClass 210 211 M_MMBitmapClassData 212 M_MMBitmapCClassData 213 M_MMBitmapNewClass 214 MMBitmapClassData 215 MMBitmapCClassData 216 MMBitmapNewClass 219 217 220 218 ;Light table folder 221 M_MMFolderClassData @181222 M_MMFolderCClassData @182223 M_MMFolderNewClass @183224 MMFolderClassData @184225 MMFolderCClassData @185226 MMFolderNewClass @186219 M_MMFolderClassData 220 M_MMFolderCClassData 221 M_MMFolderNewClass 222 MMFolderClassData 223 MMFolderCClassData 224 MMFolderNewClass 227 225 228 226 ;Audio stream class 229 M_MMAudioStreamClassData @187230 M_MMAudioStreamCClassData @188231 M_MMAudioStreamNewClass @189232 MMAudioStreamClassData @190233 MMAudioStreamCClassData @191234 MMAudioStreamNewClass @192227 M_MMAudioStreamClassData 228 M_MMAudioStreamCClassData 229 M_MMAudioStreamNewClass 230 MMAudioStreamClassData 231 MMAudioStreamCClassData 232 MMAudioStreamNewClass 235 233 236 234 ;M3U playlist 237 M_MMM3UClassData @193238 M_MMM3UCClassData @194239 M_MMM3UNewClass @195240 MMM3UClassData @196241 MMM3UCClassData @197242 MMM3UNewClass @198235 M_MMM3UClassData 236 M_MMM3UCClassData 237 M_MMM3UNewClass 238 MMM3UClassData 239 MMM3UCClassData 240 MMM3UNewClass 243 241 244 242 ;MMPNG class 245 M_MMPNGClassData @199246 M_MMPNGCClassData @200247 M_MMPNGNewClass @201248 MMPNGClassData @202249 MMPNGCClassData @203250 MMPNGNewClass @204243 M_MMPNGClassData 244 M_MMPNGCClassData 245 M_MMPNGNewClass 246 MMPNGClassData 247 MMPNGCClassData 248 MMPNGNewClass 251 249 252 250 ;MMFLAC class 253 M_MMFLACClassData @205254 M_MMFLACCClassData @206255 M_MMFLACNewClass @207256 MMFLACClassData @208257 MMFLACCClassData @209258 MMFLACNewClass @210251 M_MMFLACClassData 252 M_MMFLACCClassData 253 M_MMFLACNewClass 254 MMFLACClassData 255 MMFLACCClassData 256 MMFLACNewClass 259 257 260 258 IMPORTS … … 266 264 WPImageFileNewClass=PMWP.493 267 265 268 269 ; M_MMWAVClassData @31270 ; M_MMWAVCClassData @32271 ; M_MMWAVNewClass @33272 ; MMWAVClassData @34273 ; MMWAVCClassData @35274 ; MMWAVNewClass @36275 276 277 266 ;IMPORTS 278 267 ; MMPARTS.M_MMAudioClassData -
trunk/classes/help/de/cwmm049.ipf
r2 r104 148 148 werden von einem FreeDB-Server abgefragt sofern eine Internetverbindung verfgbar ist. 149 149 Eine Emailadresse muá angegeben werden, um diese Funktion zu nutzen. 150 Zu diesem Zweck das Konfigurationsobjekt starten. 150 Zu diesem Zweck das Konfigurationsobjekt starten. 151 151 :p. 152 152 Diese Adresse wird in der Datei cddb.ini des Installationsverzeichnisses gespeichert. … … 156 156 :p. 157 157 Dises Objekt ist eine M3U-Spielliste. M3U-Spiellisten sind Textdateien, die die Pfade 158 der abzuspielenden Stcke enthalten. Sie werden z.B. von portablen MP3-Spielern verwendet. 158 der abzuspielenden Stcke enthalten. Sie werden z.B. von portablen MP3-Spielern verwendet. 159 159 Es steht ein Editor zur Verfgung, mit dessen Hilfe derartige Listen 160 160 einfach mit der Maus (Ziehen und Fallen lassen) bearbeitet werden knnen. … … 163 163 :p. 164 164 Mit diesem Objekt knnen Audio-Streams von Internet-Radiostationen gehrt werden. 165 Die erforderliche URL kann im Einstellungen-Notizbuch eingetragen werden. 165 Die erforderliche URL kann im Einstellungen-Notizbuch eingetragen werden. 166 166 167 167 :nt. … … 170 170 :ent. 171 171 172 .* ---------------------------------------------------------------------------- 173 :h1 res=060.Audiodatei konvertieren 174 :p.Geben sie fr die Zieldatei den Audiotyp und Dateinamen inklusive vollem Pfad an. 175 Quelldatei Details werden im oberen Bereich des Dialogfensters angezeigt. 176 Manche Dateiformate sind mehr verlustbehaftet als andere und die Konvertierung von 177 einem verlustbehafteten zu einem verlustlosen Format wird nicht die Bitinformation 178 wiederherstellen die in der verlustlosen Quelle vorhanden war. 179 In einigen Fllen kann dies auch zu einer Datei von einer schlechteren Qualitt als 180 die verlustbehaftete Datei fhren. 181 182 :p.Das Auswahlfeld listet zur Verfgung stehende MMIOProcs (Codecs) zur Konvertierung auf. 183 184 :p.Drcken sie den :hp2.Konvertieren:2hp2. Knopf um mit der Konvertierung zu beginnen, und 185 :hp2.Abbrechen:ehp2. um die Konvertierung abzubrechen. Drcken sie :hp2.Schlieáen:ehp2. um den 186 Dialog zu schlieáen. 187 172 188 :euserdoc. 173 189 -
trunk/classes/idl/idl_audio/cwaudio.idl
r2 r104 17 17 * along with this program; see the file COPYING. If not, write to 18 18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 19 */ 20 20 /* 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 35 35 #define SIZE_PLAYTIME 11 36 36 #define SIZE_SAMPLERATE 7 37 #define SIZE_BITRATE 7 37 #define SIZE_BITRATE 7 38 38 #define SIZE_CHANNELS 2 39 39 #define SIZE_BPS 4 … … 43 43 */ 44 44 45 interface M_MMAudio; 45 interface M_MMAudio; 46 46 47 47 … … 80 80 81 81 /* 82 * methods overridden 82 * methods overridden 83 83 * 84 84 */ … … 86 86 wpclsQueryInstanceType : override; 87 87 wpclsQueryInstanceFilter : override; 88 wpclsQueryDetailsInfo : override; 89 wpclsQueryTitle : override; 88 wpclsQueryDetailsInfo : override; 89 wpclsQueryTitle : override; 90 90 wpclsInitData : override; 91 91 wpclsUnInitData : override; 92 wpclsQueryDefaultView : override; 92 wpclsQueryDefaultView : override; 93 93 wpclsQueryIconData : override; 94 94 }; … … 108 108 */ 109 109 ULONG cwmmAddAudioInformationPage(in HWND hwndNotebook); 110 BOOL cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in intiWhich);111 ULONG cwmmQueryTrackInfo(in PSZ chrString, in ULONG ulSize, in intiWhich);110 BOOL cwmmSetTrackInfo(in char* chrString, in ULONG ulValue, in ULONG iWhich); 111 ULONG cwmmQueryTrackInfo(in PSZ chrString, in ULONG ulSize, in ULONG iWhich); 112 112 void cwmmPlayTrack(in HWND hwndCnr, in BOOL bPlay); 113 113 ULONG cwmmAddTrackNamePage(in HWND hwndNotebook); … … 157 157 ULONG ulSampleRate; 158 158 ULONG ulBitRate; 159 ULONG ulChannels; 159 ULONG ulChannels; 160 160 ULONG ulBPS; 161 161 ULONG ulNumAudioBytes; 162 162 163 163 BOOL bNeedSaving; 164 164 /* Strings shown in details view */ … … 171 171 /* char id3Name[33+30+1]; */ 172 172 /* 63 chars. ID3 allows 30 */ 173 /* char id3Artist[33+30+1]; 173 /* char id3Artist[33+30+1]; 174 174 char id3Album[33+30+1]; 175 175 char id3Year[4+1]; … … 188 188 PSZ pszGenre; 189 189 /* 190 * methods overridden 190 * methods overridden 191 191 * 192 192 */ … … 202 202 wpOpen : override; 203 203 204 /* wpSetTitle : override; 204 /* wpSetTitle : override; 205 205 wpQueryRealName : override; 206 wpQueryTitle : override; 206 wpQueryTitle : override; 207 207 wpRefresh : override; 208 208 */ -
trunk/classes/idl/idl_image/wpimage.idl
r49 r104 41 41 #include <somcls.idl> 42 42 43 //typedef LHANDLE HPAL; /* hpal */44 43 typedef HPAL *PHPAL; 45 44 -
trunk/classes/makefile
r67 r104 2 2 3 3 include ../make.inc 4 PMPRINTFPATH = U:\PMPrintf5 4 DISTNAME = cwaudio-classes-$(VERSION) 6 5 CC = icc … … 9 8 #-Wcnd /Weff /Wini /Wpar /Wpro /Wuse /Wrea 10 9 #CFLAGS = /Wuse /Wrea -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C 11 CFLAGS = -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C 12 13 LIBS = somtk.lib mmPM2.lib rexx.lib $(PMPRINTFPATH)\pmprintf.lib14 DEFS = 10 CFLAGS = -Ge- /Gm+ -G4 /Ss -Gl /O+ -Oc+ -Ol- /Q+ /C 11 12 LIBS = somtk.lib mmPM2.lib rexx.lib 13 DEFS = 15 14 16 15 MOREINC = ./include -I./inc -I../common_functions/include … … 35 34 #Audio classes 36 35 AUD_SCCOMPILEC = sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_audio -maddstar -mnoint -S128000 -C128000 $< 37 AUD_SCCOMPILEIH = sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -s ih";"h-dinclude -maddstar -mnoint -S128000 -C128000 $<36 AUD_SCCOMPILEIH = sc -I $(IDLDIR)/idl_audio -I $(IDLDIR)/idl_mm -p -r -s"ih;h" -dinclude -maddstar -mnoint -S128000 -C128000 $< 38 37 39 38 #Video 40 39 VID_SCCOMPILEC = sc -I $(IDLDIR)/idl_video -p -r -sc -d$(CDIR)/c_video -maddstar -mnoint -S128000 -C128000 $< 41 VID_SCCOMPILEIH = sc -I $(IDLDIR)/idl_video -p -r -s ih";"h-dinclude -maddstar -mnoint -S128000 -C128000 $<40 VID_SCCOMPILEIH = sc -I $(IDLDIR)/idl_video -p -r -s"ih;h" -dinclude -maddstar -mnoint -S128000 -C128000 $< 42 41 43 42 #image 44 43 IMG_SCCOMPILEC = sc -I $(IDLDIR)/idl_image -p -r -sc -d$(CDIR)/c_image -maddstar -mnoint -S128000 -C128000 $< 45 IMG_SCCOMPILEIH = sc -I $(IDLDIR)/idl_image -p -r -s ih";"h-dinclude -maddstar -mnoint -S128000 -C128000 $<44 IMG_SCCOMPILEIH = sc -I $(IDLDIR)/idl_image -p -r -s"ih;h" -dinclude -maddstar -mnoint -S128000 -C128000 $< 46 45 47 46 #base classes 48 47 MM_SCCOMPILEC = sc -I $(IDLDIR)/idl_mm -p -r -sc -d$(CDIR)/c_mm -maddstar -mnoint -S128000 -C128000 $< 49 MM_SCCOMPILEIH = sc -I $(IDLDIR)/idl_mm -p -r -s ih";"h-dinclude -maddstar -mnoint -S128000 -C128000 $<48 MM_SCCOMPILEIH = sc -I $(IDLDIR)/idl_mm -p -r -s"ih;h" -dinclude -maddstar -mnoint -S128000 -C128000 $< 50 49 51 50 … … 104 103 $(OBJDIR)/cwmmdisk.obj \ 105 104 $(OBJDIR)/mmfolder.obj 106 105 107 106 COMMON_OBJECTS = $(OBJDIR)/except.obj \ 108 107 $(OBJDIR)/message.obj \ … … 123 122 HLP_FILES = ./Help/de/cwmm049.hlp \ 124 123 ./Help/en/cwmm.hlp \ 124 ./Help/es/cwmm034.hlp \ 125 ./Help/fr/cwmm033.hlp \ 125 126 ./Help/nl/cwmm031.hlp \ 126 127 ./Help/it/cwmm039.hlp \ … … 191 192 cd ./res && make 192 193 rc ./res/common_res/cwaudio.res cwmm.dll 193 MAPSYM $(basename $@)194 MAPSYM cwmm.map 194 195 195 196 ################################### … … 209 210 ################################### 210 211 # German 211 ./Help/de/cwmm049.hlp: ./Help/de/cwmm049.ipf 212 ./Help/de/cwmm049.hlp: ./Help/de/cwmm049.ipf 212 213 cd ./Help/de && make 213 214 … … 216 217 cd ./Help/en && make 217 218 219 # Spanish 220 ./Help/es/cwmm034.hlp: ./Help/es/cwmm034.ipf 221 cd ./Help/es && make 222 223 # French 224 ./Help/fr/cwmm033.hlp: ./Help/fr/cwmm033.ipf 225 cd ./Help/fr && make 226 218 227 # Dutch 219 228 ./Help/nl/cwmm031.hlp: ./Help/nl/cwmm031.ipf … … 224 233 cd ./Help/it && make 225 234 226 # T raditional chinese (TW)227 ./Help/tw/cwmm088.hlp: 235 # Taiwan 236 ./Help/tw/cwmm088.hlp: ./Help/tw/cwmm088.ipf 228 237 cd ./Help/tw && make 229 238 … … 315 324 -cd ./Help/de && make clean 316 325 -cd ./Help/en && make clean 326 -cd ./Help/es && make clean 327 -cd ./Help/fr && make clean 317 328 -cd ./Help/nl && make clean 318 329 -cd ./Help/it && make clean … … 328 339 -cd ./Help/de && make cleaner 329 340 -cd ./Help/en && make cleaner 341 -cd ./Help/es && make cleaner 342 -cd ./Help/fr && make cleaner 330 343 -cd ./Help/nl && make cleaner 331 344 -cd ./Help/it && make cleaner -
trunk/classes/mm-progs/MMPlayer/customprocs.c
r2 r104 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 43 43 #include <stdio.h> 44 44 #include <stdlib.h> 45 #include <string.h> 45 46 46 47 … … 70 71 { 71 72 PDRAGINFO pdi=PVOIDFROMMP(mp1); 72 73 73 74 return handleDrag0ver( pdi, WinQueryWindow(hwnd, QW_PARENT)); 74 75 } … … 76 77 { 77 78 PDRAGINFO pdi=PVOIDFROMMP(mp1); 78 79 79 80 return handleDrop( pdi, WinQueryWindow(hwnd, QW_PARENT)); 80 81 } … … 104 105 if(swp.fl & SWP_MINIMIZE) 105 106 break; 106 107 107 108 hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE); 108 109 WinQueryWindowRect(hwnd, &rcl); 109 110 WinDrawBitmap(hps, allBMPs[MAIN_BMP_IDX].hbm, 110 NULLHANDLE, 111 NULLHANDLE, 111 112 (PPOINTL)&rcl, 112 113 0, 0, 113 DBM_IMAGEATTRS); 114 DBM_IMAGEATTRS); 114 115 WinEndPaint(hps); 115 116 return MRFALSE; … … 183 184 184 185 WinDrawBitmap(ubPtr->hps, ci.hbmSource, 185 &ci.rclSource, 186 &ci.rclSource, 186 187 (PPOINTL)&rcl, 187 188 0, 0, … … 211 212 if(ulShowFeedback==2) 212 213 return 1; 213 214 214 215 switch(usControl) 215 216 { … … 237 238 hps=WinGetPS(hwnd); 238 239 WinDrawBitmap(hps, ci.hbmSource, 239 &ci.rclSource, 240 &ci.rclSource, 240 241 (PPOINTL)&rcl, 241 242 0, 0, … … 255 256 256 257 switch (msg) 257 { 258 { 258 259 #if 0 259 260 /* Drag and drop of audio files */ … … 330 331 USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH); 331 332 332 if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 333 if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 333 334 y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY) 334 335 && y>=WinQueryWindowUShort(hwnd, SLIDERY)) { … … 346 347 if(SHORT1FROMMP(mp2)) { 347 348 hps=WinGetPS(hwnd); 348 WinQueryWindowRect(hwnd, &rcl); 349 WinQueryWindowRect(hwnd, &rcl); 349 350 GpiSetLineType(hps, LINETYPE_DOT); 350 351 ptl.x=rcl.xLeft; … … 369 370 if(WinQueryFocus(HWND_DESKTOP)==hwnd) { 370 371 if(SHORT2FROMMP(mp2)==VK_TAB && (SHORT1FROMMP(mp1) & KC_VIRTUALKEY)) 371 if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) 372 if(SHORT1FROMMP(mp1) & (KC_KEYUP|KC_PREVDOWN)) 372 373 return (MRESULT)TRUE; 373 374 … … 486 487 USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH); 487 488 488 if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 489 if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 489 490 y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY) 490 491 && y>=WinQueryWindowUShort(hwnd, SLIDERY)){ … … 522 523 USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH); 523 524 524 525 525 526 lTemp=lPos; 526 527 527 528 rcl.xLeft=WinQueryWindowULong(hwnd, SLIDERX); 528 529 rcl.yBottom=WinQueryWindowULong(hwnd, SLIDERY); … … 624 625 LONG lPos=WinQueryWindowULong(hwnd, SLIDERARMPOS); 625 626 USHORT usWidth=WinQueryWindowUShort(hwnd, SLIDERARMWIDTH); 626 if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 627 if(x<=lPos+usWidth+SLOFFSET && x>=lPos+SLOFFSET && 627 628 y<=WinQueryWindowUShort(hwnd, SLIDERY)+WinQueryWindowUShort(hwnd, SLIDERCY) 628 629 && y>=WinQueryWindowUShort(hwnd, SLIDERY)) { … … 689 690 hps=WinBeginPaint(hwnd, NULLHANDLE, NULLHANDLE); 690 691 rcl3=rcl=rcl2; 691 /* Arm pos */ 692 /* Arm pos */ 692 693 rcl2.xLeft+=lPos; 693 /* Arm size */ 694 /* Arm size */ 694 695 rcl2.xRight=rcl2.xLeft+usWidth; 695 696 696 697 /* Shaft */ 697 698 /* Left part */ … … 742 743 if(!rc) 743 744 { 744 WinFillRect(hps,&rcl2, CLR_PALEGRAY); 745 WinFillRect(hps,&rcl2, CLR_PALEGRAY); 745 746 WinDrawBorder(hps, &rcl2, 2, 2, 0, 0 ,0x0400); 746 747 } … … 779 780 return (MRESULT)FALSE; 780 781 } 781 782 782 783 switch(poi->idItem) 783 784 { … … 786 787 //DosBeep(5000, 50); 787 788 WinDrawBitmap(poi->hps, ciArm.hbmSource, 788 &ciArm.rclSource, 789 &ciArm.rclSource, 789 790 (PPOINTL)&poi->rclItem, 790 791 0, 0, … … 796 797 WinDrawBitmap(poi->hps, 797 798 ci.hbmSource, 798 &ci.rclSource, 799 &ci.rclSource, 799 800 (PPOINTL)&poi->rclItem, 800 801 0, 0, … … 815 816 if(!WinDrawBitmap(poi->hps, ci.hbmSource, 816 817 &rcl, 817 //&ci.rclSource, 818 //&ci.rclSource, 818 819 (PPOINTL)&poi->rclItem, 819 820 0, 0, … … 863 864 char text[100]; 864 865 CONTROLINFO ci; 865 866 866 867 ci=ciControls[CTRLIDX_PLAYTIME];//ciVolSliderArm; 867 868 868 869 hps=WinBeginPaint(hwnd, NULLHANDLE, NULL); 869 870 if(WinQueryWindowText(hwnd, sizeof(text), text)) … … 871 872 POINTL ptl= {0}; 872 873 WinDrawBitmap(hps, ci.hbmSource, 873 &ci.rclSource, 874 &ci.rclSource, 874 875 &ptl, 875 876 0, 0, -
trunk/classes/mm-progs/MMPlayer/display.c
r2 r104 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 42 42 #include <stdio.h> 43 43 #include <stdlib.h> 44 #include <string.h> 44 45 45 46 /* 0: time, 1: remaining, 2: filename */ … … 88 89 89 90 90 /* This fun ktion sets the playtime display according to the user settings.91 /* This function sets the playtime display according to the user settings. 91 92 Supported are remaining time, elapsed time and ID3-tag display */ 92 void setPlayTimeText( hwndFrame)93 void setPlayTimeText(HWND hwndFrame) 93 94 { 94 95 char text[CCHMAXPATH]; … … 112 113 /* Show filename */ 113 114 text[0]=0; 114 115 115 116 if(ulTemp>=3) 116 117 text[0]=0; 117 118 else if(ulTemp>=0) 118 119 strcpy(text, chrPtrName); 119 120 120 121 #if 0 121 122 else 122 123 ulTemp=15; /* Show playtime for midi files */ 123 124 #endif 124 125 125 126 if(ulTemp>=3||!strlen(text)) { 126 127 /* Play time */ … … 135 136 ulDisplayTimer=ulTemp; 136 137 break; 137 138 138 139 #if 0 139 140 /* Show ID3 tag */ … … 149 150 if(ulTemp>=15) 150 151 text[0]=0; 151 else if(ulTemp>=12) 152 else if(ulTemp>=12) 152 153 methodPtr(cwAudio, &chrPtr, sizeof(text), IDINFO_GENRE); 153 154 else if(ulTemp>=9) … … 162 163 else 163 164 ulTemp=15; /* Show playtime for midi files */ 164 165 165 166 if(ulTemp>=15||!strlen(text)) { 166 167 /* Play time */ -
trunk/classes/mm-progs/MMPlayer/mmplayer.c
r46 r104 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 52 52 #include "sys_funcs.h" 53 53 54 #ifndef OPEN_DEFAULT 54 #ifndef OPEN_DEFAULT 55 55 /* Open views for the wpOpen() method */ 56 56 … … 135 135 136 136 /* Every folder has one running play thread to handle play commands */ 137 void _OptlinkplayThreadFunc (void *arg);137 void playThreadFunc (void *arg); 138 138 void controlPlaying(HWND hwndDialog, ULONG ulAction, ULONG ulReserved); 139 139 BOOL stopAudioFile(HWND hwndFrame); … … 211 211 WinQueryPointerPos(HWND_DESKTOP, &ptl) ; 212 212 WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1); 213 WinPopupMenu(hwnd, hwnd, hwndPopup, 213 WinPopupMenu(hwnd, hwnd, hwndPopup, 214 214 ptl.x, ptl.y, 0, PU_HCONSTRAIN | PU_VCONSTRAIN | 215 PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE ); 216 215 PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE ); 216 217 217 } 218 218 … … 227 227 hResource=BMP_RESSOURCEHANDLE; //_queryResModuleHandle(); 228 228 hps=WinGetPS(HWND_DESKTOP); 229 229 230 230 /* The main BMP */ 231 231 allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPMIDDLE, 0, 0); … … 327 327 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft,ci.rclSource.yBottom, 328 328 ci.rclSource.xRight-ci.rclSource.xLeft, 329 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 329 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 330 330 oldPlayTimeProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), playTimeTextProc); 331 331 332 332 /* Pos slider */ 333 333 ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider; 334 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 334 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 335 335 hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE); 336 336 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom, 337 337 ci.rclSource.xRight-ci.rclSource.xLeft, 338 338 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE); 339 339 340 340 WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO, 341 341 MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0), 342 MPFROM2SHORT( 9, 9)); 342 MPFROM2SHORT( 9, 9)); 343 343 344 344 /* Vol slider */ 345 345 ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider; 346 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 346 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 347 347 hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE); 348 348 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom, … … 351 351 WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO, 352 352 MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0), 353 MPFROM2SHORT( 9, 9)); 353 MPFROM2SHORT( 9, 9)); 354 354 355 355 } … … 370 370 if((rc & 0x0000ffff)!=MCIERR_SUCCESS) { 371 371 /* Problem with MCI. Clean up. The Timer will be stopped in the method */ 372 stopAudioFile(hwndFrame); 372 stopAudioFile(hwndFrame); 373 373 } 374 374 else { 375 375 if(!stricmp(retMsg, "stopped")) { 376 376 /* Audio file played. */ 377 stopAudioFile(hwndFrame); 377 stopAudioFile(hwndFrame); 378 378 } 379 379 showPlayTimeDisplay(hwndFrame, TRUE);/* Ensure display is visible */ … … 391 391 return usItems; 392 392 } 393 393 394 394 return 0; 395 395 } … … 397 397 BOOL DrgVerifyTypeCW(PDRAGITEM pDragItem, char * chrType) 398 398 { 399 /* DrgVerifyType() seems not to work when several types are in the list?? 399 /* DrgVerifyType() seems not to work when several types are in the list?? 400 400 Dokumentation says, it works... */ 401 401 /* Only check for a single type for now */ … … 467 467 for(ulHash=0;*theString!='\0'; theString++) 468 468 ulHash=*theString+37*ulHash; 469 469 470 470 return ulHash%HASHSIZE; 471 471 } … … 538 538 MRESULT handleDrag0ver(PDRAGINFO pdi, HWND hwnd) 539 539 { 540 540 541 541 /* Only accept one file */ 542 542 if(DrgGetNumObjects(pdi)!=1) { … … 546 546 if(DrgCheckForKnownType(pdi, hwnd)) 547 547 return MRFROM2SHORT(DOR_DROP, DO_COPY); 548 549 return MRFROM2SHORT(DOR_NEVERDROP, DO_COPY); 548 549 return MRFROM2SHORT(DOR_NEVERDROP, DO_COPY); 550 550 } 551 551 … … 562 562 char chrFile[CCHMAXPATH]; 563 563 PDRAGITEM pDragItem; 564 564 565 565 pDragItem=DrgQueryDragitemPtr(pdi, 0); 566 DrgQueryStrName(pDragItem->hstrSourceName,sizeof(chrFile), chrFile); 567 DrgQueryStrName(pDragItem->hstrContainerName,sizeof(chrSourceName), chrSourceName); 566 DrgQueryStrName(pDragItem->hstrSourceName,sizeof(chrFile), chrFile); 567 DrgQueryStrName(pDragItem->hstrContainerName,sizeof(chrSourceName), chrSourceName); 568 568 strcat(chrSourceName, chrFile); 569 569 570 570 /* Start new file */ 571 571 controlPlaying(hwnd, PLAY_FIRST, 0); … … 608 608 MPFROM2SHORT(SC_SIZE, TRUE), 609 609 MPFROMP(NULL)); 610 610 611 611 WinSendMsg(hwndMenu, /* Delete Minimize from the system menu */ 612 612 MM_DELETEITEM, 613 613 MPFROM2SHORT(SC_MINIMIZE, TRUE), 614 614 MPFROMP(NULL)); 615 615 616 616 WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */ 617 617 MM_DELETEITEM, … … 648 648 649 649 switch (msg) 650 { 650 { 651 651 case DM_DRAGOVER: 652 652 { … … 676 676 swctl.fbJump=SWL_JUMPABLE; 677 677 WinAddSwitchEntry(&swctl); 678 678 679 679 adjustDialogControlPos(hwnd); 680 680 681 681 /* Set volume slider*/ 682 682 WinSendMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERVOLUME), … … 684 684 MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE), 685 685 MPFROMLONG( ulVolume)); 686 686 687 687 /* Subclass buttons for DnD */ 688 688 orgButtonProc=WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), buttonProc); 689 689 WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), buttonProc); 690 690 WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERSTOP), buttonProc); 691 691 692 692 FixSysMenu(hwnd); 693 693 … … 695 695 if(allBMPs[MAIN_BMP_IDX].hbm) { 696 696 SWP swp; 697 698 WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp); 699 WinSetWindowPos(WinWindowFromID(hwnd, ID_CLIENT), NULLHANDLE, 700 WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 701 WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 697 698 WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp); 699 WinSetWindowPos(WinWindowFromID(hwnd, ID_CLIENT), NULLHANDLE, 700 WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 701 WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 702 702 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx, 703 703 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy, 704 704 SWP_SIZE|SWP_MOVE); 705 705 orgBgProc=WinSubclassWindow(WinWindowFromID(hwnd, ID_CLIENT), bgProc); 706 706 707 707 WinSetWindowPos(hwnd, NULLHANDLE, 0, 0, 708 708 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2, … … 732 732 /*****************************************************/ 733 733 case WM_APPTERMINATENOTIFY: 734 734 735 735 switch(SHORT1FROMMP(mp1)) 736 736 { … … 745 745 return MRFALSE; 746 746 case NOTIFY_CONTEXT: 747 /* Show context menu. */ 747 /* Show context menu. */ 748 748 HlpContextMenu(hwnd, iWhichDisplay+ID_MENUITEMELAPSED, TRUE); 749 749 return MRFALSE; … … 752 752 } 753 753 return MRFALSE; 754 754 755 755 /*****************************************************/ 756 756 /* The following two messages are for device sharing */ … … 760 760 char chrCommand[100]; 761 761 int iWavePriv; 762 762 763 763 iWavePriv=ulPid; 764 764 … … 791 791 /* SETPOSITIONADVICE does not work for some reason, */ 792 792 /* so a timer is used. Yes, it's quit cumbersome... */ 793 /*****************************************************/ 793 /*****************************************************/ 794 794 case WM_TIMER: 795 795 if(SHORT1FROMMP(mp1)==IDTIMER_PLAY) { … … 812 812 /* Set slider position */ 813 813 814 WinPostMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERPOSBAR), 814 WinPostMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERPOSBAR), 815 815 SLM_SETSLIDERINFO, 816 816 MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE), … … 898 898 default: 899 899 break; 900 } 900 } 901 901 break; 902 902 … … 909 909 char chrCommand[50]; 910 910 char retMsg[20]; 911 911 912 912 switch(SHORT2FROMMP(mp1)) 913 913 { … … 939 939 static long lLastPos=0; 940 940 long lPos=LONGFROMMP(mp2); 941 941 942 942 bPosDragging=TRUE; 943 943 lPos*=ulTotalLength/100; 944 944 if(lPos/1000!=lLastPos) { 945 945 /* Prevent flickering */ 946 sprintf(chrCommand, "% d:%02d", lPos/1000/60, (lPos/1000)%60);946 sprintf(chrCommand, "%lu:%02lu", lPos/1000/60, (lPos/1000)%60); 947 947 WinSetWindowText(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), chrCommand); 948 948 lLastPos=lPos/1000; … … 963 963 { 964 964 ULONG ulValue; 965 965 966 966 ulValue=LONGFROMMP(mp2); 967 967 ulVolume=ulValue; … … 975 975 976 976 bPosDragging=FALSE; 977 lPos*=1000; 977 lPos*=1000; 978 978 lPos*=ulTotalLength/100; 979 979 lPos/=1000;// Use only full seconds … … 982 982 seekAudioFile(lPos); 983 983 /* restart timer */ 984 WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY); 984 WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY); 985 985 ulPos=lPos/1000; 986 986 break; … … 999 999 break; 1000 1000 }/* switch */ 1001 1001 1002 1002 return WinDefDlgProc( hwnd, msg, mp1, mp2); 1003 1003 } … … 1019 1019 ))==NULLHANDLE) 1020 1020 return FALSE; 1021 1021 1022 1022 ulSize=sizeof(chrFileName); 1023 1023 1024 1024 if ((rc = DosOpen(chrFileName, &handle, &act, 1025 1025 0L, 0, OPEN_ACTION_OPEN_IF_EXISTS, … … 1085 1085 BOOL writeVolumeToIni(char * iniFile, char* chrApp, char *chrKey, ULONG ulVolume) 1086 1086 { 1087 1087 1088 1088 return IniSaveInt(iniFile, chrApp, chrKey, ulVolume); 1089 1089 } … … 1108 1108 if(MMIO_SUCCESS!=mmioIdentifyFile(chrFile, &mmioInfo, &mmFormatInfo, &fourCC, 0,0)) 1109 1109 { 1110 return 0; 1110 return 0; 1111 1111 } 1112 1112 1113 1113 if(mmFormatInfo.ulMediaType==MMIO_MEDIATYPE_MIDI) 1114 1114 return 1; /* Midi */ 1115 1115 1116 1116 /* Any other audio file */ 1117 1117 return 2; … … 1143 1143 if(hab) { 1144 1144 hmq=WinCreateMsgQueue(hab,0); 1145 if(hmq) { 1146 /* Check if user started prog by hand */ 1145 if(hmq) { 1146 /* Check if user started prog by hand */ 1147 1147 if(argc!=NUMPARAMS) {/* Not the right num of params */ 1148 1148 pmUsage(); … … 1161 1161 { 1162 1162 /* FIXME: Identify error !!!*/ 1163 1163 1164 1164 }; 1165 1165 1166 1166 if(rc==1) 1167 1167 { … … 1176 1176 strcpy(chrClassName, params[1]); 1177 1177 1178 /* Get our ressource dll */ 1178 /* Get our ressource dll */ 1179 1179 // RESSOURCEHANDLE=0; 1180 1180 RESSOURCEHANDLE=queryResModuleHandle(argv[0]); … … 1189 1189 WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP), SLIDER_CLASS, privateSliderProc,0, SLADDBYTES); 1190 1190 1191 _loadBmps(); 1191 _loadBmps(); 1192 1192 DosGetInfoBlocks(&ptib, &ppib); 1193 1193 ulPid=ppib->pib_ulpid; 1194 1194 _beginthread(playThreadFunc,NULL,8192*16, NULLHANDLE); //Fehlerbehandlung fehlt 1195 1195 1196 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 1196 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 1197 1197 RESSOURCEHANDLE, IDDLG_MMPLAYER, 0) == DID_ERROR ) 1198 1198 { 1199 1199 /* 1200 Text: 1201 Title: "Installation problem" 1202 */ 1200 Text: 1201 Title: "Installation problem" 1202 */ 1203 1203 messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text), 1204 1204 title, IDSTR_INSTALLERRORTITLE , sizeof(title), -
trunk/classes/mm-progs/MMPlayer/playaudio.c
r57 r104 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 73 73 char chrCommand[50]; 74 74 char retMsg[100]; 75 ULONG rc;76 75 77 76 iWavePriv=ulPid; … … 79 78 if(bPaused) { 80 79 sprintf(chrCommand,"RESUME wave%d wait", iWavePriv); 81 rc =mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);80 mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 82 81 bPaused=FALSE; 83 82 showPlayTimeDisplay( hwndFrame, TRUE); … … 85 84 else { 86 85 sprintf(chrCommand,"PAUSE wave%d wait", iWavePriv); 87 rc =mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);86 mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 88 87 bPaused=TRUE; 89 88 } … … 96 95 char chrCommand[50]; 97 96 char retMsg[100]; 98 ULONG rc;99 97 100 98 iWavePriv=ulPid; 101 99 102 100 if(bIsPlaying) { 103 101 sprintf(chrCommand,"stop wave%d wait", iWavePriv); 104 rc =mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);105 102 mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 103 106 104 sprintf(chrCommand,"close wave%d wait", iWavePriv); 107 rc =mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);108 105 mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 106 109 107 _resetDisplay(hwndFrame); 110 108 showPlayTimeDisplay( hwndFrame, TRUE); 111 109 WinStopTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY); 112 110 bIsPlaying=FALSE; 113 bPaused=FALSE; 111 bPaused=FALSE; 114 112 } 115 113 return TRUE; … … 155 153 hwndNotify=hwndFrame;//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE); 156 154 157 /* Start audio file */ 155 /* Start audio file */ 158 156 sprintf(chrCommand,"open \"%s\" type %s alias wave%d SHAREABLE wait", chrSourceName, chrDevice, iWavePriv); 159 157 rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0); 160 158 if((rc & 0x0000ffff)!=MCIERR_SUCCESS) 161 159 return 0; 162 160 163 161 /* Set time format */ 164 162 sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", iWavePriv); … … 168 166 rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 169 167 return 0; 170 } 168 } 171 169 172 170 #if 0 … … 219 217 char chrCommand[50]; 220 218 char retMsg[20]; 221 APIRET rc;222 219 223 220 sprintf(chrCommand,"PLAY wave%ld from %ld", ulPid, lPosSec); 224 rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);221 mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 225 222 // ulStartPosition=lPosSec; 226 223 bPaused=FALSE; … … 269 266 270 267 /* Every folder has one running play thread to handle play commands */ 271 void _OptlinkplayThreadFunc (void *arg)268 void playThreadFunc (void *arg) 272 269 { 273 270 HAB hab; -
trunk/classes/mm-progs/audioconverter/audconv.c
r48 r104 18 18 * along with this program; see the file COPYING. If not, write to 19 19 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 20 */ 20 */ 21 21 /* 22 22 * If you need another license for your project/product (commercial, 23 23 * noncommercial, whatever) contact me at 24 * 24 * 25 25 * http://www.os2world.com/cdwriting 26 26 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 70 70 //#define INI_NAME_COLOR "color" 71 71 72 void HlpSendCommandToObject( char* chrObject, char*command);72 void HlpSendCommandToObject(PSZ chrObject, PSZ command); 73 73 BOOL percentRegisterBarClass(void); 74 BOOL IniSaveWindowPos( char * iniFile, char* chrApp, char *chrKey, HWND hwnd);75 BOOL IniRestoreWindowPos( char * iniFile, char* chrApp, char *chrKey, HWND hwnd);76 BOOL IniSaveWindowClrs( char * chrIniFile, char*chrApp , HWND hwnd);77 BOOL IniRestoreWindowClrs( char * chrIniFile, char*chrApp , HWND hwnd);78 BOOL HlpBuildMMProgIniFileName( char* chrProgname, char *chrBuffer, ULONG ulBufferSize);79 HMODULE queryResModuleHandle( char *chrExePath);74 BOOL IniSaveWindowPos(PSZ iniFile, PSZ chrApp, PSZ chrKey, HWND hwnd); 75 BOOL IniRestoreWindowPos(PSZ iniFile, PSZ chrApp, PSZ chrKey, HWND hwnd); 76 BOOL IniSaveWindowClrs(PSZ chrIniFile, PSZ chrApp , HWND hwnd); 77 BOOL IniRestoreWindowClrs(PSZ chrIniFile, PSZ chrApp , HWND hwnd); 78 BOOL HlpBuildMMProgIniFileName(PSZ chrProgname, PSZ chrBuffer, ULONG ulBufferSize); 79 HMODULE queryResModuleHandle(PSZ chrExePath); 80 80 void freeResHandle(); 81 BOOL getMessage( char*text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);82 ULONG messageBox( char*text, ULONG ulTextID , LONG lSizeText,83 char*title, ULONG ulTitleID, LONG lSizeTitle,81 BOOL getMessage(PSZ text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd); 82 ULONG messageBox( PSZ text, ULONG ulTextID , LONG lSizeText, 83 PSZ title, ULONG ulTitleID, LONG lSizeTitle, 84 84 HMODULE hResource, HWND hwnd, ULONG ulFlags); 85 85 … … 90 90 BOOL bHaveWindowPos=FALSE; 91 91 92 charchrTargetName[CCHMAXPATH]={0};93 charchrSourceName[CCHMAXPATH]={0};94 charchrProcName[CCHMAXPATH]={0};95 charchrIniFile[CCHMAXPATH];92 UCHAR chrTargetName[CCHMAXPATH]={0}; 93 UCHAR chrSourceName[CCHMAXPATH]={0}; 94 UCHAR chrProcName[CCHMAXPATH]={0}; 95 UCHAR chrIniFile[CCHMAXPATH]; 96 96 97 97 int numArgs; … … 118 118 void pmUsage(); 119 119 120 BOOL createTargetName( char *sourceName, char *chrExt)120 BOOL createTargetName(PSZ sourceName, PSZ chrExt) 121 121 { 122 char *textPtr;123 124 strcpy( chrTargetName,sourceName);125 if((textPtr=strrchr( chrTargetName, '.'))!=NULLHANDLE)122 PCHAR textPtr=NULL; 123 124 strcpy((PCHAR)chrTargetName, (PCHAR)sourceName); 125 if((textPtr=strrchr((PCHAR)chrTargetName, '.'))!=NULL) 126 126 *textPtr=0; 127 127 else 128 textPtr= chrTargetName;128 textPtr=(PCHAR)chrTargetName; 129 129 strcat(textPtr,"."); 130 strcat(textPtr, chrExt);130 strcat(textPtr, (PCHAR)chrExt); 131 131 #if 0 132 132 WinMessageBox( HWND_DESKTOP, HWND_DESKTOP, textPtr, … … 153 153 '\0', 154 154 sizeof(MMFORMATINFO) ); 155 155 156 156 mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_AUDIO; 157 mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED; 157 mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED; 158 158 ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo, 159 159 &lNumIOProcs, 160 160 0, 161 161 0 ); 162 162 163 163 if( ulReturnCode != MMIO_SUCCESS ) 164 164 { … … 181 181 return FALSE; 182 182 } 183 183 184 184 /* 185 185 * call mmioGetFormats to get info on the formats supported. … … 199 199 return FALSE; 200 200 } 201 201 202 202 if( lFormatsRead != lNumIOProcs ) 203 203 { … … 214 214 for ( index = 0, sIdx=0; index <lNumIOProcs; index++ ) 215 215 { 216 charszName[CCHMAXPATH];217 218 mmioGetFormatName(pmmFormatInfoArray, szName, &lBytesRead, 0L, 0L); 216 UCHAR szName[CCHMAXPATH]; 217 218 mmioGetFormatName(pmmFormatInfoArray, szName, &lBytesRead, 0L, 0L); 219 219 /* Insert NULL string terminator */ 220 *( szName + lBytesRead ) = (CHAR)NULL;220 *( szName + lBytesRead ) = 0; 221 221 222 222 #ifdef DEBUG 223 SysWriteToTrapLog("%d IO-Proc: %s, %s\n", index, 223 SysWriteToTrapLog("%d IO-Proc: %s, %s\n", index, 224 224 pmmFormatInfoArray->szDefaultFormatExt, 225 225 szName); … … 231 231 WinSendMsg(hwndDrop, LM_INSERTITEM,(MPARAM)LIT_END, 232 232 (MPARAM)szName); 233 234 233 234 235 235 iPrivIOProc[sIdx]=index; 236 236 237 237 #ifdef DEBUG 238 238 SysWriteToTrapLog("-- %d %d, sIdx: %d %s\n", index, iPrivIOProc[sIdx], sIdx, … … 240 240 ); 241 241 #endif 242 243 242 243 244 244 /* Set text field */ 245 245 if(bNoProcGiven) { 246 246 WinSetWindowText(hwndDrop, szName); 247 createTargetName(chrSourceName, pmmFormatInfoArray->szDefaultFormatExt);247 createTargetName(chrSourceName, (PSZ)pmmFormatInfoArray->szDefaultFormatExt); 248 248 iIoProc=iPrivIOProc[sIdx]; 249 249 bNoProcGiven=FALSE; 250 250 } 251 251 else { 252 if(!stricmp( szName,chrProcName)) {252 if(!stricmp((PCHAR)szName, (PCHAR)chrProcName)) { 253 253 WinSetWindowText(hwndDrop, szName); 254 254 /* Create target name */ 255 createTargetName(chrSourceName, pmmFormatInfoArray->szDefaultFormatExt);255 createTargetName(chrSourceName, (PSZ)pmmFormatInfoArray->szDefaultFormatExt); 256 256 iIoProc=iPrivIOProc[sIdx]; 257 257 } … … 262 262 /* 263 263 * advance to next entry in mmFormatInfo array 264 */ 264 */ 265 265 pmmFormatInfoArray++; 266 266 } … … 268 268 } 269 269 270 BOOL queryAudioInfo( char *chrFile)270 BOOL queryAudioInfo(PSZ chrFile) 271 271 { 272 272 HMMIO hmmio; … … 275 275 LONG lBytesRead=0; 276 276 APIRET rc; 277 277 278 278 memset(&mmioinfo,0, sizeof(mmioinfo)); 279 279 mmioinfo.ulTranslate = MMIO_TRANSLATEHEADER; … … 321 321 #endif 322 322 323 void _OptlinkconvertThreadFunc (void *arg)323 void convertThreadFunc (void *arg) 324 324 { 325 325 HAB hab; … … 337 337 LONG lBytesWritten=0; 338 338 ULONG rc; 339 P BYTE buffer;339 PCHAR buffer=NULL; 340 340 341 341 do { … … 349 349 if((hmmio=mmioOpen(chrSourceName, &mmioinfo,MMIO_READ))==NULLHANDLE) 350 350 { 351 chartext[500];352 snprintf( text, sizeof(text)-1,"mmioOpen error with file %s\n", chrSourceName);353 WinMessageBox(hwnd, hwnd, "",351 UCHAR text[500]; 352 snprintf((PCHAR)text, sizeof(text)-1,"mmioOpen error with file %s\n", chrSourceName); 353 WinMessageBox(hwnd, hwnd, (PSZ)"", 354 354 text, 355 355 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE ); … … 360 360 &lBytesRead, 0, 0); 361 361 if(rc!=MMIO_SUCCESS) { 362 chartext[500];362 UCHAR text[500]; 363 363 mmioClose(hmmio, 0); 364 snprintf( text, sizeof(text)-1,"mmioGetHeader error!");365 WinMessageBox(hwnd, hwnd, "",364 snprintf((PCHAR)text, sizeof(text)-1,"mmioGetHeader error!"); 365 WinMessageBox(hwnd, hwnd, (PSZ)"", 366 366 text, 367 367 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE ); … … 380 380 if((hmmioTarget=mmioOpen(chrTargetName, &mmioinfo, MMIO_WRITE|MMIO_CREATE))==NULLHANDLE) 381 381 { 382 char chrError[CCHMAXPATH];383 char text[500];382 UCHAR chrError[64]; 383 UCHAR text[CCHMAXPATH*2]; 384 384 rc=mmioGetLastError(hmmioTarget); 385 mciGetErrorString(mmioinfo.ulErrorRet ,chrError, sizeof(chrError) );386 snprintf( text, sizeof(text)-1,"mmioOpen error with file %s:\n%s\n%d", chrTargetName, chrError,mmioinfo.ulErrorRet);385 mciGetErrorString(mmioinfo.ulErrorRet ,chrError, sizeof(chrError)-1); 386 snprintf((PCHAR)text, sizeof(text)-1,"mmioOpen error with file %s:\n%s\n%lu", chrTargetName, chrError,mmioinfo.ulErrorRet); 387 387 mmioClose(hmmio,0); 388 WinMessageBox(hwnd, hwnd, "",388 WinMessageBox(hwnd, hwnd, (PSZ)"", 389 389 text, 390 390 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE ); … … 394 394 rc = mmioSetHeader(hmmioTarget, &mmAudioHeader,sizeof(MMAUDIOHEADER), 395 395 &lBytesWritten, 0, 0); 396 396 397 397 /* Get buffer */ 398 if((buffer=( void*)malloc(CONVERTBUFFERSIZE))==NULLHANDLE) {399 chartext[500];398 if((buffer=(PCHAR)malloc(CONVERTBUFFERSIZE))==NULLHANDLE) { 399 UCHAR text[500]; 400 400 mmioClose(hmmio, 0); 401 401 mmioClose(hmmioTarget,0); 402 snprintf( text, sizeof(text)-1,"Can't get memory buffer!");403 WinMessageBox(hwnd, hwnd, "",402 snprintf((PCHAR)text, sizeof(text)-1,"Can't get memory buffer!"); 403 WinMessageBox(hwnd, hwnd, (PSZ)"", 404 404 text, 405 405 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE ); 406 406 407 407 break; 408 408 } … … 421 421 }while(rc!=0 && rc!=MMIO_ERROR && !bBreak/*&& lBytesWritten <1000000*/); 422 422 if(rc==MMIO_ERROR) { 423 chartext[500];424 snprintf( text, sizeof(text)-1,"Error while reading audio data!");425 WinMessageBox(hwnd, hwnd, "",423 UCHAR text[500]; 424 snprintf((PCHAR)text, sizeof(text)-1,"Error while reading audio data!"); 425 WinMessageBox(hwnd, hwnd, (PSZ)"", 426 426 text, 427 427 0UL, MB_OK | MB_ICONEXCLAMATION|MB_MOVEABLE ); 428 428 } 429 429 if(!bBreak) { 430 charchrCommand[CCHMAXPATH*2];430 UCHAR chrCommand[CCHMAXPATH*2]; 431 431 WinSendMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTPERCENT), MPFROMLONG(100)); 432 432 /* Refresh details view */ 433 HlpSendCommandToObject(chrTargetName, "CWAUDIOREFRESH=1");434 sprintf( chrCommand,"CWAUDIOCOPYTAGTO=%s;", chrTargetName);433 HlpSendCommandToObject(chrTargetName, (PSZ)"CWAUDIOREFRESH=1"); 434 sprintf((PCHAR)chrCommand,"CWAUDIOCOPYTAGTO=%s;", chrTargetName); 435 435 HlpSendCommandToObject(chrSourceName, chrCommand); 436 436 } … … 443 443 } 444 444 while(TRUE); 445 WinSendMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTDONE), 0); 445 WinSendMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTDONE), 0); 446 446 WinDestroyMsgQueue(hmq); 447 447 } … … 464 464 MRESULT EXPENTRY decodeStatusDialogProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 465 465 { 466 chartext[CCHMAXPATH*4 +10];467 chartitle[CCHMAXPATH*4];466 UCHAR text[CCHMAXPATH*4 +10]; 467 UCHAR title[CCHMAXPATH*4]; 468 468 SWCNTRL swctl; 469 469 PID pid; … … 471 471 472 472 switch (msg) 473 { 473 { 474 474 case WM_INITDLG: 475 475 … … 493 493 494 494 WinSendMsg(WinWindowFromID(hwnd,IDST_CONVERTNAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0); 495 496 WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTCDBITS), "");497 495 496 WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTCDBITS), (PSZ)""); 497 498 498 /* Filename */ 499 499 WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTNAME), chrSourceName); 500 500 501 501 /* Set dialog font to WarpSans for Warp 4 and above */ 502 502 if(SysQueryOSRelease()>=40) { … … 507 507 508 508 /* Set percent bars to 0. */ 509 WinSetWindowText(WinWindowFromID(hwnd,IDBAR_CONVERTPROGRESS), "0#0%");509 WinSetWindowText(WinWindowFromID(hwnd,IDBAR_CONVERTPROGRESS),(PSZ)"0#0%"); 510 510 511 511 WinSendMsg(WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0); … … 516 516 /* Channels */ 517 517 getMessage(title, IDSTR_CONVERTCHANNELS, sizeof(title), RESSOURCEHANDLE, hwnd); 518 sprintf( text,title, sChannels);518 sprintf((PCHAR)text, (PCHAR)title, sChannels); 519 519 WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTCHANNELS),text); 520 520 521 521 /* Samplerate */ 522 522 getMessage(title, IDSTR_CONVERTSAMPLERATE, sizeof(title), RESSOURCEHANDLE, hwnd); 523 sprintf( text,title, iSampleRate);523 sprintf((PCHAR)text, (PCHAR)title, iSampleRate); 524 524 WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTSAMPLERATE),text); 525 525 526 526 /* Playtime */ 527 527 getMessage(title, IDSTR_CONVERTPLAYTIME, sizeof(title), RESSOURCEHANDLE, hwnd); 528 sprintf( text,title, lSec/60, lSec%60);528 sprintf((PCHAR)text, (PCHAR)title, lSec/60, lSec%60); 529 529 WinSetWindowText(WinWindowFromID(hwnd,IDST_CONVERTPLAYTIME),text); 530 530 … … 551 551 iPercent=0; 552 552 553 /* Update track percent bar value. The helper prog sends us the actual decoded %. */ 553 /* Update track percent bar value. The helper prog sends us the actual decoded %. */ 554 554 sprintf(text,"%d#%d%%", iPercent, iPercent); 555 555 WinSetWindowText(WinWindowFromID(hwnd,IDBAR_CONVERTPROGRESS), text); … … 593 593 594 594 createTargetName(chrSourceName, pMemFormatInfo[iIoProc].szDefaultFormatExt); 595 WinSetWindowText( WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), chrTargetName ); 595 WinSetWindowText( WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), chrTargetName ); 596 596 } 597 597 } … … 613 613 case IDPB_CONVERTBROWSE: 614 614 { 615 charchrTitle[200];615 UCHAR chrTitle[200]; 616 616 FILEDLG fd = { 0 }; 617 617 /* User pressed the browse button */ … … 652 652 ULONG ulDiskNum; 653 653 char cLetter; 654 654 655 655 WinQueryWindowText( WinWindowFromID(hwnd,IDEF_CONVERTTARGETNAME), sizeof(chrTargetName), chrTargetName ); 656 656 … … 669 669 if(lFreeSpace<lAudioSize) { 670 670 /* 671 Text: 672 Title: 673 */ 671 Text: 672 Title: 673 */ 674 674 getMessage(title, IDSTR_CONVERTNOSPACETEXT,sizeof(title), RESSOURCEHANDLE, hwnd); 675 675 sprintf(text,title,lAudioSize/1000000 ); … … 681 681 else { 682 682 /* Start decoding an audio file */ 683 WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTOK), FALSE); 683 WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTOK), FALSE); 684 684 WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTABORT), TRUE); 685 685 convertAudioFile(hwnd); 686 686 } 687 687 688 688 break; 689 689 } … … 695 695 break; 696 696 }/* switch */ 697 697 698 698 return WinDefDlgProc( hwnd, msg, mp1, mp2); 699 699 } … … 726 726 if(hab) { 727 727 hmq=WinCreateMsgQueue(hab,0); 728 if(hmq) { 729 /* Check if user started prog by hand */ 728 if(hmq) { 729 /* Check if user started prog by hand */ 730 730 if(argc<NUMPARAMS-1) {/* Not the actual num of params */ 731 731 pmUsage(); … … 740 740 strcpy(chrProcName, ""); 741 741 } 742 /* Get our ressource dll */ 742 /* Get our ressource dll */ 743 743 // RESSOURCEHANDLE=0; 744 744 RESSOURCEHANDLE=queryResModuleHandle(argv[0]); … … 751 751 { 752 752 /* 753 Text: 754 Title: "Installation problem" 755 */ 753 Text: 754 Title: "Installation problem" 755 */ 756 756 messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text), 757 757 title, IDSTR_INSTALLERRORTITLE , sizeof(title), … … 762 762 DosBeep(100,600); 763 763 return( 1 ); 764 } 764 } 765 765 } 766 766 } -
trunk/classes/mm-progs/imageconverter/imgconv.c
r2 r104 23 23 * If you need another license for your project/product (commercial, 24 24 * noncommercial, whatever) contact me at 25 * 25 * 26 26 * http://www.os2world.com/cdwriting 27 27 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 37 37 #define INCL_PM 38 38 39 #define USE_OS2_TOOLKIT_HEADERS 39 40 #include <os2.h> 40 41 … … 46 47 #include "os2me.h" 47 48 #include "mmioos2.h" 49 #include <mmio.h> 48 50 #include "common.h" 49 51 #include "mmres.h" … … 143 145 SIZEL ImageSize; 144 146 ULONG dwHeight, dwWidth; 145 SHORT wBitCount;146 147 FOURCC fccStorageSystem; 147 148 ULONG dwPadBytes; 148 149 ULONG dwRowBits; 149 150 ULONG ulReturnCode; 150 ULONG dwReturnCode;151 HBITMAP hbReturnCode;152 LONG lReturnCode;153 151 FOURCC fccIOProc; 154 152 HDC hdc; … … 212 210 213 211 214 dwReturnCode = mmioQueryHeaderLength ( hmmio,212 ulReturnCode = mmioQueryHeaderLength ( hmmio, 215 213 (PLONG)&ulImageHeaderLength, 216 214 0L, … … 247 245 dwHeight = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cy; 248 246 dwWidth = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cx; 249 wBitCount = mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount;250 247 dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount; 251 248 dwNumRowBytes = dwRowBits >> 3; … … 288 285 return(0L); 289 286 } 290 287 291 288 292 289 // *************************************************** … … 294 291 // the memory device context obtained above. 295 292 // *************************************************** 296 293 297 294 ImageSize.cx = dwWidth; 298 295 ImageSize.cy = dwHeight; … … 312 309 (ULONG) MB_OK | MB_MOVEABLE | 313 310 MB_ERROR ); 314 #endif 311 #endif 315 312 DevCloseDC(hdc); 316 313 DosFreeMem(pRowBuffer); … … 350 347 // Select the bitmap into the memory device context. 351 348 // *************************************************** 352 hbReturnCode = GpiSetBitmap ( hps,349 ulReturnCode = GpiSetBitmap ( hps, 353 350 hbm ); 354 351 … … 371 368 * it to work. Perhaps will get to it when time is available... 372 369 */ 373 lReturnCode = GpiSetBitmapBits ( hps,370 ulReturnCode = GpiSetBitmapBits ( hps, 374 371 (LONG) dwRowCount, 375 372 (LONG) 1, … … 379 376 380 377 /* Clean up */ 381 hbReturnCode = GpiSetBitmap ( hps,378 ulReturnCode = GpiSetBitmap ( hps, 382 379 NULLHANDLE ); 383 380 ulReturnCode = mmioClose (hmmio, 0L); … … 396 393 PBITMAPINFOHEADER2 pBmpInfoHeader2, 397 394 HWND hwnd) 398 // ULONG ulWidth, 395 // ULONG ulWidth, 399 396 // ULONG ulHeight) 400 397 { 401 398 HBITMAP hbmTarget; 402 399 SIZEL ImageSize; 403 HBITMAP hbReturnCode;404 400 HDC hdc; 405 401 HPS hps; … … 413 409 */ 414 410 WinQueryWindowPos ( hwnd, &swp); 415 411 416 412 /* Image size */ 417 413 418 414 ulHeight = bmpInfoHeader2.cy; 419 415 ulWidth = bmpInfoHeader2.cx; … … 423 419 aptl[0].x=0; 424 420 aptl[1].x=aptl[0].x+ulWidth; 425 421 426 422 aptl[0].y=0; 427 423 aptl[1].y=aptl[0].y+ulHeight; … … 429 425 else { 430 426 float fWidth, fHeight, fRes; 431 427 432 428 fWidth=(float)swp.cx/(float)ulWidth; 433 429 fHeight=(float)swp.cy/(float)ulHeight; 434 430 fRes=( fWidth>fHeight ? fHeight : fWidth); 435 436 431 432 437 433 aptl[0].x=0; 438 434 aptl[1].x=aptl[0].x+ulWidth*fRes; 439 435 440 436 aptl[0].y=0; 441 437 aptl[1].y=aptl[0].y+ulHeight*fRes; 442 438 } 443 439 444 440 aptl[2].x = 0; // source lower left 445 441 aptl[2].y = 0; 446 442 447 443 aptl[3].x = ulWidth; // source upper right 448 444 aptl[3].y = ulHeight; … … 468 464 return(0L); 469 465 } 470 466 471 467 // *************************************************** 472 468 // Create a memory presentation space that includes … … 486 482 487 483 /* Now scale the bitmap */ 488 memcpy(&bmpih2, pBmpInfoHeader2, sizeof(BITMAPINFOHEADER2)); 484 memcpy(&bmpih2, pBmpInfoHeader2, sizeof(BITMAPINFOHEADER2)); 489 485 490 486 bmpih2.cx=aptl[1].x-aptl[0].x; … … 509 505 510 506 /* Blit it */ 511 hbReturnCode =GpiSetBitmap ( hps, hbmTarget );507 GpiSetBitmap ( hps, hbmTarget ); 512 508 513 509 GpiWCBitBlt(hps, hbm,4L, aptl, ROP_SRCCOPY, BBO_IGNORE); 514 510 515 hbReturnCode =GpiSetBitmap( hps, NULLHANDLE );511 GpiSetBitmap( hps, NULLHANDLE ); 516 512 GpiDestroyPS(hps); 517 513 DevCloseDC(hdc); … … 545 541 strcat(textPtr,"."); 546 542 strcat(textPtr, chrExt); 547 543 548 544 return TRUE; 549 545 } … … 564 560 '\0', 565 561 sizeof(MMFORMATINFO) ); 566 562 567 563 mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE; 568 mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED; 564 mmFormatInfo.ulFlags|=MMIO_CANWRITETRANSLATED; 569 565 ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo, 570 566 &lNumIOProcs, 571 567 0, 572 568 0 ); 573 569 574 570 if( ulReturnCode != MMIO_SUCCESS ) 575 571 { … … 592 588 return FALSE; 593 589 } 594 590 595 591 /* 596 592 * call mmioGetFormats to get info on the formats supported. … … 610 606 return FALSE; 611 607 } 612 608 613 609 if( lFormatsRead != lNumIOProcs ) 614 610 { … … 627 623 char szName[CCHMAXPATH]; 628 624 629 mmioGetFormatName(pmmFormatInfoArray, szName, &lBytesRead, 0L, 0L); 625 mmioGetFormatName(pmmFormatInfoArray, szName, &lBytesRead, 0L, 0L); 630 626 /* Insert NULL string terminator */ 631 *( szName + lBytesRead ) = (CHAR)NULL;627 *( szName + lBytesRead ) = 0; 632 628 633 629 … … 643 639 644 640 #ifdef DEBUG 645 HlpWriteToTrapLog("------ %d private idx: %d, IO-Proc: %s %s\n", index, sIdx, 641 HlpWriteToTrapLog("------ %d private idx: %d, IO-Proc: %s %s\n", index, sIdx, 646 642 pmmFormatInfoArray->szDefaultFormatExt, 647 643 szName); 648 644 #endif 649 645 650 646 iPrivIOProc[sIdx]=index; 651 647 … … 669 665 /* 670 666 * advance to next entry in mmFormatInfo array 671 */ 667 */ 672 668 pmmFormatInfoArray++; 673 669 } … … 700 696 ULONG iIndex, iCount, iCount2; 701 697 702 MMFORMATINFO mmFormatInfo; 698 MMFORMATINFO mmFormatInfo; 703 699 FOURCC fccSourceIOProc; 704 700 FOURCC fccStorageSystem; … … 728 724 mmioinfoSource.fccIOProc = fccSourceIOProc; 729 725 mmioinfoSource.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA; 730 726 731 727 hmmioSource = mmioOpen ((PSZ)pszSource, &mmioinfoSource, 732 728 MMIO_READ | MMIO_DENYWRITE 733 729 | MMIO_NOIDENTIFY); 734 730 735 731 if (!hmmioSource) 736 732 return (FALSE); 737 733 738 734 /*******************************/ 739 735 /* Set up/open the TARGET file */ … … 743 739 mmioinfoTarget.fccIOProc = fccTargetIOProc; 744 740 mmioinfoTarget.ulTranslate = MMIO_TRANSLATEHEADER | MMIO_TRANSLATEDATA; 745 741 746 742 hmmioTarget = mmioOpen ((PSZ)pszTarget, 747 743 &mmioinfoTarget, 748 744 MMIO_CREATE | MMIO_WRITE | 749 745 MMIO_DENYWRITE | MMIO_NOIDENTIFY); 750 746 751 747 if (!hmmioTarget) 752 748 { … … 762 758 rcSrcQueryCount = mmioSendMessage(hmmioSource, MMIOM_QUERYIMAGECOUNT, (LONG)&iCount, (LONG)0); 763 759 if (rcSrcQueryCount) iCount = 1; 764 760 765 761 // find out if the target has multiple image support 766 762 rcTrgQueryCount = mmioSendMessage(hmmioTarget, MMIOM_QUERYIMAGECOUNT, (LONG)&iCount2, (LONG)0); 767 763 768 764 for (iIndex=0; iIndex<iCount; iIndex++) { /* loop through known images */ 769 765 770 766 if (!rcSrcQueryCount && !rcTrgQueryCount) { /* if Both support images */ 771 767 772 768 /* Determine if the target can write arrays, and if not */ 773 769 /* then write the the default image from the source */ 774 770 775 771 if (rcTrgSetImage && iIndex > 0) break; /* Target Can't Write array */ 776 772 777 773 /* Now, determine if the target can write arrays */ 778 774 rcTrgSetImage = mmioSendMessage (hmmioTarget, MMIOM_SETIMAGE, (LONG)iIndex, (LONG)0); 779 775 780 776 if (!rcTrgSetImage) mmioSendMessage (hmmioSource, MMIOM_SETIMAGE, (LONG)iIndex, (LONG)0); 781 777 782 778 } else if (!rcSrcQueryCount) { /* Source does but target doesn't */ 783 779 /* Use the default image from source to copy to target */ … … 806 802 (LONG)sizeof (MMIMAGEHEADER), (PLONG)&ulBytesRead, 807 803 0L, 0L); 808 804 809 805 if (rc != MMIO_SUCCESS) 810 806 /* Header unavailable */ … … 814 810 return (FALSE); 815 811 } 816 812 817 813 818 814 /*************************/ … … 828 824 } 829 825 830 826 831 827 /* Use the SAME data as came from the SOURCE FILE. It must be 832 828 compatible with the OS/2 bitmaps, etc. */ … … 834 830 (LONG)sizeof (MMIMAGEHEADER), (PLONG)&ulBytesRead, 835 831 0L, 0L); 836 832 837 833 if (rc != MMIO_SUCCESS) 838 834 /* Header unavailable */ … … 846 842 HlpWriteToTrapLog("Target header set.\n"); 847 843 #endif 848 844 849 845 /* Determine the number of bytes required, per row */ 850 846 /* PLANES MUST ALWAYS BE = 1 */ … … 853 849 dwRowBits = dwWidth * mmImgHdr.mmXDIBHeader.BMPInfoHeader2.cBitCount; 854 850 dwNumRowBytes = dwRowBits >> 3; 855 851 856 852 /* Account for odd bits used in 1bpp or 4bpp images that are NOT on byte boundaries. */ 857 853 if (dwRowBits % 8) 858 854 dwNumRowBytes++; 859 855 860 856 /* Ensure the row length in bytes accounts for byte padding. All bitmap data rows 861 857 must are aligned on LONG/4-BYTE boundaries. The data FROM an IOProc … … 880 876 881 877 if (ulBytesRead) { 882 LONG lWritten; 883 lWritten=mmioWrite (hmmioTarget, pRowBuffer, (ULONG)ulBytesRead); 878 mmioWrite (hmmioTarget, pRowBuffer, (ULONG)ulBytesRead); 884 879 #ifdef DEBUG 885 880 HlpWriteToTrapLog("ulBytesRead: %d, lWritten: %d.\n", ulBytesRead, lWritten); … … 898 893 mmioClose (hmmioSource, 0L); 899 894 DosFreeMem(pRowBuffer); 900 895 901 896 return(TRUE); 902 897 } 903 898 904 void _OptlinkconvertThreadFunc (void *arg)899 void convertThreadFunc (void *arg) 905 900 { 906 901 HAB hab; … … 916 911 chrSourceName, 917 912 chrTargetName, pMemFormatInfo[iIoProc].fccIOProc); 918 919 920 921 WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTDONE), 0); 913 914 915 916 WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTDONE), 0); 922 917 DosSleep(1000); 923 918 WinDestroyMsgQueue(hmq); … … 944 939 POINTL aptl[4]; 945 940 HPS hps; 946 BOOL bReturnCode;947 941 ULONG ulHeight; 948 942 ULONG ulWidth; … … 954 948 * Get position of image frame 955 949 */ 956 bReturnCode =WinQueryWindowPos ( hwnd, &swp);950 WinQueryWindowPos ( hwnd, &swp); 957 951 958 952 /* Center image */ … … 963 957 aptl[0].x=(swp.cx-ulWidth)/2; 964 958 aptl[1].x=aptl[0].x+ulWidth; 965 959 966 960 aptl[0].y=(swp.cy-ulHeight)/2; 967 961 aptl[1].y=aptl[0].y+ulHeight; … … 977 971 aptl[0].x=(swp.cx-ulWidth*fRes)/2; 978 972 aptl[1].x=aptl[0].x+ulWidth*fRes; 979 973 980 974 aptl[0].y=(swp.cy-ulHeight*fRes)/2; 981 975 aptl[1].y=aptl[0].y+ulHeight*fRes; 982 976 } 983 977 984 978 aptl[2].x = 0; // source lower left 985 979 aptl[2].y = 0; 986 980 987 981 aptl[3].x = ulWidth; // source upper right 988 982 aptl[3].y = ulHeight; … … 1004 998 // WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL)aptl, 0, 0, DBM_NORMAL/*|DBM_STRETCH*/); 1005 999 #endif 1006 bReturnCode =WinEndPaint (hps);1000 WinEndPaint (hps); 1007 1001 } 1008 1002 … … 1011 1005 1012 1006 switch (msg) 1013 { 1007 { 1014 1008 case WM_PAINT: 1015 1009 { … … 1036 1030 1037 1031 switch (msg) 1038 { 1032 { 1039 1033 case WM_INITDLG: 1040 1034 #if 0 … … 1047 1041 1048 1042 WinSendMsg(WinWindowFromID(hwnd,IDST_IMGCONVERTNAME),EM_SETTEXTLIMIT,MPFROMSHORT((SHORT)CCHMAXPATH),0); 1049 1043 1050 1044 /* Filename */ 1051 1045 WinSetWindowText(WinWindowFromID(hwnd,IDST_IMGCONVERTNAME), chrSourceName); 1052 1046 1053 1047 /* Set dialog font to WarpSans for Warp 4 and above */ 1054 1048 if(SysQueryOSRelease()>=40) { … … 1112 1106 iPercent=0; 1113 1107 1114 /* Update track percent bar value. The helper prog sends us the actual decoded %. */ 1108 /* Update track percent bar value. The helper prog sends us the actual decoded %. */ 1115 1109 sprintf(text,"%d#%d%%", iPercent, iPercent); 1116 1110 WinSetWindowText(WinWindowFromID(hwnd,IDBAR_IMGCONVERTPROGRESS), text); … … 1149 1143 1150 1144 createTargetName(chrSourceName, pMemFormatInfo[iIoProc].szDefaultFormatExt); 1151 WinSetWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), chrTargetName ); 1145 WinSetWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), chrTargetName ); 1152 1146 } 1153 1147 } … … 1210 1204 // ULONG ulDiskNum; 1211 1205 // char cLetter; 1212 1206 1213 1207 /* Get target name */ 1214 WinQueryWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), 1208 WinQueryWindowText( WinWindowFromID(hwnd,IDEF_IMGCONVERTTARGETNAME), 1215 1209 sizeof(chrTargetName), chrTargetName ); 1216 1210 #if 0 … … 1225 1219 if(lFreeSpace<lAudioSize) { 1226 1220 /* 1227 Text: 1228 Title: 1229 */ 1221 Text: 1222 Title: 1223 */ 1230 1224 getMessage(title, IDSTR_CONVERTNOSPACETEXT,sizeof(title), RESSOURCEHANDLE, hwnd); 1231 1225 sprintf(text,title,lAudioSize/1000000 ); … … 1237 1231 else { 1238 1232 /* Start decoding an audio file */ 1239 WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTOK), FALSE); 1233 WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTOK), FALSE); 1240 1234 WinEnableWindow( WinWindowFromID(hwnd,IDPB_CONVERTABORT), TRUE); 1241 1235 convertAudioFile(hwnd); … … 1244 1238 /* Start converting image file */ 1245 1239 WinPostMsg(hwnd, WM_APPTERMINATENOTIFY, MPFROMLONG(MSG_CONVERTPERCENT), MPFROMLONG(0)); 1246 WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTOK), FALSE); 1240 WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTOK), FALSE); 1247 1241 WinEnableWindow( WinWindowFromID(hwnd,IDPB_IMGCONVERTABORT), TRUE); 1248 1242 convertImageFile(hwnd); … … 1256 1250 break; 1257 1251 }/* switch */ 1258 1252 1259 1253 return WinDefDlgProc( hwnd, msg, mp1, mp2); 1260 1254 } … … 1283 1277 if(hab) { 1284 1278 hmq=WinCreateMsgQueue(hab,0); 1285 if(hmq) { 1286 /* Check if user started prog by hand */ 1279 if(hmq) { 1280 /* Check if user started prog by hand */ 1287 1281 if(argc<NUMPARAMS-1) {/* Not the right num of params */ 1288 1282 pmUsage(); … … 1297 1291 strcpy(chrProcName, ""); 1298 1292 } 1299 /* Get our ressource dll */ 1293 /* Get our ressource dll */ 1300 1294 // RESSOURCEHANDLE=0; 1301 1295 RESSOURCEHANDLE=queryResModuleHandle(argv[0]); … … 1304 1298 /* Register the percent bar window class */ 1305 1299 percentRegisterBarClass(); 1306 1307 globalHab=WinQueryAnchorBlock(HWND_DESKTOP); 1300 1301 globalHab=WinQueryAnchorBlock(HWND_DESKTOP); 1308 1302 hBitmap=loadBitmap ( chrSourceName, &bmpInfoHeader2); 1309 1310 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 1303 1304 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 1311 1305 RESSOURCEHANDLE, IDDLG_IMGCONVERT, 0) == DID_ERROR ) 1312 1306 { … … 1314 1308 char title[CCHMAXPATH]; 1315 1309 /* 1316 Text: 1317 Title: "Installation problem" 1318 */ 1310 Text: 1311 Title: "Installation problem" 1312 */ 1319 1313 messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text), 1320 1314 title, IDSTR_INSTALLERRORTITLE , sizeof(title), … … 1329 1323 return( 1 ); 1330 1324 } 1331 if(pMemFormatInfo) 1325 if(pMemFormatInfo) 1332 1326 free(pMemFormatInfo); 1333 1327 if(hBitmap) -
trunk/classes/mm-progs/include/mmprogs_defaults.h
r4 r104 17 17 * If you need another license for your project/product (commercial, 18 18 * noncommercial, whatever) contact me at 19 * 19 * 20 20 * http://www.os2world.com/cdwriting 21 21 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 34 34 /* Audio player */ 35 35 #define DEFAULT_VOLUME 75 /* Default volume for audio player (not volume object) */ 36 #define INI_MMPLAYER_APP "mmplayer" /* App name to use */37 #define INI_DISPLAY_KEY "displaytype" /* Key for storing which display to show */38 #define INI_VOLUME_KEY "volume" /* Key for storing the volume */36 #define INI_MMPLAYER_APP (PSZ)"mmplayer" /* App name to use */ 37 #define INI_DISPLAY_KEY (PSZ)"displaytype" /* Key for storing which display to show */ 38 #define INI_VOLUME_KEY (PSZ)"volume" /* Key for storing the volume */ 39 39 40 40 /* Image converter */ 41 #define INI_IMGCONV_APP 41 #define INI_IMGCONV_APP (PSZ)"imageconv" 42 42 43 43 /* Audio converter */ 44 #define INI_AUDIOCONV_APP 44 #define INI_AUDIOCONV_APP (PSZ)"audioconv" 45 45 46 46 /* Master volume */ 47 #define INI_VOLUME_APP "volume"47 #define INI_VOLUME_APP (PSZ)"volume" 48 48 49 49 /* Volume for classes */ 50 #define INI_CLASSVOLUME_APP 50 #define INI_CLASSVOLUME_APP (PSZ)"classvolume" 51 51 52 52 /* For setting volume */ 53 #define SETUP_MMAUDIOVOLUME 53 #define SETUP_MMAUDIOVOLUME (PSZ)"MMAUDIOVOLUME" -
trunk/classes/mm-progs/makefile
r2 r104 7 7 8 8 CC = gcc 9 LIB_DIR = $d:/emx/lib 10 #CPPFLAGS = -Ge- /Gm+ -G4 -Gl /O+ -Oc+ -Ol 11 CPPFLAGS = -O -Wall -Zomf -Zcrtdll -s 9 CPPFLAGS = -O -Wno-pointer-sign -Wall -Zomf -Zcrtdll -s 12 10 INC = ./include -I ../../classes/inc -I ../../common_functions/include 13 DEFS = 14 PROGS = 11 DEFS = 12 PROGS = 15 13 ODIR = . 16 14 CPPDIR = . … … 22 20 23 21 $(LIBDIR)/%.obj: $(COMMONSRC)/%.c 24 gcc -c -W all -o$@ -Zomf -I$(INC) $<22 gcc -c -Wno-pointer-sign -Wall -o$@ -Zomf -I$(INC) $< 25 23 26 24 all: $(LIBOBJS) … … 48 46 -cd ./mmplayer && make cleaner 49 47 -cd ./master_volume && make cleaner 50 -rm ./include/*.*~ 48 -rm ./include/*.*~ 51 49 52 50 -
trunk/classes/mm-progs/master_volume/makefile
r53 r104 17 17 volume.exe: volume.c $(OBJECTS) makefile def.tpl 18 18 cmd /C $(TOOLDIR)\create_MMPROG_def.cmd volume.def 19 $(CC) $(CPPFLAGS) -I$(INC) volume.c $(OBJECTS) - Zmt -lmmpm2.lib volume.def19 $(CC) $(CPPFLAGS) -I$(INC) volume.c $(OBJECTS) -lmmpm2.lib volume.def 20 20 rc -I $(INC) volume.rc volume.exe 21 21 -
trunk/classes/mm-progs/master_volume/volume.c
r2 r104 17 17 * along with this program; see the file COPYING. If not, write to 18 18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 19 */ 20 20 /* 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 35 35 #define INCL_MMIOOS2 36 36 #define INCL_MCIOS2 37 #define INCL_SECONDARYWINDOW 38 #define INCL_GRAPHICBUTTON 37 #define INCL_SECONDARYWINDOW 38 #define INCL_GRAPHICBUTTON 39 39 #include <os2.h> 40 40 #include <sw.h> … … 73 73 BOOL bHaveWindowPos=FALSE; 74 74 75 BOOL bMute=FALSE; 75 BOOL bMute=FALSE; 76 76 HMODULE RESSOURCEHANDLE=0; 77 77 int bTBVisible=0; … … 134 134 135 135 /* Masteraudio does not support NOTIFY so use a thread to prevent PM freeze */ 136 MRESULT EXPENTRY volumeObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 136 MRESULT EXPENTRY volumeObjectProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 137 137 { 138 138 switch(msg) … … 153 153 ULONG mastervolume; /* Set to master volumepercentage 154 154 percentage by this example */ 155 155 156 156 USHORT usDeviceID=0; 157 157 MCI_MASTERAUDIO_PARMS masteraudioparms; … … 161 161 memset(&openParms,0, sizeof(openParms)); 162 162 openParms.pszDeviceType="Masteraudio"; 163 163 164 164 rc=mciSendCommand(0, /* Device */ 165 165 MCI_OPEN, /* Master audio message */ … … 171 171 mciGetErrorString(rc,chrCommand, sizeof(chrCommand)); 172 172 //sprintf(chrCommand, "%x", rc); 173 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "", 1234, MB_MOVEABLE); 173 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, chrCommand, "", 1234, MB_MOVEABLE); 174 174 DosBeep(5000, 10); 175 175 usDeviceID=openParms.usDeviceID; … … 178 178 /* Get current system master 179 179 volume setting */ 180 180 181 181 mciSendCommand(usDeviceID, /* Device */ 182 182 MCI_MASTERAUDIO, /* Master audio message */ … … 188 188 /* Get current system master 189 189 volume setting */ 190 190 191 191 mciSendCommand(usDeviceID, /* Device */ 192 192 MCI_MASTERAUDIO, /* Master audio message */ … … 195 195 (PVOID) &masteraudioparms, /* Data structure */ 196 196 0); /* User parm */ 197 197 198 198 mastervolume = masteraudioparms.ulReturn; 199 199 DosBeep(500, 10); … … 228 228 } 229 229 230 void _OptlinkvolumeThreadFunc (void *arg)230 void volumeThreadFunc (void *arg) 231 231 { 232 232 HAB hab; … … 238 238 hmq=WinCreateMsgQueue(hab,0); 239 239 if(hmq) { 240 240 241 241 if((hwndThread=WinCreateWindow(HWND_OBJECT, WC_STATIC, "", 0,0,0,0,0, NULLHANDLE, 242 242 HWND_BOTTOM, 1, NULLHANDLE, NULLHANDLE))==NULLHANDLE) { … … 245 245 } 246 246 WinSubclassWindow(hwndThread,&volumeObjectProc); 247 /* Window created. */ 247 /* Window created. */ 248 248 249 249 while(WinGetMsg(hab,&qmsg,(HWND)NULL,0,0)) 250 250 WinDispatchMsg(hab,&qmsg); 251 251 WinDestroyWindow(hwndThread); 252 252 253 253 WinDestroyMsgQueue(hmq); 254 254 } … … 267 267 if((hwndTitleBar=WinWindowFromID(hwnd, FID_TITLEBAR))==NULLHANDLE) 268 268 return; 269 269 270 270 hwndPopup = WinLoadMenu(hwnd, RESSOURCEHANDLE, IDM_POPUP); 271 271 if (hwndPopup == NULLHANDLE) 272 272 return; 273 273 274 274 bVisible=WinIsWindowVisible(hwndTitleBar); 275 275 276 276 if(!bVisible) 277 WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(IDM_ITEMTITLEBAR,FALSE), 277 WinSendMsg(hwndPopup,MM_SETITEMATTR,MPFROM2SHORT(IDM_ITEMTITLEBAR,FALSE), 278 278 MPFROM2SHORT(MIA_CHECKED,MIA_CHECKED)); 279 279 280 280 WinQueryPointerPos(HWND_DESKTOP, &ptl) ; 281 281 WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1); 282 WinPopupMenu(hwnd, hwnd, hwndPopup, 282 WinPopupMenu(hwnd, hwnd, hwndPopup, 283 283 ptl.x, ptl.y, IDM_ITEMEXIT, PU_HCONSTRAIN | PU_VCONSTRAIN | 284 284 PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE ); … … 296 296 if(!WinQueryWindowPos(hwndTitleBar,&swp)) 297 297 return FALSE; 298 298 299 299 if(!WinQueryWindowPos(hwnd,&swpFrame)) 300 300 return FALSE; 301 301 302 302 /* Shrink or expand the frame */ 303 303 if(!bTBVisible) { 304 WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//-swp.cy, 304 WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//-swp.cy, 305 305 swpFrame.cx, swpFrame.cy+swp.cy, SWP_SIZE|SWP_MOVE); 306 306 bTBVisible=TRUE; … … 308 308 else 309 309 { 310 WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//+swp.cy, 310 WinSetWindowPos(hwnd, NULLHANDLE, swpFrame.x, swpFrame.y,//+swp.cy, 311 311 swpFrame.cx, swpFrame.cy-swp.cy, SWP_SIZE|SWP_MOVE); 312 312 bTBVisible=FALSE; 313 313 } 314 314 } 315 WinSendMsg(hwnd,WM_UPDATEFRAME,0,0); 315 WinSendMsg(hwnd,WM_UPDATEFRAME,0,0); 316 316 return TRUE; 317 317 } … … 326 326 327 327 switch (msg) 328 { 328 { 329 329 case WM_INITDLG: 330 330 { … … 345 345 (MPARAM) 0L, 346 346 (MPARAM) 100L); 347 347 348 348 WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME), 349 349 CSM_SETINCREMENT, 350 350 (MPARAM) 10L, 351 351 (MPARAM) 1L); 352 353 352 353 354 354 WinSendMsg( WinWindowFromID(hwnd, IDCS_VOLUME), 355 355 CSM_SETVALUE, 356 356 (MPARAM) queryMasterVolume(), 357 357 (MPARAM) NULL); 358 359 358 359 360 360 // getMessage(title, IDSTR_CONVERTCHANNELS, sizeof(title), RESSOURCEHANDLE, hwnd); 361 361 /* Set dialog font to WarpSans for Warp 4 and above */ … … 365 365 DEFAULT_DIALOG_FONT ); 366 366 } 367 367 368 368 hpProgramIcon = 369 369 WinLoadPointer( … … 371 371 (HMODULE) NULL, /* Resource is kept in .Exe file. */ 372 372 ID_ICONVOLUME ); /* Which icon to use. */ 373 373 374 374 WinSendMsg( 375 375 hwnd, /* Dialog window handle. */ … … 399 399 PP_BACKGROUNDCOLOR,(ULONG)sizeof(rgb), &rgb); 400 400 } 401 ulSize=sizeof(RGB); 401 ulSize=sizeof(RGB); 402 402 if(IniRestoreData(chrIniFile, INI_VOLUME_APP, INI_BTNFGCLR_KEY, &rgb, &ulSize)) 403 403 { … … 428 428 /* Remove top frame controls if titlebar is hidden */ 429 429 SHORT countSwp; 430 430 431 431 countSwp = (int) WinDefDlgProc(hwnd, msg, mp1, mp2); 432 432 if(countSwp) { 433 if(bTBVisible==0) { 434 /* Hide frame controls */ 433 if(bTBVisible==0) { 434 /* Hide frame controls */ 435 435 /* countSWP: number of standard framecontrols 436 436 pswp: Array of SWP describing the framecontrols. … … 439 439 PSWP pswpTB=NULLHANDLE; 440 440 PSWP pswp=(PSWP)mp1; 441 int y , cy;441 int y; 442 442 443 443 for (a = 0; a < countSwp; a++) … … 448 448 pswpTB=&pswp[a]; 449 449 y=pswp[a].y; 450 cy=pswp[a].cy;451 450 // DosBeep(500,600); 452 451 break; … … 485 484 case WM_BUTTON1MOTIONSTART: 486 485 /* Drag the window without titlebar */ 487 WinSendMsg(hwnd, WM_TRACKFRAME, 486 WinSendMsg(hwnd, WM_TRACKFRAME, 488 487 MPFROMSHORT(TF_MOVE /*| TF_SETPOINTERPOS */), NULL) ; 489 488 return (MRESULT) 0 ; … … 504 503 { 505 504 if (SHORT2FROMMP(mp1)==GBN_BUTTONDOWN) { 506 bMute=TRUE; 505 bMute=TRUE; 507 506 setMasterVolume(hwnd, 0); 508 507 } 509 508 else if (SHORT2FROMMP(mp1)==GBN_BUTTONUP) { 510 509 SHORT sValue; 511 510 512 511 bMute=FALSE; 513 512 WinSendMsg(WinWindowFromID(hwnd, IDCS_VOLUME),CSM_QUERYVALUE ,MPFROMP(&sValue) ,0); … … 524 523 memset(&masteraudioparms,0, sizeof(masteraudioparms)); 525 524 /* Save master audio level */ 526 mciSendCommand( 0, 525 mciSendCommand( 0, 527 526 MCI_MASTERAUDIO, /* Master audio message */ 528 527 MCI_WAIT | MCI_MASTERVOL | MCI_SAVESETTING, … … 594 593 bTBVisible=IniRestoreInt(chrIniFile, INI_VOLUME_APP, INI_TBVISIBLE_KEY, 1); 595 594 596 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, 595 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, 597 596 volumeDialogProc, RESSOURCEHANDLE, IDDLG_VOLUME, 0) == DID_ERROR ) 598 597 { 599 598 /* 600 Text: 601 Title: "Installation problem" 599 Text: 600 Title: "Installation problem" 602 601 */ 603 602 #if 0 … … 605 604 title, IDSTR_INSTALLERRORTITLE , sizeof(title), 606 605 RESSOURCEHANDLE, HWND_DESKTOP, MB_OK | MB_ICONEXCLAMATION | MB_MOVEABLE); 607 #endif 606 #endif 608 607 WinDestroyMsgQueue( hmq ); 609 608 WinTerminate( hab ); … … 637 636 (MPARAM) NULL); 638 637 while ( WinGetMsg( hab, (PQMSG) &qmsg, (HWND) NULL, 0, 0) ) 639 WinDispatchMsg( hab, (PQMSG) &qmsg ); 638 WinDispatchMsg( hab, (PQMSG) &qmsg ); 640 639 #endif 641 640 freeResHandle(); -
trunk/classes/mm-progs/mmfind/image.c
r4 r104 26 26 POINTL aptl[4]; 27 27 HPS hps; 28 BOOL bReturnCode;29 28 ULONG ulHeight; 30 29 ULONG ulWidth; … … 37 36 * Get position of image frame 38 37 */ 39 bReturnCode =WinQueryWindowPos ( hwnd, &swp);38 WinQueryWindowPos ( hwnd, &swp); 40 39 41 40 WinQueryWindowRect(hwnd, &rectl); … … 48 47 aptl[0].x=(swp.cx-ulWidth)/2; 49 48 aptl[1].x=aptl[0].x+ulWidth; 50 49 51 50 aptl[0].y=(swp.cy-ulHeight)/2; 52 51 aptl[1].y=aptl[0].y+ulHeight; … … 62 61 aptl[0].x=(swp.cx-ulWidth*fRes)/2; 63 62 aptl[1].x=aptl[0].x+ulWidth*fRes; 64 63 65 64 aptl[0].y=(swp.cy-ulHeight*fRes)/2; 66 65 aptl[1].y=aptl[0].y+ulHeight*fRes; 67 66 } 68 67 69 68 aptl[2].x = 0; // source lower left 70 69 aptl[2].y = 0; 71 70 72 71 aptl[3].x = ulWidth; // source upper right 73 72 aptl[3].y = ulHeight; … … 89 88 // WinDrawBitmap(hps, hBitmap, NULLHANDLE, (PPOINTL)aptl, 0, 0, DBM_NORMAL/*|DBM_STRETCH*/); 90 89 #endif 91 bReturnCode =WinEndPaint (hps);90 WinEndPaint (hps); 92 91 } 93 92 … … 96 95 97 96 switch (msg) 98 { 97 { 99 98 case WM_PAINT: 100 99 { … … 276 275 return(0L); 277 276 } 278 277 279 278 280 279 // *************************************************** … … 282 281 // the memory device context obtained above. 283 282 // *************************************************** 284 283 285 284 ImageSize.cx = dwWidth; 286 285 ImageSize.cy = dwHeight; … … 300 299 (ULONG) MB_OK | MB_MOVEABLE | 301 300 MB_ERROR ); 302 #endif 301 #endif 303 302 DevCloseDC(hdc); 304 303 DosFreeMem(pRowBuffer); -
trunk/classes/mm-progs/mmfind/mmfind.c
r4 r104 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 73 73 BOOL bIsMidi=FALSE; /* No MIDI support atm */ 74 74 BOOL bIsPlaying=FALSE; /* TRUE if currently playing */ 75 BOOL bPaused=FALSE; 75 BOOL bPaused=FALSE; 76 76 ULONG ulPos; 77 77 ULONG ulTotalLength; … … 120 120 hps=WinGetPS(HWND_DESKTOP); 121 121 122 /* Play */ 122 /* Play */ 123 123 hbmPlay=GpiLoadBitmap(hps, hResource, IDBMP_PLAY, 0, 0); 124 124 … … 143 143 ulStyle|=(BS_BITMAP); 144 144 ulStyle&=~BS_TEXT; 145 145 146 146 if(WinSetWindowULong(hwndTemp, QWL_STYLE, ulStyle)) { 147 147 memset(&btCtrl, 0, sizeof(btCtrl)); … … 163 163 ulStyle|=(BS_BITMAP); 164 164 ulStyle&=~BS_TEXT; 165 165 166 166 if(WinSetWindowULong(hwndTemp, QWL_STYLE, ulStyle)) { 167 167 memset(&btCtrl, 0, sizeof(btCtrl)); … … 199 199 if(!MsgGetMessage(audioText, IDSTR_AUDIOINFOTEXT, sizeof(audioText), hResMod,HWND_DESKTOP)) 200 200 strcpy(audioText, TEXT_INFOTEXT); 201 if(!MsgGetMessage(chrMediaFileTypes[MT_AUDIO], IDSTR_TYPEAUDIO, 201 if(!MsgGetMessage(chrMediaFileTypes[MT_AUDIO], IDSTR_TYPEAUDIO, 202 202 sizeof(chrMediaFileTypes[MT_AUDIO]), hResMod, HWND_DESKTOP)) 203 203 strcpy(chrMediaFileTypes[MT_AUDIO], TEXT_TYPEAUDIO); 204 if(!MsgGetMessage(chrMediaFileTypes[MT_IMAGE], IDSTR_TYPEIMAGE, 204 if(!MsgGetMessage(chrMediaFileTypes[MT_IMAGE], IDSTR_TYPEIMAGE, 205 205 sizeof(chrMediaFileTypes[MT_IMAGE]), hResMod, HWND_DESKTOP)) 206 206 strcpy(chrMediaFileTypes[MT_AUDIO], TEXT_TYPEIMAGE); 207 if(!MsgGetMessage(chrMediaFileTypes[MT_VIDEO], IDSTR_TYPEVIDEO, 207 if(!MsgGetMessage(chrMediaFileTypes[MT_VIDEO], IDSTR_TYPEVIDEO, 208 208 sizeof(chrMediaFileTypes[MT_VIDEO]), hResMod, HWND_DESKTOP)) 209 209 strcpy(chrMediaFileTypes[MT_VIDEO], TEXT_TYPEVIDEO); … … 272 272 char chrCommand[50]; 273 273 char retMsg[100]; 274 ULONG rc;275 274 276 275 if(bIsPlaying) { 277 276 sprintf(chrCommand,"stop wave%ld wait", hwndNotify); 278 rc =mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);279 277 mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 278 280 279 sprintf(chrCommand,"close wave%ld wait", hwndNotify); 281 rc =mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);282 283 #if 0 280 mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 281 282 #if 0 284 283 _resetDisplay(hwndFrame); 285 284 showPlayTimeDisplay( hwndFrame, TRUE); … … 287 286 #endif 288 287 bIsPlaying=FALSE; 289 bPaused=FALSE; 288 bPaused=FALSE; 290 289 } 291 290 … … 319 318 strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice)); 320 319 321 /* Start audio file */ 320 /* Start audio file */ 322 321 sprintf(chrCommand,"open \"%s\" type %s alias wave%ld SHAREABLE wait", chrSourceName, chrDevice, hwndNotify); 323 322 … … 326 325 if((rc & 0x0000ffff)!=MCIERR_SUCCESS) 327 326 return 0; 328 327 329 328 /* Set time format */ 330 329 sprintf(chrCommand,"SET wave%ld TIME FORMAT MILLISECONDS wait", hwndNotify); … … 334 333 rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0); 335 334 return 0; 336 } 335 } 337 336 338 337 #if 0 … … 420 419 421 420 /* Every folder has one running play thread to handle play commands */ 422 void _OptlinkplayThreadFunc (void *arg)421 void playThreadFunc (void *arg) 423 422 { 424 423 HAB hab; … … 488 487 if(MMIO_SUCCESS!=mmioIdentifyFile(chrFile, &mmioInfo, &mmFormatInfo, &fourCC, 0,0)) 489 488 { 490 return MT_UNKNOWN; 489 return MT_UNKNOWN; 491 490 } 492 491 … … 539 538 } 540 539 /* Fill combo box with media types (audio, image, video) */ 541 for(a=0;a<NUMMEDIATYPES;a++) 542 WinSendMsg(WinWindowFromID(hwnd, IDCB_TYPEOFFILE), LM_INSERTITEM, MRFROMSHORT(LIT_SORTASCENDING), 540 for(a=0;a<NUMMEDIATYPES;a++) 541 WinSendMsg(WinWindowFromID(hwnd, IDCB_TYPEOFFILE), LM_INSERTITEM, MRFROMSHORT(LIT_SORTASCENDING), 543 542 MPFROMP(chrMediaFileTypes[a])); 544 543 WinSetWindowText(WinWindowFromID(hwnd, IDCB_TYPEOFFILE), chrMediaFileTypes[0]); … … 681 680 mmio.ulFlags=MMIO_READ; 682 681 mmio.ulTranslate=MMIO_TRANSLATEHEADER; 683 682 684 683 hmmio = mmioOpen(chrFullName, &mmio, MMIO_READ); 685 684 if(!hmmio) … … 689 688 rc = mmioGetHeader(hmmio, &mmAudioHeader,sizeof(MMAUDIOHEADER), 690 689 &lBytesRead, 0, 0); 691 690 692 691 mmioClose(hmmio, 0); 693 692 if(rc!=MMIO_SUCCESS) { … … 785 784 APIRET rc; /* return code from REXX */ 786 785 SHORT rexxrc = 0; /* return code from function */ 787 char theScript[CCHMAXPATH]; 786 char theScript[CCHMAXPATH]; 788 787 /* By setting the strlength of the output RXSTRING to zero, we */ 789 788 /* force the interpreter to allocate memory and return it to us. */ 790 789 /* We could provide a buffer for the interpreter to use instead. */ 791 790 rexxretval.strlength = 0L; /* initialize return to empty*/ 792 791 793 792 sprintf(theScript, "%s\\%s", pszBinDir, rexxFile); 794 793 … … 807 806 #if 0 808 807 if(rc) { 809 sprintf(text,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 808 sprintf(text,"Error in the Rexx skript %s\n\n Get more information with 'help REX%04d'.\n", 810 809 tPt->rexxSkript, rc*-1); 811 810 WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, text, "", 1234, MB_OK|MB_MOVEABLE|MB_ERROR); … … 822 821 } 823 822 if(rexxretval.strptr) 824 DosFreeMem(rexxretval.strptr); /* Release storage given to us by REXX. */ 823 DosFreeMem(rexxretval.strptr); /* Release storage given to us by REXX. */ 825 824 if(!rc) 826 825 return TRUE; … … 845 844 '\0', 846 845 sizeof(MMFORMATINFO) ); 847 846 848 847 mmFormatInfo.ulMediaType |= MMIO_MEDIATYPE_IMAGE; 849 mmFormatInfo.ulFlags|=MMIO_CANREADTRANSLATED;/* Read !!!*/ 848 mmFormatInfo.ulFlags|=MMIO_CANREADTRANSLATED;/* Read !!!*/ 850 849 ulReturnCode = mmioQueryFormatCount ( &mmFormatInfo, 851 850 &lNumIOProcs, 852 851 0, 853 852 0 ); 854 853 855 854 if( ulReturnCode != MMIO_SUCCESS ) 856 855 { … … 873 872 return FALSE; 874 873 } 875 874 876 875 /* 877 876 * call mmioGetFormats to get info on the formats supported. … … 891 890 return FALSE; 892 891 } 893 892 894 893 if( lFormatsRead != lNumIOProcs ) 895 894 { … … 919 918 } 920 919 } 921 } 920 } 922 921 /* 923 922 * advance to next entry in mmFormatInfo array 924 */ 923 */ 925 924 pmmFormatInfoArray++; 926 925 } … … 952 951 if(hab) { 953 952 hmq=WinCreateMsgQueue(hab,0); 954 if(hmq) { 955 /* Check if user started prog by hand */ 953 if(hmq) { 954 /* Check if user started prog by hand */ 956 955 if(argc!=NUMPARAMS) {/* Not the right num of params */ 957 956 pmUsage(); 958 957 } 959 958 else { 960 HWND hwndDlg; 961 962 /* Get our ressource dll */ 959 HWND hwndDlg; 960 961 /* Get our ressource dll */ 963 962 RESSOURCEHANDLE=queryResModuleHandle(argv[0]); 964 963 /* Load NLV strings */ … … 1031 1030 { 1032 1031 if(hBitmap) 1033 GpiDeleteBitmap(hBitmap); 1032 GpiDeleteBitmap(hBitmap); 1034 1033 if( fd.lReturn == DID_OK ) 1035 1034 { … … 1056 1055 { 1057 1056 HOBJECT hObject; 1058 char *chr;1059 1057 if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE) 1060 1058 WinOpenObject(hObject, ID_MENU_PLAYER /* OPEN_DEFAULT */, TRUE); 1061 1059 #if 0 1062 1060 /* Open folder */ 1063 if((chr=strrchr(fd.szFullFile, '\\'))!=NULLHANDLE) { 1064 *chr=0; 1061 if(strrchr(fd.szFullFile, '\\')!=NULLHANDLE) { 1065 1062 if((hObject=WinQueryObject(fd.szFullFile))!=NULLHANDLE) 1066 1063 WinOpenObject(hObject, OPEN_CONTENTS, TRUE); -
trunk/classes/mm-progs/mmprog.inc
r53 r104 2 2 3 3 CC = gcc 4 CPPFLAGS = -O -W all -Zomf -Zmt -s4 CPPFLAGS = -O -Wno-pointer-sign -Wall -Zomf -Zmt -s 5 5 #CPPFLAGS = -O -Zomf -Zcrtdll -Zmtd -s 6 6 7 7 INC = ../include -I ../../../classes/inc -I $(COMMONSRC)/include 8 8 # Fixme GKY 4-15-23 9 LIB_DIR = $d:/emx/lib 9 LIB_DIR = $d:/emx/lib 10 10 TOOLDIR = .\.. 11 11 LIBDIR = ../lib 12 DEFS = 13 PROGS = 12 DEFS = 13 PROGS = 14 14 ODIR = 15 15 CPPDIR = 16 16 17 $(LIBDIR)/%.obj: $(COMMONSRC)/%.c 18 $(CC) -c -W all -o$@ -Zomf -I$(INC) $<17 $(LIBDIR)/%.obj: $(COMMONSRC)/%.c 18 $(CC) -c -Wno-pointer-sign -Wall -o$@ -Zomf -I$(INC) $< 19 19 20 20 %.obj: %.c 21 $(CC) -c -W all -o$@ -Zomf -I$(INC) $<21 $(CC) -c -Wno-pointer-sign -Wall -o$@ -Zomf -I$(INC) $< 22 22 23 23 -
trunk/classes/mm-progs/videoplayer/mmplayer.c
r46 r104 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 55 55 #include "sys_funcs.h" 56 56 57 #ifndef OPEN_DEFAULT 57 #ifndef OPEN_DEFAULT 58 58 /* Open views for the wpOpen() method */ 59 59 … … 140 140 141 141 /* Every folder has one running play thread to handle play commands */ 142 void _OptlinkplayThreadFunc (void *arg);142 void playThreadFunc (void *arg); 143 143 void controlPlaying(HWND hwndDialog, ULONG ulAction, ULONG ulReserved); 144 144 BOOL stopAudioFile(HWND hwndFrame); … … 216 216 WinQueryPointerPos(HWND_DESKTOP, &ptl) ; 217 217 WinMapWindowPoints(HWND_DESKTOP,hwnd,&ptl,1); 218 WinPopupMenu(hwnd, hwnd, hwndPopup, 218 WinPopupMenu(hwnd, hwnd, hwndPopup, 219 219 ptl.x, ptl.y, 0, PU_HCONSTRAIN | PU_VCONSTRAIN | 220 PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE ); 221 220 PU_KEYBOARD | PU_MOUSEBUTTON1 | PU_MOUSEBUTTON2 | PU_NONE ); 221 222 222 } 223 223 … … 232 232 hResource=BMP_RESSOURCEHANDLE; //_queryResModuleHandle(); 233 233 hps=WinGetPS(HWND_DESKTOP); 234 234 235 235 /* The main BMP */ 236 236 allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPMIDDLE, 0, 0); … … 332 332 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft,ci.rclSource.yBottom, 333 333 ci.rclSource.xRight-ci.rclSource.xLeft, 334 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 334 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 335 335 oldPlayTimeProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), playTimeTextProc); 336 336 337 337 /* Pos slider */ 338 338 ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider; 339 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 339 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 340 340 hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE); 341 341 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom, 342 342 ci.rclSource.xRight-ci.rclSource.xLeft, 343 343 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE); 344 344 345 345 WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO, 346 346 MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0), 347 MPFROM2SHORT( 9, 9)); 347 MPFROM2SHORT( 9, 9)); 348 348 349 349 /* Vol slider */ 350 350 ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider; 351 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 351 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 352 352 hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE); 353 353 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom, … … 356 356 WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO, 357 357 MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0), 358 MPFROM2SHORT( 9, 9)); 358 MPFROM2SHORT( 9, 9)); 359 359 360 360 } … … 375 375 if((rc & 0x0000ffff)!=MCIERR_SUCCESS) { 376 376 /* Problem with MCI. Clean up. The Timer will be stopped in the method */ 377 stopAudioFile(hwndFrame); 377 stopAudioFile(hwndFrame); 378 378 } 379 379 else { 380 380 if(!stricmp(retMsg, "stopped")) { 381 381 /* Audio file played. */ 382 stopAudioFile(hwndFrame); 382 stopAudioFile(hwndFrame); 383 383 } 384 384 showPlayTimeDisplay(hwndFrame, TRUE);/* Ensure display is visible */ … … 396 396 return usItems; 397 397 } 398 398 399 399 return 0; 400 400 } … … 402 402 BOOL DrgVerifyTypeCW(PDRAGITEM pDragItem, char * chrType) 403 403 { 404 /* DrgVerifyType() seems not to work when several types are in the list?? 404 /* DrgVerifyType() seems not to work when several types are in the list?? 405 405 Dokumentation says, it works... */ 406 406 /* Only check for a single type for now */ … … 472 472 for(ulHash=0;*theString!='\0'; theString++) 473 473 ulHash=*theString+37*ulHash; 474 474 475 475 return ulHash%HASHSIZE; 476 476 } … … 543 543 MRESULT handleDrag0ver(PDRAGINFO pdi, HWND hwnd) 544 544 { 545 545 546 546 /* Only accept one file */ 547 547 if(DrgGetNumObjects(pdi)!=1) { … … 551 551 if(DrgCheckForKnownType(pdi, hwnd)) 552 552 return MRFROM2SHORT(DOR_DROP, DO_COPY); 553 554 return MRFROM2SHORT(DOR_NEVERDROP, DO_COPY); 553 554 return MRFROM2SHORT(DOR_NEVERDROP, DO_COPY); 555 555 } 556 556 … … 567 567 char chrFile[CCHMAXPATH]; 568 568 PDRAGITEM pDragItem; 569 569 570 570 pDragItem=DrgQueryDragitemPtr(pdi, 0); 571 DrgQueryStrName(pDragItem->hstrSourceName,sizeof(chrFile), chrFile); 572 DrgQueryStrName(pDragItem->hstrContainerName,sizeof(chrSourceName), chrSourceName); 571 DrgQueryStrName(pDragItem->hstrSourceName,sizeof(chrFile), chrFile); 572 DrgQueryStrName(pDragItem->hstrContainerName,sizeof(chrSourceName), chrSourceName); 573 573 strcat(chrSourceName, chrFile); 574 574 575 575 /* Start new file */ 576 576 controlPlaying(hwnd, PLAY_FIRST, 0); … … 613 613 MPFROM2SHORT(SC_SIZE, TRUE), 614 614 MPFROMP(NULL)); 615 615 616 616 WinSendMsg(hwndMenu, /* Delete Minimize from the system menu */ 617 617 MM_DELETEITEM, 618 618 MPFROM2SHORT(SC_MINIMIZE, TRUE), 619 619 MPFROMP(NULL)); 620 620 621 621 WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */ 622 622 MM_DELETEITEM, … … 653 653 654 654 switch (msg) 655 { 655 { 656 656 case DM_DRAGOVER: 657 657 { … … 682 682 swctl.fbJump=SWL_JUMPABLE; 683 683 WinAddSwitchEntry(&swctl); 684 684 685 685 adjustDialogControlPos(hwnd); 686 686 687 687 /* Set volume slider*/ 688 688 WinSendMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERVOLUME), … … 690 690 MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE), 691 691 MPFROMLONG( ulVolume)); 692 692 693 693 /* Subclass buttons for DnD */ 694 694 orgButtonProc=WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPLAY), buttonProc); 695 695 WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERPAUSE), buttonProc); 696 696 WinSubclassWindow(WinWindowFromID(hwnd, IDPB_MMPLAYERSTOP), buttonProc); 697 697 698 698 FixSysMenu(hwnd); 699 699 … … 701 701 if(allBMPs[MAIN_BMP_IDX].hbm) { 702 702 SWP swp; 703 704 WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp); 705 WinSetWindowPos(WinWindowFromID(hwnd, ID_CLIENT), NULLHANDLE, 706 WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 707 WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 703 704 WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp); 705 WinSetWindowPos(WinWindowFromID(hwnd, ID_CLIENT), NULLHANDLE, 706 WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 707 WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 708 708 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx, 709 709 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy, 710 710 SWP_SIZE|SWP_MOVE); 711 711 orgBgProc=WinSubclassWindow(WinWindowFromID(hwnd, ID_CLIENT), bgProc); 712 712 713 713 WinSetWindowPos(hwnd, NULLHANDLE, 0, 0, 714 714 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx+WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME)*2, … … 741 741 /*****************************************************/ 742 742 case WM_APPTERMINATENOTIFY: 743 743 744 744 switch(SHORT1FROMMP(mp1)) 745 745 { … … 754 754 return MRFALSE; 755 755 case NOTIFY_CONTEXT: 756 /* Show context menu. */ 756 /* Show context menu. */ 757 757 HlpContextMenu(hwnd, iWhichDisplay+ID_MENUITEMELAPSED, TRUE); 758 758 return MRFALSE; … … 761 761 } 762 762 return MRFALSE; 763 763 764 764 /*****************************************************/ 765 765 /* The following two messages are for device sharing */ … … 769 769 char chrCommand[100]; 770 770 int iWavePriv; 771 771 772 772 iWavePriv=ulPid; 773 773 … … 800 800 /* SETPOSITIONADVICE does not work for some reason, */ 801 801 /* so a timer is used. Yes, it's quit cumbersome... */ 802 /*****************************************************/ 802 /*****************************************************/ 803 803 case WM_TIMER: 804 804 if(SHORT1FROMMP(mp1)==IDTIMER_PLAY) { … … 821 821 /* Set slider position */ 822 822 823 WinPostMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERPOSBAR), 823 WinPostMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERPOSBAR), 824 824 SLM_SETSLIDERINFO, 825 825 MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE), … … 908 908 default: 909 909 break; 910 } 910 } 911 911 break; 912 912 … … 919 919 char chrCommand[50]; 920 920 char retMsg[20]; 921 921 922 922 switch(SHORT2FROMMP(mp1)) 923 923 { … … 949 949 static long lLastPos=0; 950 950 long lPos=LONGFROMMP(mp2); 951 951 952 952 bPosDragging=TRUE; 953 953 lPos*=ulTotalLength/100; … … 973 973 { 974 974 ULONG ulValue; 975 975 976 976 ulValue=LONGFROMMP(mp2); 977 977 ulVolume=ulValue; … … 985 985 986 986 bPosDragging=FALSE; 987 lPos*=1000; 987 lPos*=1000; 988 988 lPos*=ulTotalLength/100; 989 989 lPos/=1000;// Use only full seconds … … 992 992 seekAudioFile(lPos); 993 993 /* restart timer */ 994 WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY); 994 WinStartTimer(WinQueryAnchorBlock(hwnd), hwnd, IDTIMER_PLAY, PLAYTIMER_DELAY); 995 995 ulPos=lPos/1000; 996 996 break; … … 1009 1009 break; 1010 1010 }/* switch */ 1011 1011 1012 1012 return WinDefDlgProc( hwnd, msg, mp1, mp2); 1013 1013 } … … 1029 1029 ))==NULLHANDLE) 1030 1030 return FALSE; 1031 1031 1032 1032 ulSize=sizeof(chrFileName); 1033 1033 1034 1034 if ((rc = DosOpen(chrFileName, &handle, &act, 1035 1035 0L, 0, OPEN_ACTION_OPEN_IF_EXISTS, … … 1095 1095 BOOL writeVolumeToIni(char * iniFile, char* chrApp, char *chrKey, ULONG ulVolume) 1096 1096 { 1097 1097 1098 1098 return IniSaveInt(iniFile, chrApp, chrKey, ulVolume); 1099 1099 } … … 1145 1145 if(hab) { 1146 1146 hmq=WinCreateMsgQueue(hab,0); 1147 if(hmq) { 1148 /* Check if user started prog by hand */ 1147 if(hmq) { 1148 /* Check if user started prog by hand */ 1149 1149 if(argc!=NUMPARAMS) {/* Not the right num of params */ 1150 1150 pmUsage(); … … 1164 1164 strcpy(chrClassName, params[1]); 1165 1165 1166 /* Get our ressource dll */ 1166 /* Get our ressource dll */ 1167 1167 RESSOURCEHANDLE=queryResModuleHandle(argv[0]); 1168 1168 /* Get data from INI file */ … … 1176 1176 WinRegisterClass(WinQueryAnchorBlock(HWND_DESKTOP), SLIDER_CLASS, privateSliderProc,0, SLADDBYTES); 1177 1177 1178 _loadBmps(); 1178 _loadBmps(); 1179 1179 DosGetInfoBlocks(&ptib, &ppib); 1180 1180 ulPid=ppib->pib_ulpid; … … 1183 1183 //DosBeep(5000, 400); 1184 1184 1185 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 1185 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 1186 1186 RESSOURCEHANDLE, IDDLG_MMPLAYER, 0) == DID_ERROR ) 1187 1187 { 1188 1188 /* 1189 Text: 1190 Title: "Installation problem" 1191 */ 1189 Text: 1190 Title: "Installation problem" 1191 */ 1192 1192 messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text), 1193 1193 title, IDSTR_INSTALLERRORTITLE , sizeof(title), -
trunk/classes/mm-progs/volume/classvol.c
r2 r104 22 22 * If you need another license for your project/product (commercial, 23 23 * noncommercial, whatever) contact me at 24 * 24 * 25 25 * http://www.os2world.com/cdwriting 26 26 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 54 54 //#include "cwaudioinc.h" 55 55 56 #ifndef OPEN_DEFAULT 56 #ifndef OPEN_DEFAULT 57 57 /* Open views for the wpOpen() method */ 58 58 #define OPEN_UNKNOWN -1 … … 162 162 hResource=BMP_RESSOURCEHANDLE; //_queryResModuleHandle(); 163 163 hps=WinGetPS(HWND_DESKTOP); 164 164 165 165 /* The main BMP */ 166 166 allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_MAIN, 0, 0); … … 265 265 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclSource.xLeft,ci.rclSource.yBottom, 266 266 ci.rclSource.xRight-ci.rclSource.xLeft, 267 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 267 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE|SWP_SIZE); 268 268 oldPlayTimeProc=WinSubclassWindow(WinWindowFromID(hwnd, IDST_MMPLAYERPLAYTIME), playTimeTextProc); 269 269 270 270 /* Pos slider */ 271 271 ci=ciControls[CTRLIDX_POSSLIDER];//ciPosSlider; 272 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 272 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 273 273 hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE); 274 274 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom, 275 275 ci.rclSource.xRight-ci.rclSource.xLeft, 276 276 ci.rclSource.yTop-ci.rclSource.yBottom, SWP_MOVE | SWP_SIZE); 277 277 278 278 WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO, 279 279 MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0), 280 MPFROM2SHORT( 9, 9)); 280 MPFROM2SHORT( 9, 9)); 281 281 #endif 282 282 283 283 /* Vol slider */ 284 284 ci=ciControls[CTRLIDX_VOLSLIDER];//ciVolSlider; 285 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 285 WinCreateWindow(hwnd, SLIDER_CLASS, "", WS_VISIBLE | WS_TABSTOP, 0,0, 10, 10, 286 286 hwnd, HWND_TOP, ci.id, NULLHANDLE, NULLHANDLE); 287 287 WinSetWindowPos(WinWindowFromID(hwnd, ci.id),HWND_TOP, ci.rclDest.xLeft, ci.rclDest.yBottom, … … 290 290 WinSendMsg(WinWindowFromID(hwnd, ci.id),SLM_SETSLIDERINFO, 291 291 MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS,0), 292 MPFROM2SHORT( 9, 9)); 292 MPFROM2SHORT( 9, 9)); 293 293 294 294 } … … 328 328 MPFROM2SHORT(SC_SIZE, TRUE), 329 329 MPFROMP(NULL)); 330 330 331 331 WinSendMsg(hwndMenu, /* Delete Minimize from the system menu */ 332 332 MM_DELETEITEM, 333 333 MPFROM2SHORT(SC_MINIMIZE, TRUE), 334 334 MPFROMP(NULL)); 335 335 336 336 WinSendMsg(hwndMenu, /* Delete Maximize from the system menu */ 337 337 MM_DELETEITEM, … … 368 368 369 369 switch (msg) 370 { 370 { 371 371 case WM_INITDLG: 372 372 { … … 381 381 swctl.fbJump=SWL_JUMPABLE; 382 382 WinAddSwitchEntry(&swctl); 383 383 384 384 adjustDialogControlPos(hwnd); 385 385 386 386 /* Set volume slider*/ 387 387 WinSendMsg( WinWindowFromID(hwnd, IDSL_MMPLAYERVOLUME), … … 389 389 MPFROM2SHORT(SMA_SLIDERARMPOSITION,SMA_INCREMENTVALUE), 390 390 MPFROMLONG( ulVolume)); 391 391 392 392 FixSysMenu(hwnd); 393 393 … … 397 397 POINTL ptl; 398 398 399 WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp); 400 WinSetWindowPos(WinWindowFromID(hwnd, ID_CLASSVOLCLIENT), NULLHANDLE, 401 WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 402 WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 399 WinQueryWindowPos(WinWindowFromID(hwnd, FID_TITLEBAR), &swp); 400 WinSetWindowPos(WinWindowFromID(hwnd, ID_CLASSVOLCLIENT), NULLHANDLE, 401 WinQuerySysValue(HWND_DESKTOP, SV_CXDLGFRAME), 402 WinQuerySysValue(HWND_DESKTOP, SV_CYDLGFRAME), 403 403 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cx, 404 404 allBMPs[MAIN_BMP_IDX].bmpInfoHdr.cy, 405 405 SWP_SIZE|SWP_MOVE); 406 406 orgBgProc=WinSubclassWindow(WinWindowFromID(hwnd, ID_CLASSVOLCLIENT), bgProc); 407 407 408 408 /* Get mouse position */ 409 409 WinQueryPointerPos(HWND_DESKTOP, &ptl); … … 459 459 default: 460 460 break; 461 } 461 } 462 462 break; 463 463 … … 468 468 { 469 469 SWP swp; 470 470 471 471 switch(SHORT2FROMMP(mp1)) 472 472 { … … 492 492 493 493 ulVolume=ulValue; 494 sprintf(command,"MMAUDIOVOLUME=% d", ulVolume);494 sprintf(command,"MMAUDIOVOLUME=%lu", ulVolume); 495 495 sendCommandToObject(chrSourceName, command); 496 496 break; … … 509 509 { 510 510 ULONG ulValue; 511 511 512 512 ulValue=LONGFROMMP(mp2); 513 513 ulVolume=ulValue; … … 529 529 break; 530 530 }/* switch */ 531 531 532 532 return WinDefDlgProc( hwnd, msg, mp1, mp2); 533 533 } … … 541 541 BOOL writeVolumeToIni(char * iniFile, ULONG ulVolume) 542 542 { 543 543 544 544 return IniSaveInt(iniFile, INI_CLASSVOLUME_APP, INI_VOLUME_KEY, ulVolume); 545 545 } … … 580 580 if(hab) { 581 581 hmq=WinCreateMsgQueue(hab,0); 582 if(hmq) { 583 /* Check if user started prog by hand */ 582 if(hmq) { 583 /* Check if user started prog by hand */ 584 584 if(argc!=NUMPARAMS ) {/* Not the right num of params */ 585 585 pmUsage(); … … 591 591 // ++chrPtrName; 592 592 //SysWriteToTrapLog("Name: %s\n", chrSourceName); 593 /* Get our ressource dll */ 593 /* Get our ressource dll */ 594 594 RESSOURCEHANDLE=queryResModuleHandle(argv[0]); 595 595 /* Get data from INI file */ … … 604 604 _loadBmps(); 605 605 606 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 606 if( WinDlgBox( HWND_DESKTOP, NULLHANDLE, decodeStatusDialogProc, 607 607 RESSOURCEHANDLE, IDDLG_CLASSVOLUME, 0) == DID_ERROR ) 608 608 { 609 609 /* 610 Text: 611 Title: "Installation problem" 612 */ 610 Text: 611 Title: "Installation problem" 612 */ 613 613 messageBox( text, IDSTR_CONVERTDIALOGERROR , sizeof(text), 614 614 title, IDSTR_INSTALLERRORTITLE , sizeof(title), -
trunk/classes/res/de/mmres_de.DEF
r2 r104 18 18 ; */ 19 19 20 LIBRARY MMRES_DE INIT GLOBAL20 LIBRARY MMRES_DE INITINSTANCE TERMINSTANCE 21 21 DESCRIPTION '$@#(c) Chris Wohlgemuth :0.2 (13.03.02) (mmres_de.DLL)#@##1## 13.03.2002 18:17:00 My ;-) ::::1::@@Resource-DLL' 22 22 PROTMODE 23 23 CODE LOADONCALL DISCARDABLE 24 DATA SINGLE SHARED DISCARDABLE25 EXPORTS 24 DATA MULTIPLE NONSHARED 25 EXPORTS 26 26 queryLanguage 27 27 -
trunk/classes/res/en/audioconv_en.dlg
r2 r104 8 8 FCF_SYSMENU | FCF_TITLEBAR 9 9 BEGIN 10 GROUPBOX " ", IDGB_CONVERT, 3, 105, 203, 6910 GROUPBOX "Source", IDGB_CONVERT, 3, 105, 203, 69 11 11 LTEXT "Name:", IDST_CONVERTNAMELABEL, 7, 156, 32, 8 12 12 RTEXT "", IDST_CONVERTNAME, 45, 156, 156, 8 13 LTEXT " ? Hz", IDST_CONVERTSAMPLERATE, 7, 131, 91, 814 LTEXT " ? Channels", IDST_CONVERTCHANNELS, 7, 120, 91, 815 LTEXT " ", IDST_CONVERTCDBITS, 103, 142, 98, 813 LTEXT "Sample rate: ? Hz", IDST_CONVERTSAMPLERATE, 7, 131, 91, 8 14 LTEXT "Channels: ?", IDST_CONVERTCHANNELS, 7, 120, 91, 8 15 LTEXT "Bits per sample: ?", IDST_CONVERTCDBITS, 103, 142, 98, 8 16 16 LTEXT "(CD: 44100 Hz)", IDST_CONVERTCDSAMPLELABEL, 103, 131, 17 17 98, 8 18 18 LTEXT "(CD: 2 Channels)", IDST_CONVERTCDCHANNELSLABEL, 103, 19 19 120, 98, 8 20 LTEXT "Play time: ?", IDST_CONVERTPLAYTIME, 7, 109, 161, 821 GROUPBOX " ", IDGB_CONVERT2, 3, 19, 203, 8520 LTEXT "Play time: ?", IDST_CONVERTPLAYTIME, 7, 109, 161, 8 21 GROUPBOX "Target", IDGB_CONVERT2, 3, 19, 203, 85 22 22 LTEXT "Convert to:", 317, 7, 86, 86, 8 23 23 CONTROL "", IDDD_IOPROC, 7, 28, 195, 54, WC_COMBOBOX, … … 26 26 27 27 LTEXT "Target name:", 2419, 7, 57, 64, 8 28 ENTRYFIELD "", IDEF_CONVERTTARGETNAME, 9, 45, 139, 8, ES_ RIGHT |29 ES_MARGIN 28 ENTRYFIELD "", IDEF_CONVERTTARGETNAME, 9, 45, 139, 8, ES_MARGIN 29 30 30 PUSHBUTTON "~Browse...", IDPB_CONVERTBROWSE, 153, 42, 47, 14 31 31 CONTROL "", IDBAR_CONVERTPROGRESS, 6, 24, 194, 13, … … 36 36 END 37 37 END 38 -
trunk/classes/res/en/audioconv_en.rc
r2 r104 7 7 BEGIN 8 8 9 IDSTR_CONVERTCHANNELS " %d Channels"10 IDSTR_CONVERTSAMPLERATE " %d Hz"11 IDSTR_CONVERTPLAYTIME " %d:%02d min playtime"9 IDSTR_CONVERTCHANNELS "Channels: %d" 10 IDSTR_CONVERTSAMPLERATE "Sample rate: %d Hz" 11 IDSTR_CONVERTPLAYTIME "Play time: %d:%02d" 12 12 IDSTR_CONVERTDIALOGERROR "Can't load dialog template! Please check your installation." 13 13 IDSTR_CONVERTNOSPACETITLE "Convert to wave" … … 17 17 18 18 END 19 20 -
trunk/classes/res/en/cwaudio_en.dlg
r93 r104 35 35 GROUPBOX "", IDGB_WAVEINFO, 6, 4, 154, 67, NOT 36 36 WS_GROUP 37 LTEXT "Sample rate:", IDST_SAMPLERATELABEL, 17, 35, 76, 837 LTEXT "Sample rate:", IDST_SAMPLERATELABEL, 17, 35, 76, 8 38 38 LTEXT "Bits per sample:", IDST_BPSLABEL, 17, 23, 76, 8 39 39 LTEXT "Play time:", IDST_PLAYTIMELABEL, 17, 47, 76, 8 … … 71 71 GROUPBOX "URL", IDGB_STREAMURL, 6, 4, 154, 61, NOT WS_GROUP 72 72 ENTRYFIELD "", IDEF_URL, 13, 23, 140, 8, ES_MARGIN 73 LTEXT "Enter URL tostreaming server:", IDST_URLTEXT, 12,73 LTEXT "Enter URL for streaming server:", IDST_URLTEXT, 12, 74 74 37, 143, 8 75 75 END 76 76 END 77 -
trunk/classes/res/en/cwimage_en.rc
r2 r104 26 26 IDSTR_CWIMAGETITLE "Digital image" 27 27 28 IDSTR_IMAGEINFOPAGENAME "~Image information"29 IDSTR_SPRINTFPIXEL "%d Pixel "28 IDSTR_IMAGEINFOPAGENAME "~Image details" 29 IDSTR_SPRINTFPIXEL "%d Pixels" 30 30 IDSTR_SPRINTFBIT "%d Bit" 31 31 ;Bitmpap load errors … … 42 42 43 43 ;Titles used when starting player and editor applications 44 IDSTR_IMGEDITORTITLE "Image viewer"44 IDSTR_IMGEDITORTITLE "Image viewer" 45 45 IDSTR_MENU_IMAGEINFO "Image information: %d x %d x %d" 46 46 47 47 ;IDSTR_HELPLIBRARY "MMPARTS.HLP" 48 48 END 49 50 -
trunk/classes/res/en/imageconv_en.dlg
r2 r104 13 13 CONTROL "", IDSR_BMP, 12, 100, 185, 69, WC_STATIC, 14 14 SS_FGNDRECT | WS_GROUP | WS_VISIBLE 15 LTEXT "Convert to ", IDST_IMGCONVERTTO, 7, 88, 53, 815 LTEXT "Convert to:", IDST_IMGCONVERTTO, 7, 88, 53, 8 16 16 CONTROL "", IDDD_IMGIOPROC, 6, 6, 196, 78, WC_COMBOBOX, 17 17 CBS_DROPDOWNLIST | LS_HORZSCROLL | WS_GROUP | … … 27 27 END 28 28 END 29 -
trunk/classes/res/en/mmfind_en.rc
r4 r104 10 10 IDSTR_AUDIOINFOTEXT "Play time:\t%02d:%02d\x0a\x0aSamplerate:\t%d\x0a\x0aBits per sample:\t%d\x0a\x0aChannels:\t%d" 11 11 IDSTR_NOMMTEMPLATEFLDRTITLE "Error during file creation" 12 IDSTR_NOMMTEMPLATEFLDR "Multimedia template folder can't be found. It may ha slost the object ID <MMPM2_MMTEMPLATEFOLDER>."12 IDSTR_NOMMTEMPLATEFLDR "Multimedia template folder can't be found. It may have lost the object ID <MMPM2_MMTEMPLATEFOLDER>." 13 13 END -
trunk/classes/res/en/mmres_en.DEF
r2 r104 18 18 ; */ 19 19 20 LIBRARY MMRES_EN INIT GLOBAL20 LIBRARY MMRES_EN INITINSTANCE TERMINSTANCE 21 21 DESCRIPTION '$@#(c) Chris Wohlgemuth :0.2 (13.03.02) (mmres_en.DLL)#@##1## 13.03.2002 18:17:00 My ;-) ::::1::@@Resource-DLL' 22 22 PROTMODE 23 23 CODE LOADONCALL DISCARDABLE 24 DATA SINGLE SHARED DISCARDABLE25 EXPORTS 24 DATA MULTIPLE NONSHARED 25 EXPORTS 26 26 queryLanguage 27 27 -
trunk/classes/res/it/mmres_it.DEF
r2 r104 18 18 ; */ 19 19 20 LIBRARY MMRES_IT INIT GLOBAL20 LIBRARY MMRES_IT INITINSTANCE TERMINSTANCE 21 21 DESCRIPTION '$@#(c) Chris Wohlgemuth :0.2 (13.03.02) (mmres_it.DLL)#@##1## 13.03.2002 18:17:00 My ;-) ::::1::@@Resource-DLL' 22 22 PROTMODE 23 23 CODE LOADONCALL DISCARDABLE 24 DATA SINGLE SHARED DISCARDABLE24 DATA MULTIPLE NONSHARED 25 25 EXPORTS 26 26 queryLanguage -
trunk/classes/res/nl/mmres_nl.DEF
r2 r104 18 18 ; */ 19 19 20 LIBRARY MMRES_NL INIT GLOBAL20 LIBRARY MMRES_NL INITINSTANCE TERMINSTANCE 21 21 DESCRIPTION '$@#(c) B. van Leeuwen :0.2 (13.03.02) (mmres_nl.DLL)#@##1## 13.03.2002 18:17:00 My ;-) ::::1::@@Resource-DLL' 22 22 PROTMODE 23 23 CODE LOADONCALL DISCARDABLE 24 DATA SINGLE SHARED DISCARDABLE25 EXPORTS 24 DATA MULTIPLE NONSHARED 25 EXPORTS 26 26 queryLanguage 27 27 -
trunk/classes/res/tw/mmres_tw.DEF
r4 r104 18 18 ; */ 19 19 20 LIBRARY MMRES_TW INIT GLOBAL20 LIBRARY MMRES_TW INITINSTANCE TERMINSTANCE 21 21 DESCRIPTION '$@#(c) Ming-Lung Cheng:0.2 (12.02.06) (mmres_tw.DLL)#@##1## 13.03.2002 18:17:00 My ;-) ::::1::@@Resource-DLL' 22 22 PROTMODE 23 23 CODE LOADONCALL DISCARDABLE 24 DATA SINGLE SHARED DISCARDABLE25 EXPORTS 24 DATA MULTIPLE NONSHARED 25 EXPORTS 26 26 queryLanguage 27 27
Note:
See TracChangeset
for help on using the changeset viewer.