다음을 통해 공유


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.

설명

If this method returns NULL, it might indicate that the application’s main window has not been fully initialized yet. It might also indicate a problem.

예제

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

요구 사항

헤더: afxwin.h

참고 항목

개념

MFC 매크로 및 전역