Share via


CWinApp::CWinApp

This constructor creates an instance of a CWinApp object and stores the string in the lpszAppName parameter as the application name.

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 earlier. 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 earlier. This constructor is identical to the constructor used in the desktop implementation of MFC.

Requirements

**  Windows CE versions:** 1.0 and later
  Header file: Declared in Afxwin.h
  Platform: H/PC Pro, Palm-size PC, Pocket PC