Re: ? Savings In-Edit Drafts
I typically do this sort of thing using an Apply or Save button that
basically does the same thing as the OnOK() function, but doesn't actually
close the dialog. You could also hook on almost any process in the list
control (when a change is made for example) and count the number of entries
made then save periodically in that routine. That way it wouldn't do the
save until they finish an entry.
You could also store just data that has changed (that allows you to reenter
the stuff that was entered since last save or save in small increments (more
often) so that the time lag is not annoying.
BTW, I always like Ctrl+S functionality so I can save without having to move
my hands from the keyboard.
Can your users actually work in more than one dialog at a time?
Tom
"Alec S." <@> wrote in message
news:OdY%23ngyHJHA.3960@TK2MSFTNGP04.phx.gbl...
Hi,
I'm working on a list-control based MFC dialog app. It has a popup dialog
that
lets you create new entries to add to the list or edit existing ones. I've
implemented a save feature (including an autosave function), but the user
needs
to dismiss the edit dialog (OK or Cancel) to do so, which can be annoying
if
working on a long entry. What I need is a way to allow the item that is
currently being created/edited to be saved (like the autosave draft
function in
Blogger).
Obviously I'm going to need to make the edit dialog modeless so that the
user
can still click Save in the main app interface. Of course this raises the
issue
that more than one edit dialog can be open, which is a good thing
actually.
I know that it is starting to sound like an MDI app, but I'd rather not
start
over. One idea I have is to keep a list of open edit dialogs, and have the
autosave function/Save button go through them and save their contents as
well. I
guess I'd have to come up with a way to store this draft info. (Of course
it
kind of defeats the purpose of having OK and Cancel buttons in the edit
dialog
since saving would nullify canceling unless I keep drafts saved separately
somehow.)
So basically, I'm looking for some advice on implementing a
save-open-documents
architecture in a dialog app.
Thanks.
--
Alec S.
news/alec->synetech/cjb/net