Re: How to start with MFC
"Bubba" <nickname@banelli.biz.invalid> wrote in message
news:Xns9D99AF8B4181Cbubbachipsetone@130.133.4.11...
Greetings,
Basically, I have to create application with at least two forms or
dialogues. Application has to be able to show persons in a list, and that
those persons can be sorted by name or surname. They can also be sorted by
city or address, but then we have to use tree control.
As said, using a ListView control (which allows multiple columns like a
spreadsheet) is more complex than a simple ListBox control which does not.
But maybe you can use a ListBox showing just the first+last names of each
person, one per line. If the list is sorted by surname, repaint the list to
show each person as last+first instead.
So the first form can be a simple dialog containing this ListBox and buttons
to Add/Remove/Change the selected person.
Person can be removed, added or changed. Each person can get indefinite
telephone numbers and previous addressee.
When a person is added or changed, the second dialog appears (using
DoModal()). This dialog has fields for First name, Last name, and again
ListBoxes for Telephone and Previous Addresses. Next to these list boxes
are Add/Remove/Change buttons which bring up a 3rd dialog to edit them (in
the same manner as the second dialog).
It also must be possible to save
data when exiting the application and loading them afterwards.
My first thought is to use the simple and excellent CMarkup XML parser from
CodeProject to save/load the persons as XML. But this takes a bit to
understand. I haven't tried MFC serialization, maybe this is easier and
will suffice for this requirement (even though I would not recommend MFC
serialization for a shipping app due to versioning concerns and other weird
problems.)
I did some Googleing and got books, but none seems to have systematic for
my problem, in other words, they seem to be to vast in handling the
subject, so I'd like to know what's the best way to start doing this type
of application.
To get started quickly, try to find some good tutorial videos. You need to
find ready made solutions here and not some deep discourse into the history
and background of MFC and which takes 2 days to write Hello World. Start
with http://msdn.microsoft.com/en-us/visualc/bb931339.aspx
Good luck,
David