Click here to Skip to main content
15,923,576 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralQuestion about IPicture Pin
Ahmad31-Mar-01 22:15
Ahmad31-Mar-01 22:15 
GeneralEditBox Pin
Derick Cyril Thomas31-Mar-01 17:40
Derick Cyril Thomas31-Mar-01 17:40 
GeneralRe: EditBox Pin
Michael Dunn31-Mar-01 18:26
sitebuilderMichael Dunn31-Mar-01 18:26 
GeneralRe: EditBox Pin
l a u r e n31-Mar-01 23:00
l a u r e n31-Mar-01 23:00 
GeneralRe: EditBox Pin
4-Apr-01 11:01
suss4-Apr-01 11:01 
QuestionWhich box did the command come from? Pin
31-Mar-01 14:24
suss31-Mar-01 14:24 
AnswerRe: Which box did the command come from? Pin
Tim Deveaux1-Apr-01 5:18
Tim Deveaux1-Apr-01 5:18 
GeneralAppending a file - argh !!!! Pin
Christian Graus31-Mar-01 13:05
protectorChristian Graus31-Mar-01 13:05 
I'm coming to the end of my inaugural WTL project and I've hit an odd snag. I am filling a listctrl with ID3 tages, editing them and writing them out again. I'm using someone elses ID3 class ( although it needed so much work I may as well have written it ;0) and it will NOT append a file with ID3V1 information for me. As soon as the info is there, I can overwrite it, but otherwise, I just cannot write to the file. It's not read only, and I've tried using

SetFilePointer(fHandle, 128, 0, FILE_END);
SetEndOfFile(fHandle);
SetFilePointer(fHandle, -128, 0, FILE_END);
if (!WriteFile(fHandle, "TAG", 3, &sentinel, 0))
WriteFile(fHandle, myID3.title, 30, &sentinel, 0);
WriteFile(fHandle, myID3.band, 30, &sentinel, 0);
WriteFile(fHandle, myID3.album, 30, &sentinel, 0);
WriteFile(fHandle, myID3.year, 4, &sentinel, 0);
WriteFile(fHandle, myID3.comment, 30, &sentinel, 0);
WriteFile(fHandle, &myID3.genre[0], 1, &sentinel, 0);
SetFilePointer(fHandle, 128, 0, FILE_END);

and various permutations of this, and also

CloseHandle(fHandle);

ofstream stream;
stream.open(filepath, ios::app);
stream.setmode(filebuf::text);

stream << "TAG";
stream << myID3.title;
stream << myID3.band;
stream << myID3.album;
stream << myID3.year;
stream << myID3.comment;
stream << &myID3.genre[0];
stream.close();

Can someone please tell me if I am doing something wrong, or suggest why this is not appending my file ? I've traced through and this code executes whenever a tag is not present, but nothing is being done.

Thanks.

Christian

The content of this post is not necessarily the opinion of my yadda yadda yadda.

To understand recursion, we must first understand recursion.
GeneralRe: Appending a file - argh !!!! Pin
Michael Dunn31-Mar-01 14:30
sitebuilderMichael Dunn31-Mar-01 14:30 
GeneralRe: Appending a file - argh !!!! Pin
Christian Graus31-Mar-01 22:35
protectorChristian Graus31-Mar-01 22:35 
GeneralRe: Appending a file - argh !!!! Pin
31-Mar-01 22:55
suss31-Mar-01 22:55 
GeneralRe: Appending a file - argh !!!! Pin
l a u r e n31-Mar-01 23:06
l a u r e n31-Mar-01 23:06 
GeneralRe: Appending a file - argh !!!! Pin
Christian Graus1-Apr-01 12:56
protectorChristian Graus1-Apr-01 12:56 
GeneralRe: Appending a file - argh !!!! Pin
Tim Deveaux1-Apr-01 5:24
Tim Deveaux1-Apr-01 5:24 
GeneralWH_SHELL Hook Pin
Mustafa Demirhan31-Mar-01 7:48
Mustafa Demirhan31-Mar-01 7:48 
GeneralActiveX Controls and Downloading Pin
31-Mar-01 5:07
suss31-Mar-01 5:07 
GeneralRe: ActiveX Controls and Downloading Pin
l a u r e n31-Mar-01 23:10
l a u r e n31-Mar-01 23:10 
GeneralTrouble with running dos programs from VC++ Pin
James Bird31-Mar-01 3:52
James Bird31-Mar-01 3:52 
GeneralRe: Trouble with running dos programs from VC++ Pin
Anders Molin31-Mar-01 6:38
professionalAnders Molin31-Mar-01 6:38 
GeneralRe: Trouble with running dos programs from VC++ Pin
Michael Dunn31-Mar-01 7:53
sitebuilderMichael Dunn31-Mar-01 7:53 
GeneralSieve of Eratosthenes -- Please Urgent Pin
30-Mar-01 18:14
suss30-Mar-01 18:14 
GeneralRe: Sieve of Eratosthenes -- Please Urgent Pin
Christian Graus31-Mar-01 1:56
protectorChristian Graus31-Mar-01 1:56 
GeneralWTL CString disaster !!! Pin
Christian Graus30-Mar-01 17:29
protectorChristian Graus30-Mar-01 17:29 
GeneralRe: WTL CString disaster !!! Pin
Michael Dunn30-Mar-01 18:19
sitebuilderMichael Dunn30-Mar-01 18:19 
GeneralRe: WTL CString disaster !!! Pin
Christian Graus30-Mar-01 19:37
protectorChristian Graus30-Mar-01 19:37 

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.