1 Visual C++ 7-2 Multiple Document Interface Application.

Slides:



Advertisements
Similar presentations
Computer Science & Engineering 2111 Text Functions 1CSE 2111 Lecture-Text Functions.
Advertisements

MFC Workshop: Intro to the Document/View Architecture.
Graphical User Interface (GUI) A GUI allows user to interact with a program visually. GUIs are built from GUI components. A GUI component is an object.
MDI windows Single-document-interface (SDI)
Introduction to Microsoft Windows MFC Programming: the Application/Window Approach Lecture 4.
Neal Stublen Practice Solution  Create a new solution  Add a WinForms project  Add a Class Library project  Reference the library.
INTRODUCTION TO VC++ As the Microsoft Windows 3.X and then 5.5 operating system was becoming popular, many programmers were interested in creating graphical.
Using Visual Studio 2013 An Integrated Development Environment (IDE)
Building an MFC Application Using the Wizard. Terms Solution – A container for related projects – An executable or DLL – May be constructed from multiple.
MDI vs. SDI MDI – Multiple Document Interface SDI – Single Document Interface In an SDI application, each form acts independently of the others. A MDI.
Visual C++ Lecture 11 Friday, 29 Aug Windows Graphic User Interface l Event driven programming environment l Windows graphic libraries (X11 on Unix,
Intro to MFC. Open VS and create new project 1)Open MS Visual Studio 2008 Professional (It must be the Professional Edition, the Express Edition will.
C++ MFCs CS 123/CS 231. MFC: Writing Applications for Windows zClasses in MFC make up an application framework zFramework defines the skeleton of an application.
BZUPAGES.COM Visual Programming Lecture – 5 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
ICONICS ActiveX ToolWorX V 6.1.
MFC Windows Programming: Document/View Approach More detailed notes at: 360/notes-html/class15.htm.
Enhancing the Graphical User Interface Multiple Forms, Controls, and Menus.
Overview of Previous Lesson(s) Over View  Microsoft Foundation Classes (MFC)  A set of predefined classes upon which Windows programming with Visual.
Create a Simple MFC Application Automatically How to use the application wizard.
1 Pointer A pointer is a variable that stores an address of another variable of a particular type. A pointer has a variable name just like any other variable.
Microsoft Foundation Classes. What is MFC? Set of C++ classes written by MS Simplifies writing complex programs Covers many areas: – GUI – I/O – O/S interfaces.
History of Windows Data Sharing Carlotta Eaton Exploring Microsoft Visual Basic 5.0 To insert your company logo on this slide From the Insert Menu Select.
VB.NET Additional Topics
Overview of Previous Lesson(s) Over View  SDI programs  The Application Wizard can generate single-document interface (SDI) applications that work.
BZUPAGES.COM Visual Programming Lecture – 6- 7 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
PowerBuilder Online Courses - by Prasad Bodepudi MDI Applications Single Document Interface Multiple Document Interface.

Oracle Forms Oracle Forms Builder provides various tools, which have powerful Graphical User Interfaces (GUI's) to design such forms. All objects, properties,
Understanding Desktop Applications Lesson 5. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Windows Forms Applications Understand.
YFILTER (Filtering and Transformation for High- Volume XML Message Brokering) MS. 3 최주리
Chapter 8 Dialog Boxes and Property Sheet
Chapter 13. Getting started  Simple CLI 를 실행 Click!!
CECS 5020 Computers in Education Forms and Menus.
Overview of Previous Lesson(s) Over View 3 Program.
Understanding Desktop Applications Lesson 5. Understanding Windows Forms Applications Windows Forms applications are smart client applications consisting.
Visual C++ Windows Programming 第六章 分裂視窗及多文件視窗. 大綱 分裂視窗的建立 多文件視窗的建立.
Microsoft Foundation Classes
Overview of Previous Lesson(s) Over View  Windows Programming  WinMain()  Where execution of the program begins and basic program initialization is.
Operating Systems Concepts 1/e Ruth Watson Chapter 1 Chapter 1 Introduction to Operating Systems Ruth Watson.
Part II Document/View Architecture. Chapter 9 Documents, Views, and the Single Document Interface.
Debugger By: Engr. Faisal ur Rehman CE-105 Spring 2007.
Introducing Windows Applications Lesson 1. Objectives.
Introducing Windows Applications Lesson 1. Objectives.
Building an MFC Application
Chapter 14 Windows Programming with the Microsoft Foundation Classes
MULTIPLE DOCUMENTS AND MULTIPLE VIEWS Prosise - Chapter 11
Document/View Architecture
Multiple document interface (MDI)
Message Handling in MFC
SDI & MDI SDI -> Single Document Interface
Microsoft Foundation Classes MFC
Steps to Build Frame Window Recipe Application
Customer & Inventory Management System: CIMS
1. Open any Office 2016 app, such as Word, and create a new document.
Lecture on Oracle Forms
Working with Dialogs and Controls
Standard Controls.
Topic 3.5 Word Processing Application Microsoft Word.
Microsoft Visual Basic 2005 BASICS
Quick Start Guide for Visual Studio 2010
Factors, multiple, primes: Factors from prime factors
Factors, multiple, primes: Prime factors
MFC Document/View programs
How to organize and document your classes
Chapter 4 Enhancing the Graphical User Interface
Midterm Exam (2).
Factors, multiple, primes: Multiples
Chapter 12 Windows Programming with the Microsoft Foundation Classes
Steps to Build Frame Window Recipe Application
Chapter 4 Enhancing the Graphical User Interface
Presentation transcript:

1 Visual C Multiple Document Interface Application

2 MDI  Multiple Document Interface Application 여러 개의 다큐먼트를 처리할 수 있도록 만들어진 프로그램 SDI Application

3 MDI  하나의 프로그램에서 여러 개의 문서를 동시에 열어 놓고 작업

4 MDI 를 위한 MFC Class SDIMDI

5 SDI vs. MDI  CMDIFrameWnd 와 CMDIChildWnd 클래스는 CFrameWnd 클래스에서 상속  프레임윈도우의 기능 가짐  CMDIFrameWnd 클래스에는 CMDIChildWnd 클래스를 관리  CMDIChildWnd 클래스에는 CMDIFrameWnd 의 안쪽에 들어 가서 클래스의 관리를 받음

6 MDI Application 만들기

7 CWinApp 파생클래스의 InitInstance( )  SDI BOOL CTestApp::InitInstance() { CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CTestDoc), RUNTIME_CLASS(CMainFrame), // main SDI frame window RUNTIME_CLASS(CTestView)); AddDocTemplate(pDocTemplate); return TRUE; }

8 CWinApp 파생클래스의 InitInstance( )  MDI BOOL CTestApp::InitInstance() { CMultiDocTemplate* pDocTemplate; pDocTemplate = new CMultiDocTemplate( IDR_TESTTYPE, RUNTIME_CLASS(CTestDoc), RUNTIME_CLASS(CChildFrame), // custom MDI child frame RUNTIME_CLASS(CTestView)); AddDocTemplate(pDocTemplate); // create main MDI Frame window CMainFrame* pMainFrame = new CMainFrame; if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE; m_pMainWnd = pMainFrame; return TRUE; }

9 MDI Resource

10 Resource

11 MDI – Test Project 참고  App. Wizard 가 만들어준 MDI Application : Compile & 실행 최초에 child window 가 하나 열림

12 MDI – Test Project 참고 BOOL CTestApp::InitInstance() { // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; // Turn off default OnFileNew() call cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing; ParseCommandLine(cmdInfo); // Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE; // The main window has been initialized, so show and update it. pMainFrame->ShowWindow(m_nCmdShow); pMainFrame->UpdateWindow(); return TRUE; } // Compile & 실행

13 MDI – Test Project 참고

14 MDI – Test Project 참고 class CCommandLineInfo : public CObject { …… enum { FileNew, FileOpen, FilePrint, FilePrintTo, FileDDE, AppUnregister, FileNothing = -1 } m_nShellCommand; // not valid for FileNew CString m_strFileName; …… };

15 MDI – Test Project 참고 cmdInfo.m_nShellCommand=CCommandLineInfo::FileNew; //Call CWinApp:: OnFileNew() – Default cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing; // Do nothing. cmdInfo.m_nShellCommand=CCommandLineInfo::FileOpen; //Call OpenDocumentFile(cmdInfo.m_strFileName)

16 MDI – MDIDraw Project 참고 CCommandLineInfo cmdInfo; cmdInfo.m_nShellCommand=CCommandLineInfo::FileOpen; cmdInfo.m_strFileName="Test.drw"; ParseCommandLine(cmdInfo);

17 Visual C  MDI Application 기본적인 구조 Command Line 의 해석