Annotation of OpenXM_contrib2/windows/asir32gui/asir32guiDoc.cpp, Revision 1.2
1.1 noro 1: // asir32guiDoc.cpp : CAsir32guiDoc クラスの動作の定義を行います。
2: //
3:
4: #include "stdafx.h"
5: #include "asir32gui.h"
6:
7: #include "asir32guiDoc.h"
8:
9: #ifdef _DEBUG
10: #define new DEBUG_NEW
11: #undef THIS_FILE
12: static char THIS_FILE[] = __FILE__;
13: #endif
14:
15: extern "C" {
16: void flush_log();
1.2 ! noro 17: void put_line(char *);
! 18: extern int asirgui_kind;
1.1 noro 19: }
20:
21: /////////////////////////////////////////////////////////////////////////////
22: // CAsir32guiDoc
23:
24: IMPLEMENT_DYNCREATE(CAsir32guiDoc, CDocument)
25:
26: BEGIN_MESSAGE_MAP(CAsir32guiDoc, CDocument)
27: //{{AFX_MSG_MAP(CAsir32guiDoc)
28: // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します。
29: // この位置に生成されるコードを編集しないでください。
30: //}}AFX_MSG_MAP
31: END_MESSAGE_MAP()
32:
33: /////////////////////////////////////////////////////////////////////////////
34: // CAsir32guiDoc クラスの構築/消滅
35:
36: CAsir32guiDoc::CAsir32guiDoc()
37: {
38: // TODO: この位置に1回だけ構築用のコードを追加してください。
39:
40: }
41:
42: CAsir32guiDoc::~CAsir32guiDoc()
43: {
44: }
45:
46: BOOL CAsir32guiDoc::OnNewDocument()
47: {
48: if (!CDocument::OnNewDocument())
49: return FALSE;
50:
51: // TODO: この位置に再初期化処理を追加してください。
52: // (SDI ドキュメントはこのドキュメントを再利用します。)
53:
54: return TRUE;
55: }
56:
57: /////////////////////////////////////////////////////////////////////////////
58: // CAsir32guiDoc シリアライゼーション
59:
60: void CAsir32guiDoc::Serialize(CArchive& ar)
61: {
62: if (ar.IsStoring())
63: {
64: // TODO: この位置に保存用のコードを追加してください。
65: }
66: else
67: {
68: // TODO: この位置に読み込み用のコードを追加してください。
69: }
70: }
71:
72: /////////////////////////////////////////////////////////////////////////////
73: // CAsir32guiDoc クラスの診断
74:
75: #ifdef _DEBUG
76: void CAsir32guiDoc::AssertValid() const
77: {
78: CDocument::AssertValid();
79: }
80:
81: void CAsir32guiDoc::Dump(CDumpContext& dc) const
82: {
83: CDocument::Dump(dc);
84: }
85: #endif //_DEBUG
86:
87: /////////////////////////////////////////////////////////////////////////////
88: // CAsir32guiDoc コマンド
89:
90: extern "C" {
91: void terminate_asir();
92: }
93:
94: BOOL CAsir32guiDoc::CanCloseFrame(CFrameWnd* pFrame)
95: {
96: // TODO: この位置に固有の処理を追加するか、または基本クラスを呼び出してください
97:
1.2 ! noro 98: if ( asirgui_kind == ASIRGUI_MESSAGE )
! 99: return FALSE;
! 100:
! 101: if ( asirgui_kind == ASIRGUI_DEBUG ) {
! 102: put_line("quit");
! 103: return FALSE;
! 104: }
! 105:
1.1 noro 106: if( IDNO == ::MessageBox(NULL,"Really quit?","Asir",
107: MB_YESNO | MB_ICONEXCLAMATION | MB_DEFBUTTON2) ) {
108: return FALSE;
109: }
110: flush_log();
111: terminate_asir();
112: return TRUE;
113: // return CDocument::CanCloseFrame(pFrame);
114: }
115:
116: BOOL CAsir32guiDoc::SaveModified()
117: {
118: // TODO: この位置に固有の処理を追加するか、または基本クラスを呼び出してください
119:
120: return TRUE;
121: // return CDocument::SaveModified();
122: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>