- Timestamp:
- Nov 29, 2023, 5:59:34 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mediafolder/c/mediafldr/mediafolderoverridenwpclsmethods.cpp
r47 r133 1 1 /* 2 2 * This file is (C) Chris Wohlgemuth 1999-2003 3 * 3 * 4 4 * It's part of the Audio/Data-CD-Creator distribution 5 5 */ … … 132 132 133 133 hps=WinGetPS(HWND_DESKTOP); 134 134 135 135 /* The main BMP */ 136 136 allBMPs[MAIN_BMP_IDX].hbm=GpiLoadBitmap(hps, hResource, IDBMP_TOPMIDDLE, 0, 0); … … 352 352 if(DosQueryModuleHandle(pathname,&hmod)) { 353 353 pathname=((WPClassManager*)SOMClassMgrObject) //Query Pathname of class file 354 ->wpModuleForClass("CWAudioShadow"); 354 ->wpModuleForClass("CWAudioShadow"); 355 355 if(DosQueryModuleHandle(pathname,&hmod)) { 356 356 pathname=((WPClassManager*)SOMClassMgrObject) //Query Pathname of class file 357 ->wpModuleForClass("M_CWCDFolder"); 357 ->wpModuleForClass("M_CWCDFolder"); 358 358 if(DosQueryModuleHandle(pathname,&hmod)) { 359 359 pathname=((WPClassManager*)SOMClassMgrObject) //Query Pathname of class file 360 ->wpModuleForClass("CWCDFolder"); 360 ->wpModuleForClass("CWCDFolder"); 361 361 if(DosQueryModuleHandle(pathname,&hmod)) { 362 362 hmod=0; … … 378 378 if((found=strrchr(chrInstallDir,'\\'))!=NULLHANDLE) 379 379 *found=0; 380 380 381 381 /* Save the dir for config files. */ 382 382 //strcpy( chrConfigDir, chrInstallDir); … … 393 393 394 394 if(!hmod) { 395 char path[CCHMAXPATH]; 395 char path[CCHMAXPATH]; 396 396 char buf[CCHMAXPATH]; 397 397 char* found; 398 398 APIRET rc; 399 400 /* Get the language code of our system and load the 399 400 /* Get the language code of our system and load the 401 401 resource DLL with the right language */ 402 402 do { … … 404 404 PCSZ pszLang=chrLang; 405 405 char *chrPtr; 406 406 407 407 /* Get Language var */ 408 408 if(NO_ERROR!=DosScanEnv("LANG", &pszLang)) … … 419 419 while(*chrPtr==' ') 420 420 chrPtr++; 421 421 422 422 /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */ 423 423 if(strlen(chrPtr)<5) 424 424 break; 425 425 426 426 if(DosQueryModuleName(queryModuleHandle("M_CWMediaFolder"),sizeof(path),path)!=NO_ERROR) 427 427 break; 428 428 429 429 found=strrchr(path,'\\'); 430 430 if(!found) 431 431 break; 432 432 *found=0; 433 434 /* Extract the first two chars */ 433 434 /* Extract the first two chars */ 435 435 sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]); 436 436 strcat(path,buf); … … 438 438 if(DosLoadModule(buf,sizeof(buf),path, &hmod)==NO_ERROR) 439 439 break; 440 440 441 441 /* NLS DLL not found. Try to load default */ 442 442 found=strrchr(path,'\\'); 443 443 if(!found) 444 444 break; 445 445 446 446 *found=0; 447 447 sprintf(buf, DEFRESDLLNAME); … … 534 534 ULONG ulInfoLen=0; 535 535 APIRET rc; 536 char path[CCHMAXPATH]; 536 char path[CCHMAXPATH]; 537 537 char* found; 538 538 char buf[CCHMAXPATH]; … … 574 574 /* We don't want an automatic template because we create it during 575 575 installation because we need one with an ID so we can create a shadow 576 without problems. So we return CLSSTYLE_DONTTEMPLATE. 576 without problems. So we return CLSSTYLE_DONTTEMPLATE. 577 577 Another way would be an override of wpclsCreateDefaultTemplate() 578 578 but this works, too, and we have to override this method anyway. We must … … 591 591 if(PrfQueryProfileInt(HINI_USERPROFILE, APPKEY_CWMM, MFLDR_NO_TEMPLATE_SHADOW, 0)) 592 592 return; 593 593 594 594 if(!WinQueryObject(ID_MEDIALDRTMPL_SHADOW)) 595 595 { … … 778 778 779 779 return rc; 780 #endif 781 782 } 783 784 785 786 787 788 789 790 791 792 780 #endif 781 782 } 783 784 785 786 787 788 789 790 791 792
Note:
See TracChangeset
for help on using the changeset viewer.