home     download     screen shots     bugs     mailing list     example output     generated MFC docs     help     tools and utilities


 Overview   Project   Class   Tree   Index 
MFC Class Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

MFC
Class CWinApp

CObject
   |
   +--CCmdTarget
         |
         +--CWinThread
               |
               +--CWinApp

   in AFXWIN.H
Direct Known Subclasses:
COleControlModule

class CWinApp
extends CWinThread

CWinApp - the root of all Windows applications


Field Summary
 ATOM m_atomApp
          
 ATOM m_atomSystemTopic
          
 BOOL m_bHelpMode
          
protected DWORD m_dwPromptContext
          
protected HCURSOR m_hcurWaitCursorRestore
          
protected HGLOBAL m_hDevMode
          
protected HGLOBAL m_hDevNames
          
 HINSTANCE m_hInstance
          
 HINSTANCE m_hPrevInstance
          
 LPTSTR m_lpCmdLine
          
 void( AFXAPI* )() m_lpfnDaoTerm
          
 int m_nCmdShow
          
 UINT m_nNumPreviewPages
          
 size_t m_nSafetyPoolSize
          
protected int m_nWaitCursorCount
          
 CCommandLineInfo* m_pCmdInfo
          
 CDocManager* m_pDocManager
          
protected CRecentFileList* m_pRecentFileList
          
 LPCTSTR m_pszAppName
          
 LPCTSTR m_pszExeName
          
 LPCTSTR m_pszHelpFilePath
          
 LPCTSTR m_pszProfileName
          
 LPCTSTR m_pszRegistryKey
          
protected static AFX_CORE_DATA const AFX_MSGMAP messageMap
          
   
Fields inherited from class CWinThread
m_pMainWnd, m_pActiveWnd, m_bAutoDelete, m_hThread, m_nThreadID, m_msgCur, m_pThreadParams, m_pfnThreadProc, m_lpfnOleTermOrFreeLib, m_pMessageFilter, m_ptCursorLast, m_nMsgLast
   
Fields inherited from class CCmdTarget
messageMap, commandMap, dispatchMap, connectionMap, interfaceMap, eventsinkMap, m_dwRef, m_pOuterUnknown, m_xInnerUnknown, m_xDispatch, m_bResultExpected, m_xConnPtContainer
   
Fields inherited from class CObject
classCObject
 
Constructor Summary
CWinApp( LPCTSTR lpszAppName = NULL )
          
virtual ~CWinApp()
          
 
Method Summary
 void AddDocTemplate( CDocTemplate* pTemplate )
          
 virtual void AddToRecentFileList( LPCTSTR lpszPathName )
          
 void CloseAllDocuments( BOOL bEndSession )
          
 BOOL CreatePrinterDC( CDC& dc )
          
 LONG DelRegTree( HKEY hParentKey, const CString& strKeyName )
          
 void DevModeChange( LPTSTR lpDeviceName )
          
 virtual int DoMessageBox( LPCTSTR lpszPrompt, UINT nType, UINT nIDPrompt )
          
 int DoPrintDialog( CPrintDialog* pPD )
          
 BOOL DoPromptFileName( CString& fileName, UINT nIDSTitle, DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate )
          
 virtual void DoWaitCursor( int nCode )
          
protected BOOL Enable3dControls()
          
protected BOOL Enable3dControlsStatic()
          
 void EnableModeless( BOOL bEnable )
          
protected void EnableShellOpen()
          
 virtual int ExitInstance()
          
 HKEY GetAppRegistryKey()
          
 POSITION GetFirstDocTemplatePosition() const
          
protected virtual const AFX_MSGMAP* GetMessageMap() const
          
 CDocTemplate* GetNextDocTemplate( POSITION& pos ) const
          
 int GetOpenDocumentCount()
          
 BOOL GetPrinterDeviceDefaults( struct tagPDA* pPrintDlg )
          
 BOOL GetProfileBinary( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPBYTE* ppData, UINT* pBytes )
          
 UINT GetProfileInt( LPCTSTR lpszSection, LPCTSTR lpszEntry, int nDefault )
          
 CString GetProfileString( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault = NULL )
          
 HKEY GetSectionKey( LPCTSTR lpszSection )
          
 void HideApplication()
          
 virtual BOOL InitApplication()
          
 virtual BOOL InitInstance()
          
 HCURSOR LoadCursor( UINT nIDResource ) const
          
 HCURSOR LoadCursor( LPCTSTR lpszResourceName ) const
          
 HICON LoadIcon( LPCTSTR lpszResourceName ) const
          
 HICON LoadIcon( UINT nIDResource ) const
          
 HCURSOR LoadOEMCursor( UINT nIDCursor ) const
          
 HICON LoadOEMIcon( UINT nIDIcon ) const
          
 HCURSOR LoadStandardCursor( LPCTSTR lpszCursorName ) const
          
 HICON LoadStandardIcon( LPCTSTR lpszIconName ) const
          
