15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Still Serializing view information

John Harding -- jhardin1@ford.com
Tuesday, August 20, 1996

Environment: Windows 95 VC++ 4.2

Neil A. Van Note wrote:
>         The code in your InitInstance for your App may have the following lines...
> 

Thanks Neil, but my original question still stands (as this approach will only work for
the initial loading of the app).

To restate my problem :- 

> > I am writing an application that serializes view information between
> > sessions.  When a user opens a file this view info is read in and the
> > saved view(s) of the data can be reconstructed.
> >
> > The problem I am having is that the framework is automatically
> > creating a default view (e.g. the user saves 2 views along with the
> > document (using structured storage) but when it is loaded back in 3
> > views are created).
> >
> > How can I supress this behaviour?
> >

The issue is how to supress the creating of a default view when a document is
loaded (via File->Open).

Any help will be greatly appreciated.

Thanks.

==============================================================================
F | John Harding            Internet: jhardin1@ford.com              | Ford
O | Phone: 313-322-9173     Fax: 313-594-7596       PROFS: JHARDIN1  | Motor
R | Software & Calibration Tools, Advanced Vehicle Technology (AVT)  | Company
D | E.T.C. Room C360, 17000 Rotunda Drive, Dearborn, MI 48121, USA   |
==============================================================================



Jeff Pek -- jpek@bizserve.com
Saturday, August 24, 1996

The framework uses a combination of classes,
CDocTemplate (single or multi), CDocument, CMDIChildWnd (or CFrameWnd),
to handle the initial view creation. You'll need to override its default
behavior in one of a number of ways.

Check out CDocTemplate::OpenDocumentFile, or CDocTemplate::CreateNewFrame.
HTH - Jeff Pek

----------
> From: John Harding 
> To: mfc-l@netcom.com
> Subject: Still Serializing view information
> Date: Tuesday, August 20, 1996 8:15 AM
> 
> Environment: Windows 95 VC++ 4.2
>
> To restate my problem :- 
> 
> > > I am writing an application that serializes view information between
> > > sessions.  When a user opens a file this view info is read in and the
> > > saved view(s) of the data can be reconstructed.
> > >
> > > The problem I am having is that the framework is automatically
> > > creating a default view (e.g. the user saves 2 views along with the
> > > document (using structured storage) but when it is loaded back in 3
> > > views are created).
> > >
> > > How can I supress this behaviour?
> > >
> 
> The issue is how to supress the creating of a default view when a
document is
> loaded (via File->Open).
> 
> Any help will be greatly appreciated.




Victor Roos -- vroos@vr.nl
Monday, August 26, 1996

See MSDN article: Stopping MFC/MDI from creating a new MDI child window
on startup

PSS ID Number: Q141725

Victor Roos




John Harding -- jhardin1@ford.com
Tuesday, August 27, 1996

Thanks Victor - but once again this will only work for the *INITIAL*
view - not for views created during the OnFileOpen() process.

I now have a copy of the book MFC Internals by Wingo/Shepherd - it looks
like this has the info I need.  However if any of you have attempted 
something similar I'd appreciate it if you would let me know.

Let me re-iterate - this has to work for the file open procedure at any
point in the application and not just for the initialisation (i.e. *NOT*
via InitInstance()).

Victor Roos wrote:
> 
> See MSDN article: Stopping MFC/MDI from creating a new MDI child window
> on startup
> 
> PSS ID Number: Q141725
> 
> Victor Roos

-- 
==============================================================================
F | John Harding            Internet: jhardin1@ford.com              | Ford
O | Phone: 313-322-9173     Fax: 313-594-7596       PROFS: JHARDIN1  | Motor
R | Software & Calibration Tools, Advanced Vehicle Technology (AVT)  | Company
D | E.T.C. Room C360, 17000 Rotunda Drive, Dearborn, MI 48121, USA   |
==============================================================================




| Вернуться в корень Архива |