Click here to Skip to main content
16,011,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralProblem w/ CListCtrl::SortItems Pin
De Nardis Andrea3-Dec-03 1:16
De Nardis Andrea3-Dec-03 1:16 
GeneralRe: Problem w/ CListCtrl::SortItems Pin
David Crow3-Dec-03 3:26
David Crow3-Dec-03 3:26 
GeneralPopup menus Pin
chadell3-Dec-03 1:16
chadell3-Dec-03 1:16 
GeneralRe: Popup menus Pin
De Nardis Andrea3-Dec-03 1:25
De Nardis Andrea3-Dec-03 1:25 
GeneralRe: Popup menus Pin
viliam3-Dec-03 1:28
viliam3-Dec-03 1:28 
GeneralRe: Popup menus Pin
chadell3-Dec-03 3:36
chadell3-Dec-03 3:36 
GeneralAdobe Audition/Cool Edit Plug-in Pin
Trevor13-Dec-03 1:14
Trevor13-Dec-03 1:14 
GeneralRe: Adobe Audition/Cool Edit Plug-in - PART 2 Pin
Trevor13-Dec-03 1:21
Trevor13-Dec-03 1:21 
This is the other part of the code:

DWORD WINAPI FilterWriteSpecialData(HANDLE hOutput, LPCSTR szListType, LPCSTR szType, char * pData,DWORD dwSize)
{


MYOUTPUT * mo;
  BOOL bHandled = FALSE;
 
  if (!hOutput)
   return 0; // FALSE
 
  mo=(MYOUTPUT *)GlobalLock(hOutput);
 
  if (strcmp(szListType,"INFO")==0)
  { 
if (strcmp(szType,"IART")==0)
   { 
    CopyMemory(mo->szArtist,pData,min(lstrlen(pData)+1,30));
    mo->iTagVersion=1;
    //bHandled = TRUE;
   }
   else if (strcmp(szType,"INAM")==0)
   { 
    CopyMemory(mo->szAlbum,pData,min(lstrlen(pData)+1,30));
    mo->iTagVersion=1;
    //bHandled = TRUE;
   }
   else if (strcmp(szType,"ICRD")==0)
   { 
    CopyMemory(mo->szYear,pData,min(lstrlen(pData)+1,4));
    mo->iTagVersion=1;
    //bHandled = TRUE;
   }
   else if (strcmp(szType,"ICMT")==0)
   { 
    CopyMemory(mo->szComment,pData,min(lstrlen(pData)+1,30));
    mo->iTagVersion=1;
    //bHandled = TRUE;
   }
   else if (strcmp(szType,"ISBJ")==0)
   { 
    if (atoi(pData)!=0)
    { 
int i;
     i=atoi(pData);
     if (i<255)
     {
      mo->iTrackNumber=i;
      mo->iTagVersion=1;
      //bHandled = TRUE;
     }
    }
   }
  }
  else if (strcmp(szListType,"WAVE")==0)
  {
   if (strcmp(szType, "ID3x")==0)
   {
    mo->dwSizeID3v2 = dwSize;
    mo->hID3v2 = GlobalAlloc(GMEM_MOVEABLE, dwSize);
    mo->pID3v2 = (BYTE *)GlobalLock(mo->hID3v2);
    CopyMemory(mo->pID3v2, pData, dwSize);
    bHandled = TRUE;
   }
   else if (strcmp(szType,"DISP")==0)
   {
    DWORD dw;
    CopyMemory(&dw,pData,4); // Display Name string
    if (dw==1)
    {
     CopyMemory(mo->szTitle,pData+4,min(lstrlen(pData+4)+1,30));
     mo->iTagVersion=1;
     //bHandled = TRUE;
    }
   }
  }
 
// Any ancillary data items from Audition that we don't how to handle, let's save them here
  if (!bHandled)
  {
   int i = mo->iNumExtraDatas;
   strcpy(mo->extra[i].szList, szListType);
   strcpy(mo->extra[i].szType, szType);
   mo->extra[i].dwLength = dwSize;
   mo->extra[i].hData = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT, dwSize);
   mo->extra[i].pData = (BYTE *)GlobalLock(mo->extra[i].hData);
   CopyMemory(mo->extra[i].pData, pData, dwSize);
   mo->iNumExtraDatas++;
  }
   GlobalUnlock(hOutput);
  return 1; // OK
}




