CWinAppEx Class
CWinAppEx handles the application state, saves the state to the registry, loads the state from the registry, initializes application managers, and provides links to those same application managers.
class CWinAppEx : public CWinApp
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CWinAppEx object. |
Public Methods
Name |
Description |
---|---|
Removes information about the application from the Windows registry. |
|
Specifies whether the application will load the initial size and location of the main frame window from the registry. |
|
Enables tear-off menus for the application. |
|
Enables the user to create custom menu commands in the application. |
|
Called by the framework from within the Run member function to exit this instance of the application. (Overrides CWinApp::ExitInstance.) |
|
Reads binary data that is associated with the specified registry value. |
|
Returns a pointer to the global CContextMenuManager object. |
|
|
|
Returns the major version of the application saved in the Windows registry. |
|
Returns the minor version of the application saved in the Windows registry. |
|
Reads numeric data that is associated with the specified value from the registry. |
|
Returns a pointer to the global CKeyboardManager object. |
|
Returns a pointer to the global CMouseManager object. |
|
Reads CObject-derived data that is associated with the specified value from the registry. |
|
Returns a string that is the path of a registry key. This path concatenates the supplied relative path with the application path. |
|
Returns the registry path for the application. |
|
Reads binary data that is associated with the specified key and value from the registry. |
|
Reads numeric data from the registry associated with the specified key and value. |
|
Reads CObject data that is associated with the specified key and value from the registry. |
|
Reads string data that is associated with the specified key and value from the registry. |
|
Returns a pointer to the global CShellManager object. |
|
Reads string data that is associated with the specified value from the registry. |
|
Returns a pointer to the global CTooltipManager object. |
|
Returns a pointer to the global CUserToolsManager object. |
|
Initializes the CContextMenuManager object. |
|
Initializes the CKeyboardManager object. |
|
Initializes the CMouseManager object. |
|
Initializes the CShellManager class |
|
Initializes the CTooltipManager class. |
|
|
|
Indicates whether the specified key is in the registry. |
|
Loads the application state from the registry. |
|
Called by the framework when the user requests context help for the Customization dialog box. |
|
Calls the user-defined command when the user double-clicks anywhere in the application. |
|
|
|
Writes the state of the application framework to the Windows registry. |
|
Sets the path of the default registry key. This key will serve as a root for all subsequent registry calls. |
|
Displays a popup menu. |
|
Writes the binary data to the specified registry value. |
|
Writes the numeric data to the specified registry value. |
|
Writes data that is derived from the CObject Class to the specified registry value. |
|
Writes the binary data to a value of the specified registry key. |
|
Writes the numeric data to a value of the specified registry key. |
|
Writes data derived from the CObject class to a value of the specified registry key. |
|
Writes the string data to a value of the specified registry key. |
|
Writes the string data to the specified registry value. |
Protected Methods
Name |
Description |
---|---|
Called by the framework when the application state has been loaded. |
|
Called by the framework when it loads the size and location of your application from the registry. The loaded data includes the size and location of the main frame at the time your application last closed. |
|
Called by the framework when a main frame window is processing WM_CLOSE. |
|
Called by the framework immediately before the application state is loaded. |
|
Called by the framework immediately before the application state is saved. |
|
Reloads the size and location of the supplied window from the registry |
|
Called by the framework after it writes the application state to the registry. |
|
Called by the framework to write the size and location of the main frame to the registry. |
Data Members
Name |
Description |
---|---|
Specifies whether the framework will reset all toolbar images when the frame window that contains the toolbar is loaded. |
Remarks
Much of the functionality provided by the MFC framework depends on the CWinAppEx class. You can incorporate the CWinAppEx class into your application in one of two ways:
Construct a CWinAppEx class in the main thread.
Derive the main application class from CWinAppEx.
After you incorporate CWinAppEx into your application, you can initialize any one of the application managers. Before you use an application manager, you must initialize it by calling the appropriate initialize method. To obtain a pointer to a specific manager, call the associated get method. The CWinAppEx class manages the following application managers: CMouseManager Class, CContextMenuManager Class, CKeyboardManager Class, CUserToolsManager Class, and CMenuTearOffManager Class.
Inheritance Hierarchy
Requirements
Header: afxwinappex.h