Week 7b - Graphical User Interfaces

Developing Graphical User Interfaces for C++ Applications

Synopsis:

We start with help for Projects, then discuss code examples for WPF GUIs and C++\CLI shims.

Glossary of Terms

  1. Help with Projects:

    All code will be developed using C++ and the Standard C++ Library with latest version of Visual Studio .

    Code grade sheet, Grading policy

  2. Synchronous Discussion:

    • Using one of the tutorials, above, decide how you would layout a Client for Sample Project #4. Draw a sketch of the UI and be prepared to discuss.
  3. SVG demo

    This demo works with Chrome, FireFox, Edge, and IE11. It does not work with IE8 and earlier.

    SVG demo, SVG demo folder
    HTML5 demo

  4. WPF Presentation

  5. Demo code samples

    Demo Panels
    Illustrates how grid, canvas, dock, stack, and wrap panels work.

    Routed Event Demo
    Demonstrates event bubbling with Routed Events.

    Attached Properties Demo
    An example of attached properties used to dock buttons in a window.

    Triggers Demo
    Illustrates one use of triggers to change a textbox property.

    WPF Controls
    Shows how several of the most common kinds of controls are used. Includes use of data binding.

    Data Template Demo
    Data Templates are used to modify how data is displayed in WPF controls.

    Control Template
    Control templates can be used to modify the presentation of window controls.

    Bar Chart Demo
    Illustrates using rectangles to build a bar chart where each bar has a tooltip.

    WPF with all Code A WPF application can be built without using XAML. This demo illustrates how.

    Advanced Demos

    Change Notification
    Dispatcher Demo
    Message Hook
    Custom Element Demo

  6. WPF Tutorials:

  7. Managed C++\CLI and .Net Framework

    • (Managed) C++\CLI Presentation, pptx
      Discussion of C++\CLI syntax, semantics, and environment.
    • C++\CLI Demos
      Simple code demos focusing on interoperation.
    • C++\CLI Syntax Examples
      Several small examples of C++\CLI syntax you will need often.
    • WPF-Interop
      Simple demonstration showing how to interoperate between C++\CLI and native C++, using WPF. Note that you will be required to do this kind of interoperation for Projects #3 and #4.
  8. Lecture Take-aways:

    The most important things we discussed are: