To store data between runs the best way is to use Serialize (binary files) or Xmlize (xml files).
Just try the examples, they are easy to use.
To get and set TopWindow position you can use GetRect() and SetRect(). For example, imagine a button that, when you push it, your window is moved 200 pixels. The function to do it could be:
void MyWindow::OnPush() {
Rect r = GetRect();
r.Offset(200, 0);
SetRect(r);
}