BCGControlBar Pro for MFC
virtual LPCTSTR CBCGPMDIChildWnd::GetDocumentName ( CObject **  pObj)

Returns the name of a document displayed in the frame.

A pointer to text string containing the name of a document.

Override this method in a derived class and return an unique document identification if the frame displays a document whose content is not loaded from the disk file.

The default implementation returns a string obtained from CDocument::GetPathName.

GetDocumentName is called by the framework when it saves the state of all opened documents. The returned string is written to the registry.

When the state is being restored later, a document name is read from the registry and passed to CBCGPMDIFrameWnd::CreateDocumentWindow. You should override this method in a CBCGPMDIFrameWnd - derived class and create or open a document with this name. So, if a document is not created from a disk file, you should explicitly check the document identifier and create the document accordingly.

An example of such document can be found in BCGCBPVisualStudioGUIDemo example, document contained the Start Page.

You should do that only if you intend to save and restore open documents.