Click here to Skip to main content
15,795,581 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC dialog member sharing? (code included) Pin
BlackDice5-Mar-04 4:49
BlackDice5-Mar-04 4:49 
GeneralRe: MFC dialog member sharing? (or, My Marathon Ineptitude) Pin
Christophocles5-Mar-04 5:41
sussChristophocles5-Mar-04 5:41 
GeneralRe: MFC dialog member sharing? (or My Enduring Ineptitude) Pin
Christophocles5-Mar-04 7:25
sussChristophocles5-Mar-04 7:25 
GeneralRe: MFC dialog member sharing? (or My Enduring Ineptitude) Pin
BlackDice5-Mar-04 11:43
BlackDice5-Mar-04 11:43 
GeneralRe: MFC dialog member sharing? Pin
Christophocles5-Mar-04 13:01
sussChristophocles5-Mar-04 13:01 
GeneralRe: MFC dialog member sharing? Pin
Christophocles8-Mar-04 9:01
sussChristophocles8-Mar-04 9:01 
GeneralAdvice required.... Pin
slyone3-Mar-04 11:54
slyone3-Mar-04 11:54 
GeneralRe: Advice required.... Pin
Roger Allen4-Mar-04 7:55
Roger Allen4-Mar-04 7:55 
If you call OpenDocumentFile(NULL) on the document templates for the new document types, this will return CDocument* object to you. You can then cast these pointers to the correct document types and use an overridden operator=(COtherDocType&) function to copy the data across.

Something like this:

void CDoc1Type::CreateCopies()
{
CDocTemplate *pDocTemplate = ?; // get the other document template type

CDoc2Type *pDoc2 = static_cast<CDoc2Type>(pDocTemplate->OpenDocumentFile(NULL));

*pDoc2 = this; // copy content
...
}


const CDoc2Type& CDoc2Type::Operator=(const CDoc1Type& doc1)
{
// copy content across here
}


The coed and the idea is a bit rough. Hopefully it makes sense!


Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
GeneralRe: Advice required.... Pin
slyone4-Mar-04 13:02
slyone4-Mar-04 13:02 
GeneralUNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
cnd120013-Mar-04 11:36
cnd120013-Mar-04 11:36 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Rick York3-Mar-04 12:09
mveRick York3-Mar-04 12:09 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Tom Larsen3-Mar-04 12:23
Tom Larsen3-Mar-04 12:23 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
cnd120013-Mar-04 12:58
cnd120013-Mar-04 12:58 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Christian Graus3-Mar-04 17:47
protectorChristian Graus3-Mar-04 17:47 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Tom Larsen4-Mar-04 6:04
Tom Larsen4-Mar-04 6:04 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Jonas Larsson4-Mar-04 5:45
Jonas Larsson4-Mar-04 5:45 
GeneralAnti-Spam Project Pin
tempgp3-Mar-04 11:35
tempgp3-Mar-04 11:35 
GeneralRe: Anti-Spam Project Pin
Prakash Nadar3-Mar-04 14:31
Prakash Nadar3-Mar-04 14:31 
GeneralRe: Anti-Spam Project Pin
tempgp3-Mar-04 14:37
tempgp3-Mar-04 14:37 
GeneralRe: Anti-Spam Project Pin
David Crow4-Mar-04 8:23
David Crow4-Mar-04 8:23 
GeneralRe: Anti-Spam Project Pin
tempgp4-Mar-04 9:25
tempgp4-Mar-04 9:25 
GeneralRe: Anti-Spam Project Pin
David Crow4-Mar-04 9:30
David Crow4-Mar-04 9:30 
GeneralRe: Anti-Spam Project Pin
tempgp4-Mar-04 9:39
tempgp4-Mar-04 9:39 
GeneralRe: Anti-Spam Project Pin
David Crow4-Mar-04 9:51
David Crow4-Mar-04 9:51 
GeneralRe: Anti-Spam Project Pin
tempgp4-Mar-04 10:00
tempgp4-Mar-04 10:00 

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.