Поделиться через


AfxGetApp

The pointer returned by this function can be used to access application information such as the main message-dispatch code or the topmost window.

CWinApp* AFXAPI AfxGetApp( ); 

Возвращаемое значение

A pointer to the single CWinApp object for the application.

Пример

// Print the application's executable filename.
TRACE(_T("Executable filename = %s\n"), AfxGetApp()->m_pszExeName);

Требования

Header: afxwin.h

См. также

Основные понятия

MFC Macros and Globals