Jump to content

Operating Systems (Hands-On)/Case Study Windows/Windows System Programming

Program Screenshot
Screenshot of the finished program, before any buttons are clicked.

Instructions

[edit | edit source]

Get the code from Module 1. Your First Windows Program working in the development environment of your choice. (I strongly recommend that you choose Visual Studio.) Then, complete the following tasks:

  1. Create the window shown above.
  2. Respond to button presses: 1. When you click One, display the word ONE in large letters in the blank space on the window. 2. When you click Two, display the word TWO in large letters in the blank space on the window. 3. When you click Quit, close the window and have the program exit.
  3. When the window is closed using the window controls, the program should exit.
  4. Add at least one additional behavior to the button clicks. Ideas include: 1. Change the background color of the window. 2. Change the title of the window. 3. Make the Quit button run away from the mouse so it cannot be clicked. (This one is harder and will earn extra credit.) 4. Something creative. (The better it is, the more extra credit you will receive.)

Hints

[edit | edit source]
  • The primary controls you will need are:
  • Fonts and colors are intentionally left for you to research. Remember when I said in lecture that documentation navigation is a key Windows programming skill? This is your chance to practice it.
  • It’s all about messages. You can post messages to quit applications. You can send messages to change control properties.

Don’t think method invocation—think “what messages do I send?”