Lecture 2 MFC and Application Frameworks 1 MFC
- Slides: 45
Lecture 2 MFC and Application Frameworks 1
MFC 개요 2 (MFC hierarchy chart) 5
MFC 개요 3 (MFC hierarchy chart categories) 6
Application Frameworks (AFX) 4 11
App. Wizard를 이용한 MFC 프로그래밍 2 § App. Wizard –단계1 14
App. Wizard를 이용한 MFC 프로그래밍 5 § App. Wizard –단계3 • OLE(Object Linking & Embedding), Active-X 설정 17
App. Wizard를 이용한 MFC 프로그래밍 10 § App. Wizard –단계5 22
CWin. App 클래스 § “stdafx. h”는 “Standard Application Frameworks”의 약자 § AFX 클래스인 도큐먼트 클래스, 프레임 윈도우 클래스, 뷰 클래 스를 엮어서 등록하는 루틴 class CMy. App : public CWin. App { // …… // Overrides // Class. Wizard generated virtual function overrides //{{AFX_VIRTUAL(CMy. App) public: virtual BOOL Init. Instance(); virtual int Exit. Instance(); //}}AFX_VIRTUAL // …… }; 32
CWin. App 클래스 § 도큐먼트 클래스, 프레임 윈도우 클래스, 뷰 클래스로 각각 CMy. Doc, CMain. Frame, CMy. View를 사용할 것임을 명시 § 위 정보를 CSingle. Doc. Template 클래스에 설정한 후 CWin. App 클래스의 멤버 함수인 Add. Doc. Template 함수를 호출하여 CWin. App 클래스와 연결 CMy. App the. App; BOOL CMy. App: : Init. Instance() { CSingle. Doc. Template* p. Doc. Template; p. Doc. Template = new CSingle. Doc. Template( IDR_MAINFRAME, RUNTIME_CLASS(CMy. Doc), RUNTIME_CLASS(CMain. Frame), RUNTIME_CLASS(CMy. View)); Add. Doc. Template(p. Doc. Template); return TRUE; } 33
윈도우 메시지에 대응 int CMy. Wnd: : On. Create(LPCREATESTRUCT lp. Create. Struct) { CWnd: : On. Create(lp. Create. Struct); // 여기에 수행 하고자 하는 기능을 넣으면 됩니다. } 36
CFrame. Wnd 클래스 § afx_msg : virtual 대신 오버라이딩 된 함수임을 나타내기 위해 사 용 class CMain. Frame : public CFrame. Wnd { // …… // Generated message map functions protected: //{{AFX_MSG(CMain. Frame) afx_msg int On. Create(LPCREATESTRUCT lp. Create. Struct); afx_msg void On. Activate(UINT n. State, CWnd* p. Wnd. Other, BOOL b. Minimized); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; 39
CView 클래스 § 일반적인 윈도우로서의 역할 • CView 클래스는 프레임 윈도우의 클라이언트 영역 전체를 덮고 있 는 윈도우인 뷰라는 오브젝트를 클래스로 구현한 것 § 뷰 윈도우로서의 고유한 역할 • 프로그램에서 다루는 데이터를 보여줌 class CMy. View : public CView { public: CMy. Doc* Get. Document( ); // Overrides // Class. Wizard generated virtual function overrides //{{AFX_VIRTUAL(CMy. View) public: virtual void On. Draw(CDC* p. DC); // overridden to draw this view protected: virtual BOOL On. Prepare. Printing(CPrint. Info* p. Info); virtual void On. Begin. Printing(CDC* p. DC, CPrint. Info* p. Info); virtual void On. End. Printing(CDC* p. DC, CPrint. Info* p. Info); //}}AFX_VIRTUAL }; 41
Class. Wizard 2 45
- 01:640:244 lecture notes - lecture 15: plat, idah, farad
- Nursing theories and conceptual frameworks
- Nursing informatics theories, models and frameworks
- Food security concepts and frameworks
- Ethical framework
- Strategic management frameworks
- Topic sentence example
- How would you describe the artwork
- Parcc model content frameworks
- Java ecommerce framework
- List of theoretical frameworks
- Enterprise architecture proposal
- Enterprise agile frameworks
- Why i hate frameworks
- Social studies frameworks
- Describe trust frameworks.
- Actor frameworks
- Early modern english verb conjugation
- Software architecture frameworks
- Interpretive framework
- Regional construction frameworks
- What is interpretive framework
- Slidetodoc
- Net frameworks 4
- Local development frameworks
- Knowledge frameworks
- Affective message strategy
- Mfc-002
- Objetivo del mfc
- Mfc nacional
- Mfc internals
- Decalogo del mfc
- Mfc
- Mfc 프로그래밍
- Mfc cmas
- Mfc l 5750 dw
- Mfc 표 만들기
- Guia del matrimonio promotor mfc primer nivel
- Cual es el carisma del mfc
- Paintstruct
- Mfc vs wpf
- Exigencias basicas del mfc
- Mfc hdc
- Mfc critical section
- Mfc feature pack
- 6 exigencias basicas del mfc