Khongorzul D Window Programming CBNU,

Slides:



Advertisements
Similar presentations
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Advertisements

XP Tutorial 9 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Exploring Your Network Tutorial 9.
1 Routing and Remote Access Service (Week 15, Friday 4/21/2006) © Abdou Illia, Spring 2006.
Module 5: Configuring Access for Remote Clients and Networks.
Chapter 3 Tables and Page Layout
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 13: Troubleshoot TCP/IP.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
1 Chapter 12 Working With Access 2000 on the Internet.
Hands-On Microsoft Windows Server 2003 Administration Chapter 11 Administering Remote Access Services.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
9.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 9: Installing and Configuring.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L22 (Chapter 25) Networking.
70-270, MCSE/MCSA Guide to Installing and Managing Microsoft Windows XP Professional and Windows Server 2003 Chapter Nine Managing File System Access.
Chapter 7 Improving the User Interface
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
9.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 9: Installing and Configuring.
HOW TO PULL YOUR VOICE MAILS INTO YOUR CLIENT Primary advantage: You will have a permanent.wav file on your PC and you choose when to delete it.
Linux Operations and Administration
Socket Programming References: redKlyde ’ s tutorial set Winsock2 for games (gamedev.net)
NET0183 Networks and Communications Lecture 31 The Socket API 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks Lecture powerpoints from.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Microsoft Internet Security and Acceleration (ISA) Server 2004 is an advanced packet checking and application-layer firewall, virtual private network.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 12: Routing.
Objectives Configure routing in Windows Server 2008 Configure Network Address Translation 1.
Chapter 6 Configuring Windows Server 2008 Printing
1 Managing Printers (Week 12, Monday 3/26/2007) © Abdou Illia, Spring 2007.
Creating a Web Site to Gather Data and Conduct Research.
Objectives Configure routing in Windows Server 2008 Configure Routing and Remote Access Services in Windows Server 2008 Network Address Translation 1.
1 Chapter Overview Using the New Connection Wizard to configure network and Internet connections Using the New Connection Wizard to configure outbound.
Click your mouse to continue. Ways to Merge Data When you have finished editing your main document and inserting the merge fields, you have several choices.
BZUPAGES.COM Visual Programming Lecture – 5 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
Object Oriented Programming Dr. Ennis-Cole CECS 5100.
Internet Applications and Network Programming Dr. Abraham Professor UTPA.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae david streader, VUW Echo Networking COMP
© 2010 Delmar, Cengage Learning Chapter 8 Collecting Data with Forms.
Classic Controls Trần Anh Tuấn A. Week 1 How to create a MFC project in VS 6.0 How to create a MFC project in VS 6.0 Introduction to Classic Controls.
OBJECTIVE  After completing this Lab, students will upgrade their knowledge in the field of VC++.  Students will also get the clear view about the concepts.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT OUTLOOK Lesson 1 – Outlook Basics and .
Chat Application Pratheeba Murugesan Pratheeba Murugesan Tejo Brundavana Tejo Brundavana Zhenhong Zhao Zhenhong Zhao.
Version How to Use Packet Tracer MarinaMD.
Chapter 7 Controls.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Networking COMP # 22.
1 ADVANCED MICROSOFT POWERPOINT Lesson 9 – Importing and Exporting Information Microsoft Office 2003: Advanced.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
Microsoft Office 2013: In Practice Chapter 4 Creating and Using Forms and Reports Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Remote Monitoring Pratheeba Murugesan Tejo Harisha Brundavana.
XP Browser and Basics COM111 Introduction to Computer Applications.
Chapter Fourteen Access Databases and SQL Programming with Microsoft Visual Basic th Edition.
Client/Server Socket Programming Project
MS-Access XP Lesson 4. Modifying Queries 1.Select query in queries 2.Click design button or Right click on query and click design view 3.Change query.
TESTING THE WIRELESS NETWORK INTERFACE CARD
Chapter 7 Controls. 2 Introduction (1/4) Control –Special kind of window –Designed to convey information to the user or to acquire input –Reduce the tedium.
A Local Area Network Chat Client ITTC LAN CHAT John Vincent Cecogo Jerikho Daguno Ardee Santos Elaine Mendoza Anjomar Pat Del Mindo Philip John Sales Philip.
Problem: Take Two Numbers, Add Them Together And Display The Results. Now To Build The Flowchart… We Probably Need One Like This… Let’s Add The Routines…
Creating ActiveX Controls at runtime If you need to create an ActiveX Control at runtime without a resource template entry, follow the programming steps.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae david streader, VUW Echo Networking COMP
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 33 Networking.
Guide to Operating Systems, 5th Edition
Message Handling in MFC
Echo Networking COMP
Steps to Build Frame Window Recipe Application
Event Log Cluster service includes event data in the Windows 2000 system log.
Working with Dialogs and Controls
MFC Dialog Application
Windows XP 101: Using Windows XP Professional in the Classroom
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 4: Planning and Configuring Routing and Switching.
Internet Applications and Network Programming
Presentation transcript:

