[BACK]Return to asir32guiDoc.cpp CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / windows / asir32gui

Annotation of OpenXM_contrib2/windows/asir32gui/asir32guiDoc.cpp, Revision 1.3

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: この位置に固有の処理を追加するか、または基本クラスを呼び出してください
1.3     ! noro       97:        char tmp[BUFSIZ];
1.1       noro       98:
1.2       noro       99:        if ( asirgui_kind == ASIRGUI_MESSAGE )
                    100:                return FALSE;
                    101:
                    102:        if ( asirgui_kind == ASIRGUI_DEBUG ) {
1.3     ! noro      103:                sprintf(tmp,"quit");
        !           104:                put_line(tmp);
1.2       noro      105:                return FALSE;
                    106:        }
                    107:
1.1       noro      108:        if( IDNO == ::MessageBox(NULL,"Really quit?","Asir",
                    109:                MB_YESNO | MB_ICONEXCLAMATION | MB_DEFBUTTON2) ) {
                    110:                return FALSE;
                    111:        }
                    112:        flush_log();
                    113:        terminate_asir();
                    114:        return TRUE;
                    115: //     return CDocument::CanCloseFrame(pFrame);
                    116: }
                    117:
                    118: BOOL CAsir32guiDoc::SaveModified()
                    119: {
                    120:        // TODO: この位置に固有の処理を追加するか、または基本クラスを呼び出してください
                    121:
                    122:        return TRUE;
                    123: //     return CDocument::SaveModified();
                    124: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>