Click here to Skip to main content
15,921,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: True/High color toolbars Pin
Nish Nishant22-Mar-02 20:10
sitebuilderNish Nishant22-Mar-02 20:10 
GeneralRe: True/High color toolbars Pin
alex.barylski22-Mar-02 20:43
alex.barylski22-Mar-02 20:43 
GeneralRe: True/High color toolbars Pin
Nish Nishant22-Mar-02 20:55
sitebuilderNish Nishant22-Mar-02 20:55 
GeneralCButton Color :: MFC Pin
valikac22-Mar-02 17:42
valikac22-Mar-02 17:42 
GeneralRe: CButton Color :: MFC Pin
alex.barylski22-Mar-02 19:09
alex.barylski22-Mar-02 19:09 
Generaldisk space of an object Pin
Marcus Spitzmiller22-Mar-02 16:40
Marcus Spitzmiller22-Mar-02 16:40 
GeneralRe: disk space of an object Pin
Nish Nishant22-Mar-02 20:34
sitebuilderNish Nishant22-Mar-02 20:34 
GeneralRe: disk space of an object Pin
Marcus Spitzmiller23-Mar-02 4:17
Marcus Spitzmiller23-Mar-02 4:17 
Hmmm....I'm in a pickle, then.

Maybe you've tried this sort of thing, then. Basically I'm writing an object to a file as a header then appending various other files to create a large file. Basically, minus error checking:

fOut.Open(strFileOut,
File::modeCreate|CFile::modeWrite|CFile::shareDenyNone, &Error);

//the header
CArchive ar(&fOut, CArchive::store);
m_objInstrument.Serialize(ar);

//then i append the files
for(int i = 0; i < arFileNames.GetSize(); i++)
{
strFileName = arFileNames.GetAt(0);
arFileNames.RemoveAt(0);
fIn.Open(strFileName, CFile::modeRead, &Error))

dwLength = fIn.GetLength();
BYTE * pBuf = (BYTE *)malloc(dwLength);
fIn.Read(pBuf, dwLength);
fOut.Write(pBuf, dwLength);
fIn.Close();
free pBuf;

}
fOut.Close()

So you're saying this is a bad idea? Wait..I just noticed the CArchive::Write method...Interesting. I'm going to give this a try, but in the meantime if you have any suggestions, please feel free to let me know.




Marcus Spitzmiller

"Ha ha, Stupid bloropope.." - Homer
GeneralRe: disk space of an object Pin
David Defoort22-Mar-02 23:23
David Defoort22-Mar-02 23:23 
GeneralRe: disk space of an object Pin
Marcus Spitzmiller23-Mar-02 4:04
Marcus Spitzmiller23-Mar-02 4:04 
GeneralStack problems Pin
Steve Severance22-Mar-02 15:30
Steve Severance22-Mar-02 15:30 
GeneralRe: Stack problems Pin
lilei22-Mar-02 16:03
lilei22-Mar-02 16:03 
GeneralRe: Stack problems Pin
Tim Smith22-Mar-02 17:07
Tim Smith22-Mar-02 17:07 
GeneralRe: Stack problems Pin
Nish Nishant22-Mar-02 20:30
sitebuilderNish Nishant22-Mar-02 20:30 
GeneralRe: Stack problems Pin
Tim Smith23-Mar-02 4:13
Tim Smith23-Mar-02 4:13 
GeneralC2440 Pin
22-Mar-02 14:17
suss22-Mar-02 14:17 
GeneralRe: C2440 Pin
Nish Nishant22-Mar-02 14:23
sitebuilderNish Nishant22-Mar-02 14:23 
GeneralRe: C2440 Pin
22-Mar-02 14:34
suss22-Mar-02 14:34 
GeneralRe: C2440 Pin
Nish Nishant22-Mar-02 14:43
sitebuilderNish Nishant22-Mar-02 14:43 
Generalseveral Threads.....trying to access same array item Pin
22-Mar-02 14:01
suss22-Mar-02 14:01 
GeneralRe: several Threads.....trying to access same array item Pin
Nish Nishant22-Mar-02 14:13
sitebuilderNish Nishant22-Mar-02 14:13 
GeneralRe: several Threads.....trying to access same array item Pin
soptest22-Mar-02 14:11
soptest22-Mar-02 14:11 
GeneralRe: several Threads.....trying to access same array item Pin
Nish Nishant22-Mar-02 14:15
sitebuilderNish Nishant22-Mar-02 14:15 
GeneralDid I say something different? Pin
soptest22-Mar-02 14:53
soptest22-Mar-02 14:53 
GeneralRe: Did I say something different? Pin
Nish Nishant22-Mar-02 16:02
sitebuilderNish Nishant22-Mar-02 16:02 

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.