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

C / C++ / MFC

 
GeneralRe: Getting the Current Application Path Pin
Michael Dunn3-Dec-03 13:04
sitebuilderMichael Dunn3-Dec-03 13:04 
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 
PLEASE HELP: I'm trying to populate the fields in the 'wave properties dialog'. What I'm I doing wrong?

typedef struct output_tag // any special vars associated with output file
{
short nFile;
long lSize;
DWORD dwDataOffset;
long lSamprate;
WORD wBitsPerSample;
WORD wChannels;
DWORD dwFormat;
BOOL bWroteHeader;
char szTITLE[256]; // Title Displayed
char szARTIST[256]; // Artist
char szNAME[256]; // Name
char szGENRE[256]; // Genre
char szKEYWORDS[256]; // Keywords
char szSOURCE_FORM[256]; // Source Form
char szMEDIUM[256]; // Medium
char szENGINEER[256]; // Engineer
char szTECHNICIAN[256]; // Technician
char szSOURCE[256]; // Source
char szCOPYRIGHT[256]; // Copyright
char szSOFTWARE[256]; // Software
char szCREATION_DATE[256]; // Creation Date
char szSUBJECT[256]; // Subject
char szCOMMENTS[256]; // Comments
char szNumExtraDatas[256];
char extra[256];
} MYOUTPUT;

MYINPUT is the same.

