Share via


CWinApp Members

Base Class Members

Data Members

Construction

Operations

Overridables

Initialization

Command Handlers

Base Class Members

CObject Members

CCmdTarget Members

CWinThread Members

Data Members

m_bHelpMode

Indicates if the user is in Help context mode (typically invoked with SHIFT+F1).

m_bUseHtmlHelp

Indicates whether the application uses HTMLHelp or WinHelp.

m_dwRestartManagerSupportFlags

Flags that determine how the restart manager behaves.

m_hInstance

Identifies the current instance of the application.

m_eHelpType

Specifies the type of help used by the application.

m_lpCmdLine

Points to a null-terminated string that specifies the command line for the application.

m_nAutosaveInterval

The length of time in milliseconds between autosaves.

m_nCmdShow

Specifies how the window is to be shown initially.

m_pActiveWnd

Pointer to the main window of the container application when an OLE server is in-place active.

m_pDataRecoveryHandler

Pointer to the data recovery handler for the application.

m_pszAppID

Application User Model ID.

m_pszAppName

Specifies the name of the application.

m_pszExeName

The module name of the application.

m_pszHelpFilePath

The path to the application's Help file.

m_pszProfileName

The application's .INI filename.

m_pszRegistryKey

Used to determine the full registry key for storing application profile settings.

Construction

CWinApp

Constructs a CWinApp object.

Operations

AddDocTemplate

Adds a document template to the application's list of available document templates.

AddToRecentFileList

Adds a filename to the most recently used (MRU) file list.

CreatePrinterDC

Creates a printer device context.

DelRegTree

Deletes a specified key and all its subkeys.

EnableTaskbarInteraction

Enables Taskbar interaction.

GetAppRegistryKey

Returns key for HKEY_CURRENT_USER\"Software"\RegistryKey\ProfileName.

GetFirstDocTemplatePosition

Retrieves the position of the first document template.

GetNextDocTemplate

Retrieves the position of a document template. Can be used recursively.

GetPrinterDeviceDefaults

Retrieves the printer device defaults.

GetProfileBinary

Retrieves binary data from an entry in the application's .INI file.

GetProfileInt

Retrieves an integer from an entry in the application's .INI file.

GetProfileString

Retrieves a string from an entry in the application's .INI file.

GetSectionKey

Returns key for HKEY_CURRENT_USER\"Software"\RegistryKey\AppName\lpszSection.

IsTaskbarInteractionEnabled

Tells whether Windows 7 Taskbar interaction is enabled.

LoadCursor

Loads a cursor resource.

LoadIcon

Loads an icon resource.

LoadOEMCursor

Loads a Windows OEM predefined cursor that the OCR_ constants specify in WINDOWS.H.

LoadOEMIcon

Loads a Windows OEM predefined icon that the OIC_ constants specify in WINDOWS.H.

LoadStandardCursor

Loads a Windows predefined cursor that the IDC_ constants specify in WINDOWS.H.

LoadStandardIcon

Loads a Windows predefined icon that the IDI_ constants specify in WINDOWS.H.

OpenDocumentFile

Called by the framework to open a document from a file.

ParseCommandLine

Parses individual parameters and flags in the command line.

ProcessShellCommand

Handles command-line arguments and flags.

RunAutomated

Tests the application's command line for the /Automation option. Obsolete. Instead, use the value in CCommandLineInfo::m_bRunAutomated after calling ParseCommandLine.

RunEmbedded

Tests the application's command line for the /Embedding option. Obsolete. Instead, use the value in CCommandLineInfo::m_bRunEmbedded after calling ParseCommandLine.

SetAppID

Explicitly sets Application User Model ID for the application. This method should be called before any user interface is presented to user (the best place is the application constructor).

SelectPrinter

Selects a printer previously indicated by a user through a print dialog box.

WriteProfileBinary

Writes binary data to an entry in the application's .INI file.

WriteProfileInt

Writes an integer to an entry in the application's .INI file.

WriteProfileString

Writes a string to an entry in the application's .INI file.

Overridables

ApplicationRecoveryCallback

Called by the framework when the application unexpectedly exits.

CloseAllDocuments

Closes all open documents.

DoMessageBox

Implements AfxMessageBox for the application.

DoWaitCursor

Turns the wait cursor on and off.

ExitInstance

Override to clean up when your application terminates.

GetApplicationRecoveryParameter

Retrieves the input parameter for the application recovery method.

GetApplicationRecoveryPingInterval

Returns the length of time that the restart manager waits for the recovery callback function to return.

GetApplicationRestartFlags

Returns the flags for the restart manager.

GetDataRecoveryHandler

Gets the data recovery handler for this instance of the application.

HideApplication

Hides the application before closing all documents.

HtmlHelp

Calls the HTMLHelp Windows function.

InitInstance

Override to perform Windows instance initialization, such as creating your window objects.

OnDDECommand

Called by the framework in response to a dynamic data exchange (DDE) execute command.

OnIdle

Override to perform application-specific idle-time processing.

PreTranslateMessage

Filters messages before they are dispatched to the Windows functions TranslateMessage and DispatchMessage.

ProcessMessageFilter

Intercepts certain messages before they reach the application.

ProcessWndProcException

Intercepts all unhandled exceptions thrown by the application's message and command handlers.

RestartInstance

Handles an application restart initiated by the restart manager.

RegisterWithRestartManager

Registers the application with the restart manager.

ReopenPreviousFilesAtRestart

Determines whether the restart manager reopens the files that were open when the application exited unexpectedly.

RestoreAutosavedFilesAtRestart

Determines whether the restart manager restores the autosaved files when it restarts the application.

Run

Runs the default message loop. Override to customize the message loop.

SaveAllModified

Prompts the user to save all modified documents.

SupportsApplicationRecovery

Determines whether the restart manager recovers an application that exited unexpectedly.

SupportsAutosaveAtInterval

Determines whether the restart manager autosaves open documents at a regular interval.

SupportsAutosaveAtRestart

Determines whether the restart manager autosaves any open documents when the application restarts.

SupportsRestartManager

Determines whether the application supports the restart manager.

WinHelp

Calls the WinHelp Windows function.

Initialization

EnableHtmlHelp

Implements HTMLHelp for the application, rather than WinHelp.

EnableShellOpen

Allows the user to open data files from the Windows File Manager.

LoadStdProfileSettings

Loads standard .INI file settings and enables the MRU file list feature.

RegisterShellFileTypes

Registers all the application's document types with the Windows File Manager.

Register

Performs customized registration.

SetHelpMode

Sets and initializes the type of help used by the application.

GetHelpMode

Retrieves the type of help used by the application.

SetRegistryKey

Causes application settings to be stored in the registry instead of .INI files.

Unregister

Unregisters everything known to be registered by the CWinApp object.

UnregisterShellFileTypes

Unregisters all the application's document types with the Windows File Manager.

Command Handlers

OnContextHelp

Handles SHIFT+F1 Help within the application.

OnFileNew

Implements the ID_FILE_NEW command.

OnFileOpen

Implements the ID_FILE_OPEN command.

OnFilePrintSetup

Implements the ID_FILE_PRINT_SETUP command.

OnHelp

Handles F1 Help within the application (using the current context).

OnHelpFinder

Handles the ID_HELP_FINDER and ID_DEFAULT_HELP commands.

OnHelpIndex

Handles the ID_HELP_INDEX command and provides a default Help topic.

OnHelpUsing

Handles the ID_HELP_USING command.

See Also

Reference

CWinApp Class

Hierarchy Chart