CWinApp::CWinApp

This constructor constructs a CWinApp object and stores the string in the lpszAppName parameter as the application name.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

CWinApp ( LPCTSTR lpszAppName, LPCTSTR lpszHelpName = _T("") );

CWinApp(LPCTSTR lpszAppName = NULL);

Parameters

lpszAppName
Long pointer to a null-terminated string that contains the application name that Windows CE uses. This parameter is mandatory in versions 1.0 and 2.0 of MFC for Windows CE; it is optional in versions 2.10 and later.
lpszHelpName
Long pointer to a null-terminated string that contains the name of the help file that Windows CE uses. This parameter is optional.

Remarks

If you are using versions 1.0 and 2.0 of MFC for Windows CE, you must use the use the first implementation of the constructor that appears in the Syntax section. In this implementation, you must provide a value for the lpszAppName parameter, and may optionally provide the name of a help file in the lpszHelpName parameter.

You specify a help file to be used with the application as follows.

CWinApp(_T("My App"), _T("myApp.htc"));

If you are using version 2.10 or later, you must use the second implementation of the constructor that appears in the Syntax section. This constructor is identical to the constructor used in the desktop implementation of MFC.