Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC dialog member sharing? (code included) Pin
BlackDice5-Mar-04 3:49
BlackDice5-Mar-04 3:49 
GeneralRe: MFC dialog member sharing? (or, My Marathon Ineptitude) Pin
Christophocles5-Mar-04 4:41
sussChristophocles5-Mar-04 4:41 
GeneralRe: MFC dialog member sharing? (or My Enduring Ineptitude) Pin
Christophocles5-Mar-04 6:25
sussChristophocles5-Mar-04 6:25 
GeneralRe: MFC dialog member sharing? (or My Enduring Ineptitude) Pin
BlackDice5-Mar-04 10:43
BlackDice5-Mar-04 10:43 
GeneralRe: MFC dialog member sharing? Pin
Christophocles5-Mar-04 12:01
sussChristophocles5-Mar-04 12:01 
GeneralRe: MFC dialog member sharing? Pin
Christophocles8-Mar-04 8:01
sussChristophocles8-Mar-04 8:01 
GeneralAdvice required.... Pin
slyone3-Mar-04 10:54
slyone3-Mar-04 10:54 
GeneralRe: Advice required.... Pin
Roger Allen4-Mar-04 6:55
Roger Allen4-Mar-04 6: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 12:02
slyone4-Mar-04 12:02 
GeneralUNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
cnd120013-Mar-04 10:36
cnd120013-Mar-04 10:36 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Rick York3-Mar-04 11:09
mveRick York3-Mar-04 11:09 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Tom Larsen3-Mar-04 11:23
Tom Larsen3-Mar-04 11:23 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
cnd120013-Mar-04 11:58
cnd120013-Mar-04 11:58 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Christian Graus3-Mar-04 16:47
protectorChristian Graus3-Mar-04 16:47 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Tom Larsen4-Mar-04 5:04
Tom Larsen4-Mar-04 5:04 
GeneralRe: UNWANTED DEBUG OF LIBRARY FUNCTIONS Pin
Jonas Larsson4-Mar-04 4:45
Jonas Larsson4-Mar-04 4:45 
GeneralAnti-Spam Project Pin
tempgp3-Mar-04 10:35
tempgp3-Mar-04 10:35 
GeneralRe: Anti-Spam Project Pin
Prakash Nadar3-Mar-04 13:31
Prakash Nadar3-Mar-04 13:31 
GeneralRe: Anti-Spam Project Pin
tempgp3-Mar-04 13:37
tempgp3-Mar-04 13:37 
GeneralRe: Anti-Spam Project Pin
David Crow4-Mar-04 7:23
David Crow4-Mar-04 7:23 
GeneralRe: Anti-Spam Project Pin
tempgp4-Mar-04 8:25
tempgp4-Mar-04 8:25 
GeneralRe: Anti-Spam Project Pin
David Crow4-Mar-04 8:30
David Crow4-Mar-04 8:30 
GeneralRe: Anti-Spam Project Pin
tempgp4-Mar-04 8:39
tempgp4-Mar-04 8:39 
GeneralRe: Anti-Spam Project Pin
David Crow4-Mar-04 8:51
David Crow4-Mar-04 8:51 
GeneralRe: Anti-Spam Project Pin
tempgp4-Mar-04 9:00
tempgp4-Mar-04 9: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.