CWinApp Methods

Construction Methods

Method Description
CWinApp Constructs a CWinApp object.

Operations Methods

Method Description
LoadCursor Loads a cursor resource.
LoadIcon Loads an icon resource.
LoadStandardCursor Loads a Windows CE OEM predefined cursor that the OCR_ constants specify in Windows.h.
LoadStandardIcon Loads a Windows CE predefined icon that the IDI_* constants specify in Windows.h.
LoadOEMIcon Loads a Windows OEM predefined icon that the OIC_* constants specify in Windows.h.
ParseCommandLine Parses individual parameters and flags in the command line.
ProcessShellCommand Handles command-line arguments and flags.
GetProfileInt Retrieves an integer from an entry in the application’s .ini file.
WriteProfileInt Writes an integer to an entry in the application’s .ini file.
GetProfileString Retrieves a string from an entry in the application’s .ini file.
WriteProfileString Writes a string to an entry in the application’s .ini file.
AddDocTemplate Adds a document template to the application’s list of available document templates.
GetFirstDocTemplatePosition Retrieves the position of the first document template.
GetNextDocTemplate Retrieves the position of a document template. Can be used recursively.
OpenDocumentFile Called by the framework to open a document from a file.
AddToRecentFileList Adds a filename to the most recently used (MRU) file list.

Overridable Methods

Method Description
InitApplication Override to perform any application-level initialization.
InitInstance Override to perform Windows CE instance initialization, such as creating your window objects.
Run Runs the default message loop. Override to customize the message loop.
OnIdle Override to perform application-specific idle-time processing.
ExitInstance Override to clean up when your application terminates.
HideApplication Hides the application before closing all documents.
CloseAllDocuments Closes all open documents.
SaveAllModified Prompts the user to save all modified documents.
DoMessageBox Implements AfxMessageBox for the application.
ProcessMessageFilter Intercepts certain messages before they reach the application.
ProcessWndProcException Intercepts all unhandled exceptions thrown by the application’s message and command handlers.
DoWaitCursor Turns the wait cursor on and off.
OnDDECommand Called by the framework in response to a dynamic data exchange (DDE) execute command.
WinHelp Calls the WinHelp Windows CE function.

Initialization Methods

Method Description
LoadStdProfileSettings Loads standard .ini file settings and enables the MRU file list feature.
SetDialogBkColor Sets the default background color for dialog boxes and message boxes.
SetRegistryKey Causes application settings to be stored in the registry instead of .ini files.

Command Handlers Methods

Method Description
OnFileNew Implements the ID_FILE_NEW command.
OnFileOpen Implements the ID_FILE_OPEN command.
OnHelp Handles F1 Help within the application (using the current context).