DEVELOPING WINDOWS 8 APPS

Visual C++ provides specialized facilities for developing Windows 8 apps that differ in many respects from what you have used up to now. To get an understanding of the development environment for them you should now create a project for a Windows 8 app. You’ll be exploring and working with this project throughout this chapter.

Create a new C++ project by pressing Ctrl+Shift+N. Select the Windows 8 style option for Visual C++ in the left pane and click on the Blank App (XAML) template. This template creates a project with no UI controls predefined, just a Grid layout element covering the entire page, so you will create everything else from scratch later in this chapter. You can give the project the name MemoryTest and choose a folder for the solution if you don’t like the default. Click OK to create the project.

Display the Solution Explorer pane. The first thing to note is that there are two .xaml files in the list. App.xaml defines the application and MainPage.xaml defines the UI page. A Windows 8 app always has one or more pages that define the UI, and each one will be defined by a separate .xaml file. Double-click on MainPage.xaml to display it. You’ll see two editing panes. One is the Design pane where you can extend and modify the UI page graphically, and the other shows the listing of the XAML for the UI page. The XAML defines what is displayed in the Design pane. You can work with either of these, and changes you make in one pane will be automatically ...

Get Ivor Horton's Beginning Visual C++ 2012 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.