DWORD WINAPI FilterGetNextSpecialData(HANDLE hInput, SPECIALDATA * psp)
{ //return 0; // only has 1 special data! Otherwise we would use psp->hSpecialData
// as either a counter to know which item to retrieve next, or as a
// structure with other state information in it.


DWORD dwCount=(DWORD)psp->hSpecialData;
  BOOL bContinue=TRUE;
  char * pData=NULL; // Pointer to data
  DWORD dwSuccess=1;
  int i;
  char tmp[48];
  MYINPUT *mi;
 
mi=(MYINPUT *)GlobalLock(hInput);  
  while (bContinue)
  { 
   bContinue=FALSE;
   if (dwCount >= 8)
   {
    char * pData;
    int i = (int)(dwCount - 8);
    if ((i >= mi->szNumExtraDatas) || (!mi->extra[i].pData))
    {
     dwSuccess = 0;
     break;
    }
 
    psp->dwExtra = (DWORD)-1; // so CEP handles this automatically
    psp->dwSize = mi->extra[i].dwLength;
    psp->hData = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT, psp->dwSize+8);
    pData=(char *)GlobalLock(psp->hData);
    CopyMemory(pData, mi->extra[i].pData, mi->extra[i].dwLength);
    lstrcpy(psp->szListType, mi->extra[i].szList);
    lstrcpy(psp->szType, mi->extra[i].szType);
    GlobalUnlock(psp->hData);
   }
   else switch (dwCount)
   { 
case 0:
     if (!*mi->szTITLE)
     { 
bContinue=TRUE;
      dwCount++;
      break;
     }
     lstrcpy(psp->szListType,"WAVE");
     lstrcpy(psp->szType,"DISP");
     psp->dwExtra=1;
     psp->dwSize=lstrlen(mi->szTitle)+1+4;
     psp->hData=NULL;
     pData=psp->szDataIn;
     i=1;
     CopyMemory(pData,&i,4);
     lstrcpy(pData+4,mi->szTitle);
     break;
 
case 1:
     if (!*mi->szArtist)
     { 
bContinue=TRUE;
      dwCount++;
      break;
     }
     lstrcpy(psp->szListType,"INFO");
     lstrcpy(psp->szType,"IART");
     psp->dwExtra=1;
     psp->dwSize=lstrlen(mi->szArtist)+1;
     psp->hData=NULL;
     pData=psp->szDataIn;
     lstrcpy(pData,mi->szArtist);
     break;
 
    case 2:
     if (!*mi->szAlbum)
     { 
bContinue=TRUE;
      dwCount++;
      break;
     }
     lstrcpy(psp->szListType,"INFO");
     lstrcpy(psp->szType,"INAM");
     psp->dwExtra=1;
     psp->dwSize=lstrlen(mi->szAlbum)+1;
     psp->hData=NULL;
     pData=psp->szDataIn;
     lstrcpy(pData,mi->szAlbum);
     break;
 
    case 3:
     if (!*mi->szComment)
     { 
bContinue=TRUE;
      dwCount++;
      break;
     }
     lstrcpy(psp->szListType,"INFO");
     lstrcpy(psp->szType,"ICMT");
     psp->dwExtra=1;
     psp->dwSize=lstrlen(mi->szComment)+1;
     psp->hData=NULL;
     pData=psp->szDataIn;
     lstrcpy(pData,mi->szComment);
     break;
 
    case 4:
     if (!*mi->szYear)
     { 
bContinue=TRUE;
      dwCount++;
      break;
     }
     lstrcpy(psp->szListType,"INFO");
     lstrcpy(psp->szType,"ICRD");
     psp->dwExtra=1;
     psp->dwSize=lstrlen(mi->szYear)+1;
     psp->hData=NULL;
     pData=psp->szDataIn;
     lstrcpy(pData,mi->szYear);    
     break;
 
    case 5:
     if (!mi->szTrackNumber)
     { 
bContinue=TRUE;
      dwCount++;
      break;
     }
     lstrcpy(psp->szListType,"INFO");
     lstrcpy(psp->szType,"ISBJ");
     psp->dwExtra=1;
     wsprintf(tmp,"%d",mi->szTrackNumber);
     psp->dwSize=lstrlen(tmp)+1;
     psp->hData=NULL;
     pData=psp->szDataIn;
     lstrcpy(pData,tmp);    
     break;
 
    case 6:
     if (!mi->szGenre)
     { 
bContinue=TRUE;
      dwCount++;
      break;
     }
     lstrcpy(psp->szListType,"INFO");
     lstrcpy(psp->szType,"IGNR");
     psp->dwExtra=1;
     if (mi->szGenre>126)
      mi->szGenre=126;
     lstrcpy(tmp,Genres[mi->szGenre]);
     psp->dwSize=lstrlen(tmp)+1;
     psp->hData=NULL;
     pData=psp->szDataIn;
     lstrcpy(pData,tmp);    
     break;
 
    case 7:
    { 
     char * pData;
     if (!mi->pID3v2)
     {
      bContinue=TRUE;
      dwCount++;
      break;
     }
     psp->dwExtra = 1;
     psp->dwSize = mi->dwSizeID3v2;
     psp->hData = GlobalAlloc(GMEM_MOVEABLE|GMEM_ZEROINIT, psp->dwSize+8);
     pData=(char *)GlobalLock(psp->hData);
     CopyMemory(pData, mi->pID3v2, mi->dwSizeID3v2);
     lstrcpy(psp->szListType, "WAVE");
     lstrcpy(psp->szType, "ID3x");
     GlobalUnlock(psp->hData);
    }
    break;
 
    default:
     // all done!
     dwSuccess=0;
     break;
   }
}
  dwCount++;
  psp->hSpecialData=(HANDLE)dwCount;
 
  GlobalUnlock(hInput);
  return dwSuccess;
}

DWORD WINAPI FilterGetFirstSpecialData(HANDLE hInput, SPECIALDATA * psp)
{

MYINPUT * mi;
  DWORD dwSuccess=0;
  BOOL bHasTagInfo = TRUE;
 
  if (!hInput)
   return 0;  // return is boolean
  mi=(MYINPUT *)GlobalLock(hInput);
 
  psp->hSpecialData=(HANDLE)0; // start at the case 0: item in FilterGetNextSpecialData
 
  GlobalUnlock(hInput);
 
  if (bHasTagInfo)
   return FilterGetNextSpecialData(hInput,psp);
  else
   return FALSE;
}



Trevor Scott Ph.D., MSc, Eng Hons.
GeneralRe: Adobe Audition/Cool Edit Plug-in - PART 2 Pin
Trevor13-Dec-03 1:21
Trevor13-Dec-03 1:21 
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 

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.