protected void LoadStdProfileSettings( UINT nMaxMRU = 4 )
          
protected void OnAppExit()
          
protected void OnContextHelp()
          
 virtual BOOL OnDDECommand( LPTSTR lpszCommand )
          
protected void OnFileNew()
          
protected void OnFileOpen()
          
protected void OnFilePrintSetup()
          
protected void OnHelp()
          
protected void OnHelpFinder()
          
protected void OnHelpIndex()
          
protected void OnHelpUsing()
          
 virtual BOOL OnIdle( LONG lCount )
          
protected BOOL OnOpenRecentFile( UINT nID )
          
protected void OnUpdateRecentFileMenu( CCmdUI* pCmdUI )
          
 virtual CDocument* OpenDocumentFile( LPCTSTR lpszFileName )
          
 void ParseCommandLine( CCommandLineInfo& rCmdInfo )
          
 BOOL ProcessShellCommand( CCommandLineInfo& rCmdInfo )
          
 virtual LRESULT ProcessWndProcException( CException* e, const MSG* pMsg )
          
protected void RegisterShellFileTypes( BOOL bCompat = FALSE )
          
protected void RegisterShellFileTypesCompat()
          
 virtual int Run()
          
 BOOL RunAutomated()
          
 BOOL RunEmbedded()
          
 virtual BOOL SaveAllModified()
          
protected void SaveStdProfileSettings()
          
 void SelectPrinter( HANDLE hDevNames, HANDLE hDevMode, BOOL bFreeOld = TRUE )
          
 void SetCurrentHandles()
          
protected void SetDialogBkColor( COLORREF clrCtlBk = RGB( 192, 192, 192 ), COLORREF clrCtlText = RGB( 0, 0, 0 ) )
          
protected void SetRegistryKey( LPCTSTR lpszRegistryKey )
          
protected void SetRegistryKey( UINT nIDRegistryKey )
          
 BOOL Unregister()
          
protected void UnregisterShellFileTypes()
          
protected void UpdatePrinterSelection( BOOL bForceDefaults )
          
 virtual void WinHelp( DWORD dwData, UINT nCmd = HELP_CONTEXT )
          
 BOOL WriteProfileBinary( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPBYTE pData, UINT nBytes )
          
 BOOL WriteProfileInt( LPCTSTR lpszSection, LPCTSTR lpszEntry, int nValue )
          
 BOOL WriteProfileString( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszValue )
          
   
Methods inherited from class CWinThread
CreateThread, HANDLE, GetThreadPriority, SetThreadPriority, SuspendThread, ResumeThread, PostThreadMessage, InitInstance, Run, PreTranslateMessage, PumpMessage, OnIdle, IsIdleMessage, ExitInstance, ProcessWndProcException, ProcessMessageFilter, GetMainWnd, CommonConstruct, Delete, DispatchThreadMessageEx, DispatchThreadMessage
   
Methods inherited from class CCmdTarget
GetIDispatch, FromIDispatch, IsResultExpected, EnableAutomation, EnableConnections, BeginWaitCursor, EndWaitCursor, RestoreWaitCursor, EnumOleVerbs, DoOleVerb, OnCmdMsg, OnFinalRelease, IsInvokeAllowed, EnableTypeLib, GetTypeInfoOfGuid, GetDispatchIID, GetTypeInfoCount, GetTypeLibCache, GetTypeLib, GetNotSupported, SetNotSupported, GetRoutingView, GetRoutingFrame, GetRoutingView_, GetRoutingFrame_, GetMessageMap, GetCommandMap, GetDispatchMap, GetConnectionMap, GetInterfaceMap, GetEventSinkMap, EnableAggregation, ExternalDisconnect, GetControllingUnknown, InternalQueryInterface, InternalAddRef, InternalRelease, ExternalQueryInterface, ExternalAddRef, ExternalRelease, GetInterface, QueryAggregates, OnCreateAggregates, GetInterfaceHook, GetStandardProp, SetStandardProp, GetEntryCount, GetDispEntry, MemberIDFromName, GetStackSize, PushStackArgs, CallMemberFunc, OnEvent, GetEventSinkEntry, GetExtraConnectionPoints, GetConnectionHook
   
