1 / 14

CITA 342 Section 1

CITA 342 Section 1. Visual Programming. Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming. These visual expressions may be used as graphical interfaces for textual programming languages (such as Visual C++).

mkirk
Download Presentation

CITA 342 Section 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CITA 342 Section 1 Visual Programming

  2. Visual Programming • Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming. • These visual expressions may be used as graphical interfaces for textual programming languages (such as Visual C++).

  3. GUI(Graphical User Interface) • A GUI (usually pronounced GOO-ee) is a graphical (rather than purely textual) user interface to a computer.

  4. OOP • Most of the design work for this course is based on the programming approach called object oriented programming (OOP). • Each graphical interface element is defined as a class from which you can create object instances for your application. You can code or modify prepackaged methods that an object will use to respond to user stimuli.

  5. Windows GUI Services • Windowing • Create, move, resize, display, hide, clip, minimize, restore, maximize… • Commands • Menus, toolbar… • Graphical elements • Icons, buttons, standard shapes, lines… • Combinations • Dialogs, edit box, list box...

  6. Windows Model • Windows is event-driven, message-based. • Virtually everything that happens is in response to a message regarding some kind of event.

  7. Events • Mouse event, keyboard event, window resizing, menu selection, timer hit, window creation and destruction, etc. • Program must respond to many different events that can come in any order. • Multiple events can be triggered and queued for processing.

  8. Messages • Windows events are communicated via messages. • Each hardware and user action causes one or more messages to be generated. • Example: • Press the ‘a’ key • WM_KEYDOWN, WM_KEYUP, and WM_CHAR messages generated • Approximately 200 different WM messages.

  9. Windows Program Logic • Initialize • Wait for a Windows event and receive the message • Process the message • Goto wait

  10. Visual C++ Components • Visual C++ consists of several complete Windows application development systems in one product. • You can use many Visual C++ tools, including the resource editors, to make low-level programming easier. • You can also use application framework libraries such as the MFC library to further speed your Windows-based application development.

  11. Visual Studio • Visual Studio is a suite of developer tools that includes Visual C++. The Visual Studio integrated development environment (IDE) is shared by several tools, including Visual C++, Visual C#, and Visual Basic.

  12. Microsoft Foundation Classes (MFC) • A class library. • Support is integrated into the compiler environment. • Modern versions of Windows operating system are written in Visual C++ using the MFC library. • There are more than 200 MFC classes.

  13. MFC Source Code • MFC library is shipped with its source code so that advanced users may examine its intricacies and find ways to use its code more effectively. • Having the source code available is often useful in debugging a program as well.

  14. MFC Advantages • Windows program interfaces with MFC library at execution time through one or more dynamic link libraries (.dll files). This makes MFC programs potentially smaller and more efficient. • There are tens of thousands of lines of previously written and tested code in MFC library, and the principal of reusability tells us to use it where doing so can save time, money, or effort.

More Related