Standard Library
TFrameWnd Class
This class is inherited from
CFrameWnd
and includes several additional member functions and variables to provide
standardization for the main frame window of all similar applications.
This class handles three sets of menus, tool bar buttons, and accelerator keys:
Closed, Opened, and Printing. The size of the frame window is designed to
be compatible with the CSDisView class. When
the frame window is moved by the user, the coordinates of the new location are
saved in the Registry so that the frame window is always reopened at the same
position when the application is restarted. This class changes the window
title when each application function is invoked. It handles the character
editing tool bar buttons. The member functions and variables are as
follows:
- TFrameWnd::TFrameWnd()
- This is the constructor. It initializes the data members.
- virtual TFrameWnd::~TFrameWnd()
- This is the destructor. It releases the data members.
- void TFrameWnd::LoadFrame(int Frame,
int Closed, int Opened, int Printing,
CRegistry*Registry,
CString Title)
- This public member function loads menus for the ID's specified by Closed,
Opened, and Printing. It stores the those ID's for later use in loading
tool bars and accelerator keys. It saves the Registry pointer and
initializes the frame window's base Title. It then calls
CFrameWnd::LoadFrame()
with the ID specified in Frame, insures the frame window is shown, and sets the
TFrameWnd::Up data member to TRUE.
-
virtual BOOL TFrameWnd::PreCreateWindow(CREATESTRUCT& cs)
- This public member function can be overridden to initialize the desired
settings in CREATESTRUCT. However, the base class is designed to set the
frame window to be compatible with the CSDisView
class. This member function also sets the initial location of the window
from the registry settings made by the TFrameWnd::OnMove() member
function.
-
void TFrameWnd::Setup(char* Title, int Function)
- This public member function changes the window title to be the base window
title set in the TFrameWnd::LoadFrame() concatenated with
Title. Also, the TFrameWnd::CurrentFunction data member is set to
Function. Call this member function each time the user invokes a different
application function.
- void TFrameWnd::Reset()
- This public member function changes the window title to be the base window
title set in the TFrameWnd::LoadFrame() only. Also, the
TFrameWnd::CurrentFunction data member is set to zero. Call this member
function when the user closes the current application function.
- void TFrameWnd::SetClosed()
- This public member function sets the menu, tool bar, and accelerator keys in
the frame window to those associated with the ID saved in the
TFrameWnd::intClosed data member.
- void TFrameWnd::SetOpened()
- This public member function sets the menu, tool bar, and accelerator keys in
the frame window to those associated with the ID saved in the
TFrameWnd::intOpened data member.
- void TFrameWnd::SetPrinting()
- This public member function sets the menu, tool bar, and accelerator keys in
the frame window to those associated with the ID saved in the
TFrameWnd::intPrinting data member. It also sets the
TFrameWnd::CurrentFunction data member to 99.
-
afx_msg int TFrameWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
- This member function may be overridden. If so, be sure to call the
base class, as it creates the tool bar and the status bar in the frame
window.
- afx_msg void TFrameWnd::OnClose()
- This member function may be overridden. If so, be sure to call the
base class, as it destroys the frame window when the application is
terminated.
- afx_msg void TFrameWnd::OnMove(int x, int y)
- This member function may be overridden. If so, be sure to call the
base class, as it saves the current position of the frame window in the
Registry. This location is used by the
TFrameWnd::PreCreateWindow() member function to position the
initial frame window at the same location when the application is
restarted.
- afx_msg void TFrameWnd::OnEditUndo()
- This member function may be overridden. If so, be sure to call the
base class, as it performs the "undo" function on the dialog box control which
currently has focus.
- afx_msg void TFrameWnd::OnEditCut()
- This member function may be overridden. If so, be sure to call the
base class, as it performs the "cut" function on the dialog box control which
currently has focus.
- afx_msg void TFrameWnd::OnEditCopy()
- This member function may be overridden. If so, be sure to call the
base class, as it performs the "copy" function on the dialog box control which
currently has focus.
- afx_msg void TFrameWnd::OnEditPaste()
- This member function may be overridden. If so, be sure to call the
base class, as it performs the "paste" function on the dialog box control which
currently has focus.
- int TFrameWnd::CurrentFunction
- This public data member stores the number of the current application
function. This number should be used to determine which application
function must be closed when another is opened or when the application is
terminated.
- BOOL TFrameWnd::Open
- This public data member is set to TRUE by the
TFrameWnd::SetOpened() member function and to FALSE by the
TFrameWnd::SetOpened() member function.
- CStatusBar TFrameWnd::StatusBar
- This public data member contains the status bar for the frame window.
- CToolBar TFrameWnd::ToolBar
- This public data member contains the current tool bar for the frame
window.
- int TFrameWnd::intClosed
- This data member may be inherited. It contains the ID of the menu,
tool bar, and accelerator keys to be used by the frame window when the
TFrameWnd::SetClosed() member function is called.
- int TFrameWnd::intFrame
- This data member may be inherited. It contains the ID of the frame
window.
- int TFrameWnd::intOpened
- This data member may be inherited. It contains the ID of the menu,
tool bar, and accelerator keys to be used by the frame window when the
TFrameWnd::SetOpened() member function is called.
- int TFrameWnd::intPrinting
- This data member may be inherited. It contains the ID of the menu,
tool bar, and accelerator keys to be used by the frame window when the
TFrameWnd::SetPrinting() member function is called.
- CMenu TFrameWnd::MenuClosed
- This data member may be inherited. It contains the menu to be
displayed when the TFrameWnd::SetClosed() member function is
called.
- CMenu TFrameWnd::MenuOpened
- This data member may be inherited. It contains the menu to be
displayed when the TFrameWnd::SetOpened() member function is
called.
- CMenu TFrameWnd::MenuPrinting
- This data member may be inherited. It contains the menu to be
displayed when the TFrameWnd::SetPrinting() member function is
called.
- CRegistry* TFrameWnd::Registry
- This data member may be inherited. It contains a pointer to the
CRegistry class used by the
TWinApp class for the application. The
TFrameWnd::OnMove() member function uses it to store the current frame window
position.
- CString TFrameWnd::Text
- This data member may be inherited and used to store strings
temporarily.
- CString TFrameWnd::Title
- This data member may be inherited. It contains the base title for the
frame window and is used by the TFrameWnd::SetClosed(),
TFrameWnd::SetOpened(), and TFrameWnd::SetPrinting()
member functions.
- BOOL TFrameWnd::Up
- This data member may be inherited. It contains the status of the frame
window. It is set to TRUE by the TFrameWnd::LoadFrame()
member function. It is set to FALSE by the
TFrameWnd::OnClose() member function.
[ CBinaryFile
| TCommandLineInfo
| CCommaFile
| TDateCtrl
| CDDE
| CDdeClient
| CDdeServer
]
[ CDirectoryLocator
| CDirectoryDialog
| CDirectoryFind
| CDirectoryNew
| CFileCopy
]
[ InterfaceExcel
| CMaintFn
| CPrintFile
| CProcDialog
| TPrintDialog
| CProcPropertyPage
]
[ CProgress
| CRegistry
| CSDisCreate
| CSDisFile
| CSDisPage
| CSDisView
| CTableFile
]
[ CTaskIcon
| TPresent
| TTime
| TDate
| TDateTime
| CTransferData
| TWinApp
| CXlTable
]
[ Stand-alone Programs
| Standard Library
| Conversion Functions
| Utility Functions
| COBOL Functions
]
[ Windows NT Library
| COBOL Library
| COBOL Interface
| Command Prompt Abbreviations
| Purchase Instructions
]
[ Home
| Areas of Expertise
| "We Do Windows"
| Clients and Projects
| Software Samples
| Package Software Available
]
[ Contact Information
| Business Software Philosophy
| Church Software Philosophy
]
All contents of this web site are Copyright © Titus Information Systems,
Inc., Phoenix, Arizona, U.S.A.