Click here to Skip to main content
15,893,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSetLayeredWindowAttributes Problem Pin
Kevin Power5-Oct-02 19:24
Kevin Power5-Oct-02 19:24 
GeneralRe: SetLayeredWindowAttributes Problem Pin
User 66586-Oct-02 1:19
User 66586-Oct-02 1:19 
GeneralRe: SetLayeredWindowAttributes Problem Pin
Kevin Power13-Oct-02 21:18
Kevin Power13-Oct-02 21:18 
GeneralAdding drag and drop support to ownder drawn CListBox Pin
alex.barylski5-Oct-02 18:33
alex.barylski5-Oct-02 18:33 
GeneralRe: Adding drag and drop support to ownder drawn CListBox Pin
Sunnygirl6-Oct-02 9:45
Sunnygirl6-Oct-02 9:45 
GeneralRe: Adding drag and drop support to ownder drawn CListBox Pin
Sunnygirl6-Oct-02 9:49
Sunnygirl6-Oct-02 9:49 
GeneralSchema version change has no effect Pin
work_to_live5-Oct-02 18:13
work_to_live5-Oct-02 18:13 
GeneralRe: Schema version change has no effect Pin
Steve S7-Oct-02 3:48
Steve S7-Oct-02 3:48 
There's a flaw, in that if you have a base class and there are derived classes, retrieving the schema in the base and derived class serialize methods will cause a problem.

I typically code around this by not using the MFC concept of schemas, and in each call to serialize, emitting a version byte. It sounds like overkill (and with a lot of objects, can inflate the amount of disk required), but it's not failed me yet.

This lets me always write using the latest version, but read any with code like;

if (ar.IsLoading())
{
BYTE version;
ar >> version;
// Do stuff that hasn't changed...
...
if (version > MAXOBJVERSION)
{
// throw a CArchive exception here!
}
if (version > 0x01)
{
// Do version 2 and later stuff...
}
}



Steve S
[This signature space available for rent]
Questionhow to uninstall a software programatically ? Pin
imran_rafique5-Oct-02 16:45
imran_rafique5-Oct-02 16:45 
AnswerRe: how to uninstall a software programatically ? Pin
paracha35-Oct-02 18:38
paracha35-Oct-02 18:38 
Questionhow to ? Pin
imran_rafique5-Oct-02 15:37
imran_rafique5-Oct-02 15:37 
AnswerRe: how to ? Pin
Pavel Klocek6-Oct-02 2:54
Pavel Klocek6-Oct-02 2:54 
GeneralCDialog question! Pin
Lucky20025-Oct-02 13:29
Lucky20025-Oct-02 13:29 
GeneralRe: CDialog question! Pin
valikac5-Oct-02 17:05
valikac5-Oct-02 17:05 
GeneralRe: CDialog question! Pin
Lucky20025-Oct-02 22:50
Lucky20025-Oct-02 22:50 
GeneralA calculator with Visual C Pin
Javier Ortega5-Oct-02 13:00
sussJavier Ortega5-Oct-02 13:00 
GeneralRe: A calculator with Visual C Pin
Paul M Watt5-Oct-02 19:06
mentorPaul M Watt5-Oct-02 19:06 
GeneralRe: A calculator with Visual C Pin
S van Leent6-Oct-02 8:47
S van Leent6-Oct-02 8:47 
GeneralDumb CFileDialog question... Pin
RobJones5-Oct-02 12:16
RobJones5-Oct-02 12:16 
GeneralEven better yet Pin
RobJones5-Oct-02 12:45
RobJones5-Oct-02 12:45 
GeneralRe: Even better yet Pin
Atlantys5-Oct-02 13:29
Atlantys5-Oct-02 13:29 
GeneralThanks! Pin
RobJones5-Oct-02 13:38
RobJones5-Oct-02 13:38 
Generalirl like textoutput .. Pin
Mandalay5-Oct-02 11:49
Mandalay5-Oct-02 11:49 
Generalsorry, the topic is "irc like textoutput" Pin
Mandalay5-Oct-02 11:52
Mandalay5-Oct-02 11:52 
GeneralRe: sorry, the topic is "irc like textoutput" Pin
RobJones5-Oct-02 12:25
RobJones5-Oct-02 12:25 

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.