Jason Teagle wrote: > But since LOGFONT depends on compiled header files and libraries in > use by the OS - not so useful.
But for compatibility's sake different versions of the OS have to accept LOGFONTs defined by older or newer header files. The usual trick is to start the structure with a size element and use that for versioning but LOGFONT doesn't have one, so they can't change it - OSes past and present will have to continue to accept this structure. In any case, a structure read and written by the same machine should always work. OK, it's possible the registry could get replicated to a different OS by roaming profile replication or similar but the binary compatibility of the structure (as above) should hold here and it should still just work. The only possible Unicode issue here is that the structure ends with the font name in either MBCS or Unicode format (2K, XP and 2003 are all Unicode-native internally, that hasn't changed). So you have to be sure that the binary will only be read and written by both Unicode or non-Unicode versions of your app. So you could explicitly code all the manipulation of these LOGFONT as LOGFONTWs and call the -W versions of the functions, or you could just build your app Unicode only :-) You get a lot of Unicode for free with MFC anyway. But if ReadProfileBinary isn't fetching back the same data you wrote with WriteProfileBinary then that's the problem - that ought to just work. But I can't think of a good reason why 2003 should be any different than 2K or XP. Rup. _______________________________________________ msvc mailing list [email protected] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
