C++/CX: DirectX OnRamp, Part 2: Working with Application LifeCycle

Previous Blog                                                                                                                                       Next

Oh dear, yet someone else has stated that C++/DirectX is just too difficult.  Well maybe, but I have never been paid to do the easy thing, and I know how to deal with my career when things go badly (on the other hand I don’t do as well when things go good).  Certainly if you just want to build a fun game, there are a great deal of cool tools that you can use like Unity, Construct 2 or YoYo Games. It’s fun to use those, it’s easier, although often not really a lot easier just different.  But it is the Software Architect that is the chef of the kitchen, everyone else are cooks, necessary, creative, but they don’t get the whole picture.  So if you are attending a school like USC or UCLA or similar (including the U.S. Ivy League  North Eastern Schools) you are expected to understand the whole thing.

But when I think about,  just how did the great games like Crimson Skies (PC Version), Mech Commanders or others succeed if DirectX was so unapproachable?

Let’s dig in, and make sure to reference http://www.DirectXTutorials.com, Lesson 4, and my aim to figure out how to deliver this message: DirectX is a little more difficult, but not a lot more difficult. 

App execution stateState diagram showing transitions between app execution states

The http://www.DirectXTutorials.com show a similar image, this one is from the link App execution state (scroll down a little). 

Each state is described at this link: ApplicationExecutionState enumeration

To get through this, using Windows 8 and VS 2012 or Windows 8.1 and VS 2013 (CS 188 students should do be using Windows 8.1 and VS 2013).  Follow the tutorial on DirectXTutorials at

Link>> Lesson 4: The Application Lifecycle <<Link

Lesson 4 works for both Windows 8 and Windows 8.1.

At the end of that lesson you will have set-up the process to deal with the suspending of your app and closing of your app.

Not really related to DirectX, but on the use of Popups

MessageBox and similar popups:

MessageDialog^ msg = ref new MessageDialog("You pressed a key.");


See the article at: MessageDialog class , the article also shows you how to add buttons to the dialog box.  Dialog boxes are not the best user input, but during testing and even in release they are useful.

Comments (0)

Skip to main content