Creating an Application

In the Windows CE Toolkit for Visual C++, as in Visual C++, a single project workspace contains all your projects and files.

Use one of the application wizards to automatically create a new project and new project workspace. The following table shows each Windows CE application wizard.

Application Wizard Type of Application Created
WCE Application An empty project, a standard Windows CE-based application, or a Windows CE-based “Hello World” application
WCE Static Library A Windows CE static library
WCE Dynamic-Link Library An empty or standard Windows CE dynamic-link library
WCE MFC AppWizard (.dll) An MFC for Windows CE dynamic-link library
WCE MFC AppWizard (.exe) An MFC for Windows CE executable application
WCE MFC ActiveX Control Wizard An MFC for Windows CE ActiveX control
WCE ATL COM AppWizard An ATL for Windows CE COM object

When you create an application with one of the application wizards, the wizard automatically generates source and header files for your application, as well as a text file that describes the contents of each file. In addition, the MFC and ATL application wizards generate a complete suite of source, header, and resource files based on classes from the MFC for Windows CE or ATL for Windows CE class libraries.

During the creation of your project, the application wizards provide you with a number of options enabling you to customize your application’s starter files. For example, if you create an MFC application, you can choose whether or not your application will support the MFC document/view architecture. An application wizard does not generate starter files if you create an empty Windows CE application, an empty dynamic-link library, or a Windows CE static library that does not contain a precompiled heading file.

    To create a new project

  1. Choose New on the Visual Studio File menu.
  2. Choose the Projects tab in the New dialog box.
  3. Select the type of Windows CE-based application you want to create.
  4. Select your target platforms in the Platforms check-box list.
  5. Enter your project name in the Project Name field, and then choose OK.

    One or more dialog boxes appear that enable you to customize the application. Each application wizard uses a unique set of dialog boxes.

    For the most part, you are free to select whatever features you want during this process. However, when you create an MFC ActiveX control with the WCE MFC AppWizard (.exe), you must select the As a shared DLL check box in the third WCE MFC AppWizard dialog box. You can link statically to MFC if your MFC application is not an ActiveX control.

    MFC for Windows CE, version 2.0 does not support the CControlBar class, which is used to create command bars in the current version. If you are building an application for a device that supports MFC for Windows CE 2.0, select the MFC 2.0-compatible Command Bar on the second WCE MFC AppWizard dialog box. This is the default selection.

  6. On each dialog box, select the features you want and choose Next to proceed to the next dialog box or Finish when you have completed the last dialog box.
  7. Confirm the specifications of your new skeleton project in the New Product Information dialog box, and then click OK.

The new project is now available in your workspace to be viewed using the ClassView, ResourceView, and FileView tabs. However, the ResourceView tab is available only for projects created with the WCE MFC and ATL wizards. None of these tabs is available for empty projects.

To learn more about the files created by the AppWizard, select the FileView tab and double-click the ReadMe.txt file for the new project.