HANDLE WINAPI OpenFilterOutput(LPSTR lpstrFilename,long lSamprate,WORD wBitsPerSample,WORD wChannels,long lSize, long *lpChunkSize, DWORD dwOptions)
{
HANDLE hOutput;
short nFile;
nFile=_lcreat(lpstrFilename,0);

if (nFile==-1) return NULL;

if (hOutput=GlobalAlloc(GMEM_MOVEABLE|GMEM_SHARE,sizeof(MYOUTPUT)))
{
MYOUTPUT *mo;
DWORD dw;
mo=(MYOUTPUT *)GlobalLock(hOutput);
mo->nFile=nFile;
mo->lSize=lSize; // size in bytes 16-bit PCM
mo->lSamprate=lSamprate;
mo->wBitsPerSample=wBitsPerSample;
mo->wChannels=wChannels;
dw=0x646e732e;
_lwrite(mo->nFile,(LPCSTR)&dw,4);
mo->dwFormat=dwOptions;
FillMemory(mo->szTITLE,255,0);
FillMemory(mo->szNAME,255,0);
FillMemory(mo->szARTIST,255,0);
FillMemory(mo->szGENRE,255,0);
FillMemory(mo->szKEYWORDS,255,0);
FillMemory(mo->szSOURCE_FORM,255,0);
FillMemory(mo->szMEDIUM,255,0);
FillMemory(mo->szENGINEER,255,0);
FillMemory(mo->szTECHNICIAN,255,0);
FillMemory(mo->szSOURCE,255,0);
FillMemory(mo->szCOPYRIGHT,255,0);
FillMemory(mo->szCREATION_DATE,255,0);
FillMemory(mo->szSUBJECT,255,0);
FillMemory(mo->szCOMMENTS,255,0);

mo->bWroteHeader=FALSE;
//dw=0;
//_lwrite(mo->nFile,&dw,4);

GlobalUnlock(hOutput);
}
*lpChunkSize=16384;
return hOutput;
}

THANKS!!!!!

Trevor Scott Ph.D., MSc, Eng Hons.
GeneralProblem using CADODatabase and CADORecordset classes. Pin
bilas3-Dec-03 1:05
bilas3-Dec-03 1:05 
GeneralRe: Problem using CADODatabase and CADORecordset classes. Pin
RChin3-Dec-03 2:03
RChin3-Dec-03 2:03 
GeneralRe: Problem using CADODatabase and CADORecordset classes. Pin
bilas3-Dec-03 3:25
bilas3-Dec-03 3:25 
GeneralRe: Problem using CADODatabase and CADORecordset classes. Pin
RChin3-Dec-03 5:04
RChin3-Dec-03 5:04 
GeneralRe: Problem using CADODatabase and CADORecordset classes. Pin
bilas3-Dec-03 11:10
bilas3-Dec-03 11:10 
GeneralError with slider index. Pin
vgrigor3-Dec-03 0:40
vgrigor3-Dec-03 0:40 
GeneralRe: Error with slider index. Pin
Antti Keskinen3-Dec-03 1:50
Antti Keskinen3-Dec-03 1:50 
GeneralRe: Error with slider index. Pin
vgrigor3-Dec-03 2:23
vgrigor3-Dec-03 2:23 
GeneralRe: Error with slider index. Pin
Antti Keskinen3-Dec-03 3:25
Antti Keskinen3-Dec-03 3:25 
GeneralOutlook please help Pin
Jump_Around3-Dec-03 0:36
Jump_Around3-Dec-03 0:36 
GeneralRe: Outlook please help Pin
Antti Keskinen3-Dec-03 1:56
Antti Keskinen3-Dec-03 1:56 
GeneralRe: Outlook please help Pin
Jump_Around3-Dec-03 2:18
Jump_Around3-Dec-03 2:18 
GeneralRe: Outlook please help Pin
Antti Keskinen3-Dec-03 2:47
Antti Keskinen3-Dec-03 2:47 
GeneralRe: Outlook please help Pin
Jump_Around3-Dec-03 3:45
Jump_Around3-Dec-03 3:45 
GeneralRe: Outlook please help Pin
Jump_Around3-Dec-03 4:33
Jump_Around3-Dec-03 4:33 
GeneralRe: Outlook please help Pin
Peter Molnar3-Dec-03 14:32
Peter Molnar3-Dec-03 14:32 
QuestionHow to override CPropertySheet::RemovePage(int nPage)? Pin
mfc_surfer3-Dec-03 0:14
mfc_surfer3-Dec-03 0:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.