Message Mapping Mechanisms in MFC and Other Applications in Visual C++

Slides:



Advertisements
Similar presentations
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Advertisements

Editing Your Faculty Homepage  This tutorial will go through the steps for editing your Faculty homepage.  Thank you to Ryan Vyborny for letting me use.
Automating Tasks With Macros
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Introduction to PowerPoint By Ian Cole Lecturer in C&IT (Communications and Information Technology) University of York Department of Health Sciences.
1 Pertemuan 02 Visual Basic Environment and Control Matakuliah: D0524 / Algoritma dan Pemrograman Komputer Tahun: 2005 Versi:
Introduction to eValid Presentation Outline What is eValid? About eValid, Inc. eValid Features System Architecture eValid Functional Design Script Log.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Access Tutorial 10 Automating Tasks with Macros
Guide to MCSE , Second Edition, Enhanced 1 Objectives Understand and use the Control Panel applets Describe the versatility of the Microsoft Management.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
Visual C++ Lecture 11 Friday, 29 Aug Windows Graphic User Interface l Event driven programming environment l Windows graphic libraries (X11 on Unix,
A1 Visual C++.NET Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Quick Introduction The following.
1 Software Systems Development CEN Spring 2011 TR 12:30 PM – 1:45 PM ENB 116 Instructor:Dr. Rollins Turner Dept. of Computer Science and Engineering.
University of Sunderland COM 220 Lecture Six Slide 1 Building Interactive Forms Applications using Oracle.
© Chinese University, CSE Dept. Distributed Systems / Simple Example Open Microsoft Visual Studio 2005:
Today’s Agenda Chapter 7 Review for Midterm. Data Transfer Tools DTS (Data Transformation Services) BCP (Bulk Copy Program) BULK INSERT command Other.
TUTORIAL 9 INSTRUCTOR: HANIF ULLAH ID: OFFICE #: 2029 DATE: 22/04/2012 Introduction to MS Project 2007.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Creating a New Database If you came to this presentation via a web browser, right-click and choose “Full Screen” before proceeding. Click mouse or press.
CS130 Visual Basic Project 4 Lecture Fall New topics in project 4 Database, file (table), records, fields. Application that contains menus, submenus,
1 Connecting to a Database Server. 2 We all have accounts, with a single database each, on a Microsoft SQL Server on the USF network: allman.forest.usf.edu.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
We want to add here all the Eleven schools that are functional. Next slide shows how it would look when we click on School of Studies.
Backup Tables in SQL Server. Backup table method Cape_Codd database is used in this example 1.Righ click the database that contains the table you want.
Creating ActiveX Controls at runtime If you need to create an ActiveX Control at runtime without a resource template entry, follow the programming steps.
How to Start SQL Server and SSDT BI in Local
Task 2f – part a Prove that you can receive an WITH an attachment, open it AND save the attachment to your user area. Open the with the attachment.
Chapter 2: The Visual Studio .NET Development Environment
WWW and HTTP King Fahd University of Petroleum & Minerals
SAGExplore web server tutorial for Module III:
How to add the packages for printing decision trees
Editing Your Faculty Homepage
Creating a New Database
Deploying and Configuring SSIS Packages
CS 108 Computing Fundamental Notes for Thursday, October 5, 2017
MFC Dialog Application
FTS 2 (Failure Tracking System) System Test Process Flow
How can I back up my QuickBooks file on my own computer's hard drive?
CS149D Elements of Computer Science
Brief description on how to navigate within this presentation (ppt)
Introduction to the Development of Personal Web Pages
UNITY TEAM PROJECT TOPICS: [1]. Unity Collaborate
CIS16 Application Development Programming with Visual Basic
Manipulating File IO in Visual C++
Shortest-Paths Trees Kun-Mao Chao (趙坤茂)
Using JDeveloper.
Chapter 6 Event-Driven Pages
Database Applications
The Problems in Using Visual C and Homework #2 Assignment
Introduction to Debugging Techniques in Visual C++ 6.0
Strings and Pointer Arrays
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Name of Event Name of Event
Tutorial 6 PHP & MySQL Li Xu
These slides are for reference only. They are not "lecture notes"
Programming Concepts and Database
ICS201 Introduction To Computing II
Using Script Files and Managing Data
Visual Basic CSC
Building Windows Applications by Visual C++ and Homework #3 Assignment
JavaScript Frameworks Lab
Approximation Algorithms for the Selection of Robust Tag SNPs
Introduction to JavaScript
Data Base.
Presentation transcript:

Message Mapping Mechanisms in MFC and Other Applications in Visual C++ Speaker: Yao-Ting Huang Advisor: Kun-Mao Chao National Taiwan University Department of Computer Science & Information Engineering Algorithms and Computational Biology Lab. 2019/7/28

Message Mapping in Writing MFC When using a Windows program, there are many types of messages (events) generated. e.g., mouse clicked, key pressed, or window closed. When writing a Windows program, it is essential to assign the handling function to each corresponding message. The message processing is a switch-like statement. switch(message){ case WM_MOUSEMOVE: //handle mouse movement here. break; case WM_CLOSE: //handle window close here. break; }

Message Mapping in Writing MFC MFC avoids the detail message processing by providing Message Map. There are default handling functions assigned to common messages. You can add your own handling function to specific message. e.g., BEGIN_MESSAGE_MAP(CTest2App, CWinApp) ON_COMMAND(ID_APP_ABOUT, OnAppAbout) ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup) END_MESSAGE_MAP()

Message Mapping in Writing MFC When you choose to open a file, the CWinApp::OnFileOpen function will be invoked, which will popup a file dialog to the user. You can use the class wizard in Visual C++ to manage the message map. See an example in Visual C++.

Building Other Applications by Visual C++ You can create other types of applications by selecting different projects in Visual C++. Database project: Allow you to write SQL to manage a database. Internet Server API (ISAPI) Extension Wizard: Allow you to write Windows socket, email, and other Internet applications. MFC ActiveX Control Wizard: Allow you to write ActiveX control which can be embedded into dialog, VB program, or WWW pages, to offer additional functionalities.

Remind of Homework #3 Write a program that prompts the user to input the boiling point in degree Celsius. The program should output the substance corresponding to the boiling point listed in the table. The program should output the message “substance unknown” when it does not match any substance. For the details, please refer to the slide of last week. The due date is 11/4.

Outline of Lecture Today Manipulate the message map in a MFC application. Demo of your Homework #2. Please make sure your program is ready to execute.