Kicking Off
For this article, I'm going to build a simple application that performs statistical calculations. The app will supply a screen that allows the user to enter a set of values. When done, the user can determine that sample set's mean and standard deviation values.
Each eMbedded Visual C++ development project begins with the creation of a project. If you're familiar with the Visual Studio C++ development environment, you'll be right at home in eMbedded VC++. Based on the SDKs downloaded to my machine, the following project options were available when I selected the File, New menu option:
- WCE Application
- WCE ATL COM AppWizard
- WCE Dynamic-Link Library
- WCE MFC ActiveX ControlWizard
- WCE MFC AppWizard (dll)
- WCE MFC AppWizard (exe)
- WCE Pocket PC Application
- WCE Pocket PC MFC AppWizard (exe)
- WCE Static Library
Because I've been doing primarily Java development for the past five years and need all the help I can get to crank up my rusty C++ skills, I selected the option WCE Pocket PC MFC AppWizard. I was presented with a list box entitled CPUs. This box contained a list of all build targets currently configured on my machine, based on the SDKs I downloaded from Microsoft. Finally, I created a project called StatCalc (see Figure 1).
Figure 1 Creating a new project.
At this point, the wizard will step you through four steps needed to create the project and the shell of an application:
Select application type (single document with doc list, single document, or dialog-based). Also, select language in which to store resources. For my StatCalc app, I selected dialog-based and the English language.
Determine which features you want to include (Windows Sockets, ActiveX Controls), and then enter a title for the dialog. I selected neither of the first two options, and gave my dialog a caption of StatCalc 1.0.
Determine whether you want to generate source file comments (I selected Yes) and how you want to use the MFC shared library (as a shared DLL or as a statically linked libraryI selected the DLL option).
AppWizard presents the classes it created for you and gives you the opportunity to rename them. For our sample app, the AppWizard created the CStatCalcApp and CStatCalcDlg classes.