Results 1 to 6 of 6

Thread: [Resolved] MFC vs Win32, MFC: Serialization, and header files

  1. #1

    Thread Starter
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    [Resolved] MFC vs Win32, MFC: Serialization, and header files

    Once again, found the web lacking in tutorials that tell me things.

    I'm creating a program with MFC. I'm not exactly fluent with MS VC++ at all. I'm mostly making a move from VB, but have experience of Java, ML, other random languages from my Uni course (i.e., am a total C++ noob, but fairly experienced programmer).

    Given I have to create this program by June (ish), am I making it hard on myself using MFC? I have a copy of the book: Beginning Visual C++ 6 by Ivor Horton from Wrox Press, which advocates MFC, but you guys seemed to suggest that coming from VB would be better done with Win32. If that's the case, can you suggest a good book that will teach me this approach?

    Anyway, with the program I've got so far, I'm looking to open a docfile (OLE 2.0 Structured Storage or something like that). I've tracked through various information sources and believe I'm supposed to use the IStorage and IStream objects. These are defined in the objidl.h header file, but I'm kinda confused as to where this declaration should go - I have many .cpp files: Prog.cpp, ProgDoc.cpp, ProgView.cpp, MainFrm.cpp and ChildFrm.cpp. Any enlightenment on this score?

    Also, I think serialization won't allow me to use these objects to open the file anyway - it appears too high level, only providing the functions for storing ints, longs, etc... How should I do this?

    Or should I just scrap what I've got (which, tbh isn't much more than what AppWizard generated) and try implementing in Win32?
    Last edited by Evil_Giraffe; Jan 27th, 2003 at 01:26 PM.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Do it in Win32. MFC should not be used until you know your C++ and Win32.
    The best book on Win32 I know is "Prorgamming Windows" by Charles Petzold. My version is still pure C, but newer editions might even use C++, don't know.

    If you want to do it in MFC anyway, get "Programming Windows with MFC" by Jeff Prosise. Like the Petzold is the bible on Win32 API, the Prosise is the bible on MFC. It's an absolutly great book and it shows the power that is hidden beyond the ugly skin of MFC.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394
    If you don't know C/C++, MFC is not going to save you. It is a complex language with many concepts. Maybe you should learn the language first (through console programming) before jumping into Win32 API or MFC.
    VS.NET 2003

    Need to email me?

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Time until june is short, but it won't save time jumping right at Win32 or MFC without knowing the language properly. But if you're in a hurry, learn the following things as the minimum of required knowledge:
    function-level propgramming concepts (variables, ifs, loops, I guess you already know them, just learn the C++ way of doing them)
    classes, inheritance and polymorphism
    simple templates (not necessarily writing them, just using them)
    pointers and references, pros and cons and why you're f***ed in Win32 without knowledge of pointers
    C++ standard library elements: string, iostreams, fstreams, stringstreams, vectors, lists, maps and algorithms. This means you also need to learn a bit about iterators, but not everything.

    Yeah, I think this is it. My minimum recommendation of C++ knowledge for Win32.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555
    Thanks guys. Most of that stuff, excluding templates and obviously the C++ standard library, I've covered in other langiages, and already knew the C++ way of doing most of them. I did do a crash course in console applications, but since it was written for someone totally new to programming it was really boring. I'm keeping MSDN on hand, though!

    Cheers

    Chris

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    We all do that.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width