Methods inherited from class CObject
GetRuntimeClass, new, new, delete, IsSerializable, IsKindOf, Serialize
 

Field Detail

m_atomApp

public ATOM m_atomApp;

m_atomSystemTopic

public ATOM m_atomSystemTopic;

m_bHelpMode

public BOOL m_bHelpMode;

m_dwPromptContext

protected DWORD m_dwPromptContext;

m_hcurWaitCursorRestore

protected HCURSOR m_hcurWaitCursorRestore;

m_hDevMode

protected HGLOBAL m_hDevMode;

m_hDevNames

protected HGLOBAL m_hDevNames;

m_hInstance

public HINSTANCE m_hInstance;

m_hPrevInstance

public HINSTANCE m_hPrevInstance;

m_lpCmdLine

public LPTSTR m_lpCmdLine;

m_lpfnDaoTerm

public void( AFXAPI* m_lpfnDaoTerm )();

m_nCmdShow

public int m_nCmdShow;

m_nNumPreviewPages

public UINT m_nNumPreviewPages;

m_nSafetyPoolSize

public size_t m_nSafetyPoolSize;

m_nWaitCursorCount

protected int m_nWaitCursorCount;

m_pCmdInfo

public CCommandLineInfo* m_pCmdInfo;

m_pDocManager

public CDocManager* m_pDocManager;

m_pRecentFileList

protected CRecentFileList* m_pRecentFileList;

m_pszAppName

public LPCTSTR m_pszAppName;

m_pszExeName

public LPCTSTR m_pszExeName;

m_pszHelpFilePath

public LPCTSTR m_pszHelpFilePath;

m_pszProfileName

public LPCTSTR m_pszProfileName;

m_pszRegistryKey

public LPCTSTR m_pszRegistryKey;

messageMap

protected static AFX_CORE_DATA const AFX_MSGMAP messageMap;


Constructor Detail

CWinApp

public CWinApp( LPCTSTR lpszAppName = NULL );

~CWinApp

public virtual ~CWinApp();


Method Detail

AddDocTemplate

public void AddDocTemplate( CDocTemplate* pTemplate );

AddToRecentFileList

public virtual void AddToRecentFileList( LPCTSTR lpszPathName );

CloseAllDocuments

public void CloseAllDocuments( BOOL bEndSession );

CreatePrinterDC

public BOOL CreatePrinterDC( CDC& dc );

DelRegTree

public LONG DelRegTree( HKEY hParentKey, const CString& strKeyName );

DevModeChange

public void DevModeChange( LPTSTR lpDeviceName );

DoMessageBox

public virtual int DoMessageBox( LPCTSTR lpszPrompt, UINT nType, UINT nIDPrompt );

DoPrintDialog

public int DoPrintDialog( CPrintDialog* pPD );

DoPromptFileName

public BOOL DoPromptFileName( CString& fileName, UINT nIDSTitle, DWORD lFlags, BOOL bOpenFileDialog, CDocTemplate* pTemplate );

DoWaitCursor

public virtual void DoWaitCursor( int nCode );

Enable3dControls

protected BOOL Enable3dControls();

Enable3dControlsStatic

protected BOOL Enable3dControlsStatic();

EnableModeless

public void EnableModeless( BOOL bEnable );

EnableShellOpen

protected void EnableShellOpen();

ExitInstance

public virtual int ExitInstance();

GetAppRegistryKey

public HKEY GetAppRegistryKey();

GetFirstDocTemplatePosition

public POSITION GetFirstDocTemplatePosition() const;

GetMessageMap

protected virtual const AFX_MSGMAP* GetMessageMap() const;

GetNextDocTemplate

public CDocTemplate* GetNextDocTemplate( POSITION& pos ) const;

GetOpenDocumentCount

public int GetOpenDocumentCount();

GetPrinterDeviceDefaults

public BOOL GetPrinterDeviceDefaults( struct tagPDA* pPrintDlg );

GetProfileBinary

public BOOL GetProfileBinary( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPBYTE* ppData, UINT* pBytes );

GetProfileInt

