AfxGetApp

Syntax

CWinApp* AfxGetApp( );

Remarks

Returns a pointer to the one and only CWinApp object for the Windows application. This pointer is useful for getting access to the main message dispatch code or the topmost window.

Return Value

A pointer to a CWinApp object.