Khongorzul D. 2006.11.28 Window Programming CBNU, LAN Socket Khongorzul D. 2006.11.28 Window Programming CBNU,

- How applications use the Winsock interface to perform network communications between two or more computers. - The difference between a client and a server application and the role each plays in establishing a communications link. - How the MFC Winsock classes simplify the process of writing Internet applications. - How can create own Winsock class, descended from the MFC Winsock classes, to easily build an event-driven, networking application.

Outline How Do Network Communication Work? Building a Network Application Creating the Application Shell Window Layout and Startup Functionality Inheriting from the CAsyncSocket Class Connecting the Application Sending and Receiving Ending the Connection Summary

How Do Network Communication Work? One application sits on a computer, waiting for another application to open a communication connection. This application is “listening” for this connection request. “ like you listen for the phone to ring” Tries to open connection Accepts connection request Messages sent both directions Client Server (Listening for connections) Figure 1: The basic socket connection process

Creating the Application Shell Create a new MFC AppWizard project Name : Sock first step of the AppWizard --> Dialog-based application. second step of the AppWizard  Windows Sockets

Creating the Application Shell We can layout the main dialog for your application. set of radio buttons: client or server. need a couple of edit boxes: computer name and port need a command button: connection need an edit box: message send need a couple of list boxes: messages sent and received.

Creating the Application Shell Setting all of the control properties as specified in following table Object Property Setting Group Box ID IDC_STATICTYPE 20 Caption Socket Type Radio Button IDC_RCLIENT &Client Group Checked IDC_RSERVER &Server Static Text ID IDC_STATICNAME Server &Name: Edit Box IDC_ESERVNAME IDC_STATICPORT Server &Port: IDC_ESERVPORT Command Button IDC_BCONNECT C&onnect

Creating the Application Shell Setting all of the control properties as specified in following table Command Button ID IDC_BCONNECT Caption C&onnect IDC_BCLOSE C&lose Disabled Checked Static Text IDC_STATICMSG &Message: Edit Box IDC_EMSG IDC_BSEND S&end IDC_STATIC Sent: List Box IDC_LSENT Tab Stop Unchecked Sort Selection None Received

Creating the Application Shell Open Class Wizard to attach variables to the controls on the dialog, by following table

Creating the Application Shell Open Class Wizard to attach variables to the controls on the dialog, by following table

Creating the Application Shell Add functionality to application Function : BN_CLICKED event message for the IDC_RCLIENT control ID, Function name: OnRType. Function: BN_CLICKED event message for the IDC_RSERVER control ID.

Inherent from the CAsyncSocket Class Create own descendent class from CAsyncSocket. This class means of passing this event to the dialog that the object will be a member of. Select Insert  New Class  name for your class: CMySocket, select CAsyncSocket And created the socket class, add a member variable to the class to serve as a pointer to the parent dialog window. Variable type: CDialog*, variable name: m_pWnd access as: private. add a member function to your new socket class. Specify the function And add a member function to your new socket class. Type: void, Declaration: SetParent(CDialog* pWnd), Access: public.