Click here to Skip to main content
15,917,174 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Animation at start of software Pin
Cedric Moonen29-Jan-08 3:30
Cedric Moonen29-Jan-08 3:30 
GeneralRe: Animation at start of software Pin
CPallini29-Jan-08 3:30
mveCPallini29-Jan-08 3:30 
GeneralCFile operation Pin
AnayKulkarni29-Jan-08 2:36
AnayKulkarni29-Jan-08 2:36 
GeneralRe: CFile operation Pin
Maximilien29-Jan-08 2:52
Maximilien29-Jan-08 2:52 
QuestionRe: CFile operation Pin
David Crow29-Jan-08 3:14
David Crow29-Jan-08 3:14 
JokeRe: CFile operation Pin
CPallini29-Jan-08 4:48
mveCPallini29-Jan-08 4:48 
GeneralRe: CFile operation Pin
Rajesh R Subramanian29-Jan-08 3:35
professionalRajesh R Subramanian29-Jan-08 3:35 
AnswerRe: CFile operation Pin
Rajkumar R29-Jan-08 3:43
Rajkumar R29-Jan-08 3:43 
AnayKulkarni wrote:
means can i write object of file "header.e01" into "header.e02" file.


I quess your are talking with respect to object persistance (Serialization), You want to store the Object (CFile) State to the file 2 (header.e02) rather than copying the entire data.

I cannot trace the functions for this, I would suggest a solution.
overload the operators for Serialization,
CArchive& AFXAPI operator<<(CArchive& ar, CFile& fileObj)
{
	// Store object state
	ar << fileObj.GetFileName();
	ar << fileObj.GetPosition();
	return ar;
}

CArchive& AFXAPI operator>>(CArchive& ar, CFile& fileObj)
{
	// Retrieve object state
	CString FileName;
	ULONGLONG pos;
	ar >> FileName;
	fileObj.Open(FileName, 0);
	ar >> pos;
	fileObj.Seek(pos, 0);
	return ar;
}


now you are able to store Cfile Object State through CArchive.
Eg:
CArchive archive(&File1, CArchive::store);
	archive << File2;


please use the logic of above, there may be compile / runtime error, that depends on your implementation
Questionhow to make CTreeCtrl labes trasperent Pin
sarat29-Jan-08 1:26
sarat29-Jan-08 1:26 
AnswerRe: how to make CTreeCtrl labes trasperent Pin
Rajesh R Subramanian29-Jan-08 1:38
professionalRajesh R Subramanian29-Jan-08 1:38 
GeneralRe: how to make CTreeCtrl labes trasperent Pin
sarat29-Jan-08 4:44
sarat29-Jan-08 4:44 
GeneralProblem with Vista... Pin
SnaKeBeD29-Jan-08 0:44
SnaKeBeD29-Jan-08 0:44 
GeneralRe: Problem with Vista... Pin
Maxwell Chen29-Jan-08 0:55
Maxwell Chen29-Jan-08 0:55 
GeneralRe: Problem with Vista... Pin
SnaKeBeD29-Jan-08 1:10
SnaKeBeD29-Jan-08 1:10 
GeneralRe: Problem with Vista... Pin
Rajesh R Subramanian29-Jan-08 1:00
professionalRajesh R Subramanian29-Jan-08 1:00 
GeneralRe: Problem with Vista... Pin
Maxwell Chen29-Jan-08 1:02
Maxwell Chen29-Jan-08 1:02 
GeneralRe: Problem with Vista... Pin
Mark Salsbery29-Jan-08 5:46
Mark Salsbery29-Jan-08 5:46 
GeneralCould any one tell... Pin
rowdy_vc++29-Jan-08 0:06
rowdy_vc++29-Jan-08 0:06 
GeneralRe: Could any one tell... Pin
CPallini29-Jan-08 0:49
mveCPallini29-Jan-08 0:49 
GeneralRe: Could any one tell... Pin
Maxwell Chen29-Jan-08 0:53
Maxwell Chen29-Jan-08 0:53 
GeneralThanks. Pin
CPallini29-Jan-08 0:58
mveCPallini29-Jan-08 0:58 
GeneralRe: Could any one tell... Pin
rowdy_vc++29-Jan-08 0:59
rowdy_vc++29-Jan-08 0:59 
GeneralRe: Could any one tell... Pin
Rajesh R Subramanian29-Jan-08 0:59
professionalRajesh R Subramanian29-Jan-08 0:59 
GeneralRe: Could any one tell... Pin
Rajesh R Subramanian29-Jan-08 21:28
professionalRajesh R Subramanian29-Jan-08 21:28 
QuestionVisual C++ and Ref counted std::string Pin
Giles29-Jan-08 0:01
Giles29-Jan-08 0:01 

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.