public UINT GetProfileInt( LPCTSTR lpszSection, LPCTSTR lpszEntry, int nDefault );

GetProfileString

public CString GetProfileString( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszDefault = NULL );

GetSectionKey

public HKEY GetSectionKey( LPCTSTR lpszSection );

HideApplication

public void HideApplication();

InitApplication

public virtual BOOL InitApplication();

InitInstance

public virtual BOOL InitInstance();

LoadCursor

public HCURSOR LoadCursor( UINT nIDResource ) const;

LoadCursor

public HCURSOR LoadCursor( LPCTSTR lpszResourceName ) const;

LoadIcon

public HICON LoadIcon( LPCTSTR lpszResourceName ) const;

LoadIcon

public HICON LoadIcon( UINT nIDResource ) const;

LoadOEMCursor

public HCURSOR LoadOEMCursor( UINT nIDCursor ) const;

LoadOEMIcon

public HICON LoadOEMIcon( UINT nIDIcon ) const;

LoadStandardCursor

public HCURSOR LoadStandardCursor( LPCTSTR lpszCursorName ) const;

LoadStandardIcon

public HICON LoadStandardIcon( LPCTSTR lpszIconName ) const;

LoadStdProfileSettings

protected void LoadStdProfileSettings( UINT nMaxMRU = 4 );

OnAppExit

protected void OnAppExit();

OnContextHelp

protected void OnContextHelp();

OnDDECommand

public virtual BOOL OnDDECommand( LPTSTR lpszCommand );

OnFileNew

protected void OnFileNew();

OnFileOpen

protected void OnFileOpen();

OnFilePrintSetup

protected void OnFilePrintSetup();

OnHelp

protected void OnHelp();

OnHelpFinder

protected void OnHelpFinder();

OnHelpIndex

protected void OnHelpIndex();

OnHelpUsing

protected void OnHelpUsing();

OnIdle

public virtual BOOL OnIdle( LONG lCount );

OnOpenRecentFile

protected BOOL OnOpenRecentFile( UINT nID );

OnUpdateRecentFileMenu

protected void OnUpdateRecentFileMenu( CCmdUI* pCmdUI );

OpenDocumentFile

public virtual CDocument* OpenDocumentFile( LPCTSTR lpszFileName );

ParseCommandLine

public void ParseCommandLine( CCommandLineInfo& rCmdInfo );

ProcessShellCommand

public BOOL ProcessShellCommand( CCommandLineInfo& rCmdInfo );

ProcessWndProcException

public virtual LRESULT ProcessWndProcException( CException* e, const MSG* pMsg );

RegisterShellFileTypes

protected void RegisterShellFileTypes( BOOL bCompat = FALSE );

RegisterShellFileTypesCompat

protected void RegisterShellFileTypesCompat();

Run

public virtual int Run();

RunAutomated

public BOOL RunAutomated();

RunEmbedded

public BOOL RunEmbedded();

SaveAllModified

public virtual BOOL SaveAllModified();

SaveStdProfileSettings

protected void SaveStdProfileSettings();

SelectPrinter

public void SelectPrinter( HANDLE hDevNames, HANDLE hDevMode, BOOL bFreeOld = TRUE );

SetCurrentHandles

public void SetCurrentHandles();

SetDialogBkColor

protected void SetDialogBkColor( COLORREF clrCtlBk = RGB( 192, 192, 192 ), COLORREF clrCtlText = RGB( 0, 0, 0 ) );

SetRegistryKey

protected void SetRegistryKey( LPCTSTR lpszRegistryKey );

SetRegistryKey

protected void SetRegistryKey( UINT nIDRegistryKey );

Unregister

public BOOL Unregister();

UnregisterShellFileTypes

protected void UnregisterShellFileTypes();

UpdatePrinterSelection

protected void UpdatePrinterSelection( BOOL bForceDefaults );

WinHelp

public virtual void WinHelp( DWORD dwData, UINT nCmd = HELP_CONTEXT );

WriteProfileBinary

public BOOL WriteProfileBinary( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPBYTE pData, UINT nBytes );

WriteProfileInt

public BOOL WriteProfileInt( LPCTSTR lpszSection, LPCTSTR lpszEntry, int nValue );

WriteProfileString

public BOOL WriteProfileString( LPCTSTR lpszSection, LPCTSTR lpszEntry, LPCTSTR lpszValue );

 Overview   Project   Class   Tree   Index 
MFC Class Library
CppDoc v2.3.1
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD