Solved

Save location of view and control bar when closed?

Posted on 1998-10-23
2
211 Views
Last Modified: 2013-11-20
Hi there,
My application uses MDI and some Control bars dockable in one mainframe. I try to save the location of each object in the registry when I close the app. I used WriteProfileInt() on OnClose() and GetProfileInt() in PreCreateWindow() in MainFrame to save the TopLeft() of the WindowRect, but it doesn't work. I just get the TopLeft of the last Rect written to profile. How can save all the location of controlbar and view after I move them around?
If you have any hint or answer for this question, please let me know. Thank you for your time.
0
Comment
Question by:tamngo
2 Comments
 
LVL 3

Accepted Solution

by:
plaroche earned 100 total points
ID: 1323779
You will have to iterate through the views and control bars, save them in a certain order under different registry entries.

for example:

ControlBar1
ControlBar2
View1
View2

Under each you could save name of the window, position and a lot of other things.

To iterate through the views check GetFirstViewPosition() and GetNextView().

0
 

Author Comment

by:tamngo
ID: 1323780
Hi plaroche,

   Can you give me some detail about your answer?
   I can't get it. Right now under each control or view I have window name, topleft and width and height.  When I call GetProfileInt() from OnCreate() of Mainframe  I use MoveWindow() to the new position but it doesn't work.
Maybe some more hints will be a big help. Thank you.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
iSeries FTP Exit Program 8 163
ORA-01403: no data found 43 112
no14 challenge 14 74
x-bar in Google Sheets 2 97
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

696 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