Click here to Skip to main content
16,006,535 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIntresting Question Pin
The_Server11-Sep-01 17:08
The_Server11-Sep-01 17:08 
GeneralRe: Intresting Question Pin
Joaquín M López Muñoz12-Sep-01 0:19
Joaquín M López Muñoz12-Sep-01 0:19 
GeneralWTL CCommandBarCtrl troubles Pin
The Liquid Plumber11-Sep-01 15:37
The Liquid Plumber11-Sep-01 15:37 
GeneralWin32 Console Programming Question Pin
the_grip11-Sep-01 10:30
the_grip11-Sep-01 10:30 
GeneralRe: Win32 Console Programming Question Pin
Joaquín M López Muñoz11-Sep-01 12:09
Joaquín M López Muñoz11-Sep-01 12:09 
GeneralRe: Win32 Console Programming Question Pin
User 988511-Sep-01 12:14
User 988511-Sep-01 12:14 
GeneralSerialize problem Pin
José Luis Sogorb11-Sep-01 9:38
José Luis Sogorb11-Sep-01 9:38 
GeneralRe: Serialize problem Pin
Tomasz Sowinski12-Sep-01 0:48
Tomasz Sowinski12-Sep-01 0:48 
This is a classic problem. MFC serialization versioning works only for CObject-derived objects serialized with a call to one of these functions:
CArchive& operator <<(CArchive & ar, const CObject* pOb);
void CArchive::WriteObject(const CObject* pOb);

They save metadata about object type and version before actual object bits written by Serialize method.

The problem is that CDocument is saved with a direct call to Serialize inside CDocument::OnSaveDocument. There's no metadata about document itself. There may be some metadata about document members if you save them using functions listed above. So if you need a version number at the beginning of MFC-serialized file, write it yourself. It's much easier than rewriting OnSaveDocument (but this option is also possible).

Tomasz Sowinski -- http://www.shooltz.com
GeneralDisabling and Enabling MFC Wizard buttons Pin
11-Sep-01 6:46
suss11-Sep-01 6:46 
GeneralRe: Disabling and Enabling MFC Wizard buttons Pin
Tomasz Sowinski12-Sep-01 2:56
Tomasz Sowinski12-Sep-01 2:56 
GeneralCan't add variable to static text Pin
mattiase11-Sep-01 6:44
mattiase11-Sep-01 6:44 
GeneralRe: Can't add variable to static text Pin
Anders Molin11-Sep-01 7:28
professionalAnders Molin11-Sep-01 7:28 
GeneralIShellLink Pin
mrlister11-Sep-01 6:29
mrlister11-Sep-01 6:29 
QuestionCan I develop IE app on Mac?(null) Pin
maxding11-Sep-01 4:12
maxding11-Sep-01 4:12 
GeneralCrazy works in CTabCtrl but not in CPropertySheet !!! Pin
11-Sep-01 3:53
suss11-Sep-01 3:53 
GeneralRe: Crazy works in CTabCtrl but not in CPropertySheet !!! Pin
Anders Molin11-Sep-01 7:34
professionalAnders Molin11-Sep-01 7:34 
GeneralRe: Crazy works in CTabCtrl but not in CPropertySheet !!! Pin
Ravi Bhavnani11-Sep-01 9:43
professionalRavi Bhavnani11-Sep-01 9:43 
QuestionHow can I determine the size of dynamic array? Pin
11-Sep-01 3:13
suss11-Sep-01 3:13 
AnswerRe: How can I determine the size of dynamic array? Pin
Tomasz Sowinski11-Sep-01 3:25
Tomasz Sowinski11-Sep-01 3:25 
GeneralRe: How can I determine the size of dynamic array? Pin
Christian Graus11-Sep-01 3:53
protectorChristian Graus11-Sep-01 3:53 
GeneralRe: How can I determine the size of dynamic array? Pin
Tomasz Sowinski11-Sep-01 4:01
Tomasz Sowinski11-Sep-01 4:01 
GeneralRe: How can I determine the size of dynamic array? Pin
Christian Graus11-Sep-01 4:34
protectorChristian Graus11-Sep-01 4:34 
AnswerRe: How can I determine the size of dynamic array? Pin
Masaaki Onishi11-Sep-01 5:44
Masaaki Onishi11-Sep-01 5:44 
Generalsaving drawings in a VIEW Pin
11-Sep-01 2:36
suss11-Sep-01 2:36 
GeneralRe: saving drawings in a VIEW Pin
Christian Graus11-Sep-01 3:55
protectorChristian Graus11-Sep-01 3:55 

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.