À©µµ¿ì ÇÁ·Î±×·¡¹Ö ÀÚ·á

HomePage Backward Forward Post Reply List
Delete Modify
  Á¦¸ñ   [MFC] Document-View Interaction 1998/04/28 (09:50)
À̸§ ±èÈ¿¿ø (swindler@pin.snu.ac.kr)
¹øÈ£ 2
Á¶È¸ 399
º»¹® Document-View Interaction ; Event Order

1. Application start
 Create CMyDocument Object
 Create CMyView Object
 Create View Window
 Call CMyView::OnCreate() ( if mapping)
 Call CMyDocument::OnInitialUpdate()
 Initiation View Object
 Inefficacious View Window
 Call CMyView::OnDraw()

2. Edit data by User
 CMyView Class function µéÀº CMyDocumet Data Member¸¦ °»½Å

3. Application Close
 Destroy CMyView Object
 Destroy CMyDocument Object

4. CView::OnInitialUpdate()
 Application start
 File Menu's 'New'
 File Menu's 'Open'  --> Call OnUpdate()
 ¿©·¯¹ø È£Ãâ °¡´É
 cf) OnCreate() ´ÜÇѹø¸¸ È£Ãâ

5. CDocument::OnNewDocument()
 Document Object°¡ »ý¼ºµÉ¶§
 File Menu's 'New'
 Document Data Member Ãʱâ

6. WM_CREATE
 À©µµ¿ì Ãâ·ÂÀü ¹ß»ý
 Window°¡ È°¼ºÈ­µÈ »óÅ¿¡¼­¸¸ »ç¿ëÀÌ °¡´ÉÇÑ ÇÔ¼öÈ£ÃâºÒ°¡
 -->OverloadµÈ OnInitialUpdate()¿¡¼­ À§ÀÇ ÇÔ¼ö È£Ãâ

7. WM_CLOSE
 Window, Parent Window°¡ ´ÝÈú¶§ ¹ß»ý

8. WM_QUERYENDSESSION
 À©µµ¿ì Á¾·á½Ã À©µµ¿ì°¡ ¸ðµç application¿¡ º¸³»´Â Message

9. WM_DESTROY
 OnDestroy() ¿¡¼­´Â Á¾·á¸¦ Ãë¼ÒÇÒ ¼ö ¾ø´Ù.

HomePage Backward Forward Post Reply List
1998 by swindler