Creating an intuitive user interface - Remembering the last file the user was working with

Posted on 2006-11-27
Last Modified: 2010-04-24
Most applications allow users to close a project in mid-edit and then re-open the project later and the application will just start where you left off with the project. I am creating a program that does this, and what I'm wondering is would I just create my own method to do this or is there something I need to do as far as windows programming goes? Do I need to setup an object that the operating system recognizes as the most recent project for some reason? Or, can I just save some data file somewhere that says basically what file to load and where to place the cursor and so on?
Question by:_davidharris
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 44

Expert Comment

ID: 18026370
I don't know of any inbuilt method to do that.  You will have to code it yourself.  

Expert Comment

ID: 18031078
When they close the program, where they left off won't be in'll have to load it from somewhere, like a file.

Author Comment

ID: 18034104
Yeah I understand that. I was just wondering if there was something I needed to setup with Windows. Most programs have that as a feature but I was just thinking that the operating system was somehow responsible for some of that. Actually, what I was think was specifically would these programs use an .ini file maybe? And then would they're be a like a specific format for doing this. Maybe so that other programs could somehow use and view the state of your program. Make sense? So I was just making sure that I wouldn't have to write my program's routines out one way and then later have to re-write them.
LVL 44

Accepted Solution

AndyAinscow earned 125 total points
ID: 18034941
<Most programs have that as a feature but I was just thinking that the operating system was somehow responsible for some of that>

Most programs in my experience start with a new, empty whatever.  
Any program that does that will store (eg. in the registry) information about what was last used, state of it.... and as I said initially - someone has coded that.

Author Comment

ID: 18036558
That helps. I really should just google this stuff but I thought I'd ask. Thanks for your help.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
add a property to an object 6 141
Need some help with open a dialog 5 254
Convert VC++  mfc  application  multilanguage 9 235
How to change toolbar  runtime 3 500
The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

736 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question