.         3GL   4GL   5GL  

Expert Developer Pro

Expert Developer Pro - " ", ( , , ).

EDPro 3.5 : edpro35.zip

, ( , , (. 1).

. 1 .

Expert->New, New (. 2).

. 2

. . , () ().

, . ( 3).

. 3 .

 

 


->Save ( Save), Expert->Save As .

Expert->Open, Open . .

Expert->Begin Test, Begin Test . .

. 4 .

(. 5) .

. 5 .

9 , 8 cpp- 9 , .

- elem ( ):

{

public:

CString value;

int yes, no;

BOOL answer;

elem()

{

value = " ";

yes = -1;

no = -1;

answer = FALSE;

}

};

CExpertApp (CWinApp),

-         CMainFrame (CMDIFrameWnd),

-         CChildFrame, CTestFrame (CMDIChildWnd),

CExpertDoc (CDocument),

CExpertView (FormView)

CTestView (FormView).

, : vector < > ;

, :

-- --

. . . - . - . , , ... - , , , .

-- --

! .

: , ; , ; . , , . , ?! ...

-- --

, , . ? , -, . -, . !

, .

-- --

, : , , . , . . - , .

- , !

-- , --

. , , , . , . ( ) , . , , () . .

, , ( ) .

-- , --

. , , , . , . ( ) , . , , () . .

, , ( ) .

 // MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__26C55761_172C_4D1B_B12E_FFBB834E665A__INCLUDED_)
#define AFX_MAINFRM_H__26C55761_172C_4D1B_B12E_FFBB834E665A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMainFrame : public CMDIFrameWnd
{
    DECLARE_DYNAMIC(CMainFrame)
public:
    CMainFrame();
// Attributes
public:
// Operations
public:
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CMainFrame)
    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
    //}}AFX_VIRTUAL
// Implementation
public:
    virtual ~CMainFrame();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif
protected:  // control bar embedded members
    CStatusBar  m_wndStatusBar;
    CToolBar    m_wndToolBar;
// Generated message map functions
protected:
    //{{AFX_MSG(CMainFrame)
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnExpertBegintest();
    afx_msg void OnExpertNew();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__26C55761_172C_4D1B_B12E_FFBB834E665A__INCLUDED_)
// MainFrm.cpp : implementation of the CMainFrame class
//
#include "stdafx.h"
#include "Expert.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////

// CMainFrame
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
    //{{AFX_MSG_MAP(CMainFrame)
    ON_WM_CREATE()
    ON_COMMAND(ID_EXPERT_BEGINTEST, OnExpertBegintest)
    ON_COMMAND(ID_EXPERT_NEW, OnExpertNew)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()
static UINT indicators[] =
{
    ID_SEPARATOR,           // status line indicator
    ID_INDICATOR_CAPS,
    ID_INDICATOR_NUM,
    ID_INDICATOR_SCRL,
};

/////////////////////////////////////////////////////////////////////////////

// CMainFrame construction/destruction
CMainFrame::CMainFrame()
{
    // TODO: add member initialization code here
}
CMainFrame::~CMainFrame()
{
}
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
        return -1;
    if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
        | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
        !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
    {
        TRACE0("Failed to create toolbar\n");
        return -1;      // fail to create
    }
    if (!m_wndStatusBar.Create(this) ||
        !m_wndStatusBar.SetIndicators(indicators,
          sizeof(indicators)/sizeof(UINT)))
    {
        TRACE0("Failed to create status bar\n");
        return -1;      // fail to create
    }
    // TODO: Delete these three lines if you don't want the toolbar to
    //  be dockable
    m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
    EnableDocking(CBRS_ALIGN_ANY);
    DockControlBar(&m_wndToolBar);
    return 0;
}
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    if( !CMDIFrameWnd::PreCreateWindow(cs) )
        return FALSE;
    // TODO: Modify the Window class or styles here by modifying
    //  the CREATESTRUCT cs
    return TRUE;
}

/////////////////////////////////////////////////////////////////////////////

// CMainFrame diagnostics
#ifdef _DEBUG
void CMainFrame::AssertValid() const
{
    CMDIFrameWnd::AssertValid();
}
void CMainFrame::Dump(CDumpContext& dc) const
{
    CMDIFrameWnd::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////

// CMainFrame message handlers
extern CExpertApp theApp;
void CMainFrame::OnExpertBegintest()
{
    CFileDialog dialog(TRUE,
        NULL,
        NULL,
        OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
        "Expert Templates (*.xpt)|*.xpt");
    if(dialog.DoModal() == IDCANCEL) return;
    CDocTemplate *templ;
    POSITION pos = theApp.GetFirstDocTemplatePosition();
    theApp.GetNextDocTemplate(pos);
    templ = theApp.GetNextDocTemplate(pos);
    templ->OpenDocumentFile(dialog.GetFileName());
}
void CMainFrame::OnExpertNew()
{
    CDocTemplate *templ;
    POSITION pos = theApp.GetFirstDocTemplatePosition();
    templ = theApp.GetNextDocTemplate(pos);
    templ->OpenDocumentFile(NULL);
}
// Expert.h : main header file for the EXPERT application
//
#if !defined(AFX_EXPERT_H__5EABEE86_3F2C_424E_B40D_BAA9615D8861__INCLUDED_)
#define AFX_EXPERT_H__5EABEE86_3F2C_424E_B40D_BAA9615D8861__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
    #error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////

// CExpertApp:
// See Expert.cpp for the implementation of this class
//
class CExpertApp : public CWinApp
{
public:
    CExpertApp();
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CExpertApp)
    public:
    virtual BOOL InitInstance();
    //}}AFX_VIRTUAL
// Implementation
    //{{AFX_MSG(CExpertApp)
    afx_msg void OnAppAbout();
        // NOTE - the ClassWizard will add and remove member functions here.
        //    DO NOT EDIT what you see in these blocks of generated code !
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EXPERT_H__5EABEE86_3F2C_424E_B40D_BAA9615D8861__INCLUDED_)
// Expert.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "Expert.h"
#include "MainFrm.h"
#include "ChildFrm.h"
#include "ExpertDoc.h"
#include "ExpertView.h"
#include "TestView.h"
#include "TestFrame.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////

// CExpertApp
BEGIN_MESSAGE_MAP(CExpertApp, CWinApp)
    //{{AFX_MSG_MAP(CExpertApp)
    ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
        // NOTE - the ClassWizard will add and remove mapping macros here.
        //    DO NOT EDIT what you see in these blocks of generated code!
    //}}AFX_MSG_MAP
    // Standard file based document commands
    ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
    ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
    // Standard print setup command
    ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

// CExpertApp construction
CExpertApp::CExpertApp()
{
    // TODO: add construction code here,
    // Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////

// The one and only CExpertApp object
CExpertApp theApp;

/////////////////////////////////////////////////////////////////////////////

// CExpertApp initialization
BOOL CExpertApp::InitInstance()
{
    // Standard initialization
    // If you are not using these features and wish to reduce the size
    //  of your final executable, you should remove from the following
    //  the specific initialization routines you do not need.
#ifdef _AFXDLL
    Enable3dControls();         // Call this when using MFC in a shared DLL
#else
    Enable3dControlsStatic();   // Call this when linking to MFC statically
#endif
    // Change the registry key under which our settings are stored.
    // TODO: You should modify this string to be something appropriate
    // such as the name of your company or organization.
    SetRegistryKey(_T("Local AppWizard-Generated Applications"));
    LoadStdProfileSettings();  // Load standard INI file options (including MRU)
    // Register the application's document templates.  Document templates
    //  serve as the connection between documents, frame windows and views.
    CMultiDocTemplate* pDocTemplate;
    pDocTemplate = new CMultiDocTemplate(
        IDR_EXPERTTYPE,
        RUNTIME_CLASS(CExpertDoc),
        RUNTIME_CLASS(CChildFrame), // custom MDI child frame
        RUNTIME_CLASS(CExpertView));
    AddDocTemplate(pDocTemplate);
    pDocTemplate = new CMultiDocTemplate(
        IDR_TEST,
        RUNTIME_CLASS(CExpertDoc),
        RUNTIME_CLASS(CTestFrame), // 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;
    // Enable drag/drop open
    m_pMainWnd->DragAcceptFiles();
    // Enable DDE Execute open
    EnableShellOpen();
    RegisterShellFileTypes(TRUE);
    // Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);
    // Dispatch commands specified on the command line
    if(!cmdInfo.m_strFileName.IsEmpty())
        if (!ProcessShellCommand(cmdInfo))
            return FALSE;
    // The main window has been initialized, so show and update it.
    pMainFrame->ShowWindow(m_nCmdShow);
    pMainFrame->UpdateWindow();
    return TRUE;
}

/////////////////////////////////////////////////////////////////////////////

// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
    CAboutDlg();
// Dialog Data
    //{{AFX_DATA(CAboutDlg)
    enum { IDD = IDD_ABOUTBOX };
    //}}AFX_DATA
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CAboutDlg)
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL
// Implementation
protected:
    //{{AFX_MSG(CAboutDlg)
        // No message handlers
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
    //{{AFX_DATA_INIT(CAboutDlg)

    //}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialog::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CAboutDlg)
    //}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
    //{{AFX_MSG_MAP(CAboutDlg)
        // No message handlers
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()
// App command to run the dialog
void CExpertApp::OnAppAbout()
{
    CAboutDlg aboutDlg;
    aboutDlg.DoModal();
}

/////////////////////////////////////////////////////////////////////////////

// CExpertApp message handlers
// ExpertDoc.h : interface of the CExpertDoc class
//

/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_EXPERTDOC_H__F390F10A_A2A5_47F2_883B_06061F97672A__INCLUDED_)
#define AFX_EXPERTDOC_H__F390F10A_A2A5_47F2_883B_06061F97672A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include 
using namespace std;
class elem
{
public:
    CString value;
    int yes, no;
    BOOL answer;
    elem()
    {
        value = "=v ";
        yes = -1;
        no = -1;
        answer = FALSE;
    }
};
class CExpertDoc : public CDocument
{
protected: // create from serialization only
    CExpertDoc();
    DECLARE_DYNCREATE(CExpertDoc)
// Attributes
public:
    //int nSize;
    vector  vElem;
// Operations
public:
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CExpertDoc)
    public:
    virtual BOOL OnNewDocument();
    virtual void Serialize(CArchive& ar);
    //}}AFX_VIRTUAL
// Implementation
public:
    virtual ~CExpertDoc();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
    //{{AFX_MSG(CExpertDoc)
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EXPERTDOC_H__F390F10A_A2A5_47F2_883B_06061F97672A__INCLUDED_)
// ExpertDoc.cpp : implementation of the CExpertDoc class
//
#include "stdafx.h"
#include "Expert.h"
#include "ExpertDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////

// CExpertDoc
IMPLEMENT_DYNCREATE(CExpertDoc, CDocument)
BEGIN_MESSAGE_MAP(CExpertDoc, CDocument)
    //{{AFX_MSG_MAP(CExpertDoc)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

// CExpertDoc construction/destruction
CExpertDoc::CExpertDoc()
{
    // TODO: add one-time construction code here
}
CExpertDoc::~CExpertDoc()
{
}
BOOL CExpertDoc::OnNewDocument()
{
    if (!CDocument::OnNewDocument())
        return FALSE;
    // TODO: add reinitialization code here
    // (SDI documents will reuse this document)
    vElem.push_back(elem());
    return TRUE;
}

/////////////////////////////////////////////////////////////////////////////

// CExpertDoc serialization
void CExpertDoc::Serialize(CArchive& ar)
{
    int i;
    if (ar.IsStoring())
    {
        ar << vElem.size();
        for(i=0; i> nSize;
        vElem.clear();
        vElem.resize(nSize);
        for(i=0; i> vElem[i].value;
            ar >> vElem[i].yes;
            ar >> vElem[i].no;
            ar >> vElem[i].answer;
        }
    }
}

/////////////////////////////////////////////////////////////////////////////

// CExpertDoc diagnostics
#ifdef _DEBUG
void CExpertDoc::AssertValid() const
{
    CDocument::AssertValid();
}
void CExpertDoc::Dump(CDumpContext& dc) const
{
    CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////

// CExpertDoc commands
// ExpertView.h : interface of the CExpertView class
//

/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_EXPERTVIEW_H__F308E8A4_E397_4E4F_BC14_CE696620EE36__INCLUDED_)
#define AFX_EXPERTVIEW_H__F308E8A4_E397_4E4F_BC14_CE696620EE36__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CExpertView : public CFormView
{
protected: // create from serialization only
    CExpertView();
    DECLARE_DYNCREATE(CExpertView)
public:
    //{{AFX_DATA(CExpertView)
    enum { IDD = IDD_EXPERT_FORM };
    CSpinButtonCtrl m_Spin3;
    CSpinButtonCtrl m_Spin2;
    CSpinButtonCtrl m_Spin1;
    int     m_nIndex1;
    int     m_nIndex2;
    int     m_nIndex3;
    CString m_szValue1;
    CString m_szValue2;
    CString m_szValue3;
    BOOL    m_bAnswer;
    //}}AFX_DATA
// Attributes
public:
    CExpertDoc* GetDocument();
// Operations
public:
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CExpertView)
    public:
    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    virtual void OnInitialUpdate(); // called first time after construct
    //}}AFX_VIRTUAL
// Implementation
public:
    virtual ~CExpertView();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
    //{{AFX_MSG(CExpertView)
    afx_msg void OnChangeValue1();
    afx_msg void OnChangeIndex1();
    afx_msg void OnChangeIndex2();
    afx_msg void OnChangeIndex3();
    afx_msg void OnAnswer();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG  // debug version in ExpertView.cpp
inline CExpertDoc* CExpertView::GetDocument()
   { return (CExpertDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

 

//{{AFX_INSERT_LOCATION}}

// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

 

#endif // !defined(AFX_EXPERTVIEW_H__F308E8A4_E397_4E4F_BC14_CE696620EE36__INCLUDED_)

 

 

// ExpertView.cpp : implementation of the CExpertView class

//

 

#include "stdafx.h"

#include "Expert.h"

 

#include "ExpertDoc.h"

#include "ExpertView.h"

 

#ifdef _DEBUG

#define new DEBUG_NEW

#undef THIS_FILE

static char THIS_FILE[] = __FILE__;

#endif

 

/////////////////////////////////////////////////////////////////////////////

// CExpertView
IMPLEMENT_DYNCREATE(CExpertView, CFormView)
BEGIN_MESSAGE_MAP(CExpertView, CFormView)
    //{{AFX_MSG_MAP(CExpertView)
    ON_EN_CHANGE(IDC_VALUE1, OnChangeValue1)
    ON_EN_CHANGE(IDC_INDEX1, OnChangeIndex1)
    ON_EN_CHANGE(IDC_INDEX2, OnChangeIndex2)
    ON_EN_CHANGE(IDC_INDEX3, OnChangeIndex3)
    ON_BN_CLICKED(IDC_ANSWER, OnAnswer)
    //}}AFX_MSG_MAP
    // Standard printing commands
    ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
    ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
    ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

// CExpertView construction/destruction
CExpertView::CExpertView()
    : CFormView(CExpertView::IDD)
{
    //{{AFX_DATA_INIT(CExpertView)
    m_nIndex1 = 1;
    m_nIndex2 = 0;
    m_nIndex3 = 0;
    m_szValue1 = _T("");
    m_szValue2 = _T("");
    m_szValue3 = _T("");
    m_bAnswer = FALSE;
    //}}AFX_DATA_INIT
    // TODO: add construction code here
}
CExpertView::~CExpertView()
{
}
void CExpertView::DoDataExchange(CDataExchange* pDX)
{
    CFormView::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CExpertView)
    DDX_Control(pDX, IDC_SPIN3, m_Spin3);
    DDX_Control(pDX, IDC_SPIN2, m_Spin2);
    DDX_Control(pDX, IDC_SPIN1, m_Spin1);
    DDX_Text(pDX, IDC_INDEX1, m_nIndex1);
    DDX_Text(pDX, IDC_INDEX2, m_nIndex2);
    DDX_Text(pDX, IDC_INDEX3, m_nIndex3);
    DDX_Text(pDX, IDC_VALUE1, m_szValue1);
    DDX_Text(pDX, IDC_VALUE2, m_szValue2);
    DDX_Text(pDX, IDC_VALUE3, m_szValue3);
    DDX_Check(pDX, IDC_ANSWER, m_bAnswer);
    //}}AFX_DATA_MAP
}
BOOL CExpertView::PreCreateWindow(CREATESTRUCT& cs)
{
    // TODO: Modify the Window class or styles here by modifying
    //  the CREATESTRUCT cs
    return CFormView::PreCreateWindow(cs);
}
void CExpertView::OnInitialUpdate()
{
    CFormView::OnInitialUpdate();
    m_Spin1.SetRange(1, 2000);
    m_Spin2.SetRange(0, 2000);
    m_Spin3.SetRange(0, 2000);
    CExpertDoc *pDoc = GetDocument();
    m_nIndex2 = pDoc->vElem[m_nIndex1 - 1].yes + 1;
    m_nIndex3 = pDoc->vElem[m_nIndex1 - 1].no + 1;
    m_szValue1 = pDoc->vElem[m_nIndex1 - 1].value;
    m_bAnswer = pDoc->vElem[m_nIndex1 - 1].answer;
    if(m_nIndex2 > 0)
    {
        if(pDoc->vElem.size() < m_nIndex2) m_szValue2 =  "=v ";
        else m_szValue2 = pDoc->vElem[m_nIndex2 - 1].value;
    }
    else m_szValue2.Empty();
    if(m_nIndex3 > 0)
    {
        if(pDoc->vElem.size() < m_nIndex3) m_szValue3 =  "=v ";
        else m_szValue3 = pDoc->vElem[m_nIndex3 - 1].value;
    }
    else m_szValue3.Empty();
    UpdateData(FALSE);
}

/////////////////////////////////////////////////////////////////////////////

// CExpertView diagnostics
#ifdef _DEBUG
void CExpertView::AssertValid() const
{
    CFormView::AssertValid();
}
void CExpertView::Dump(CDumpContext& dc) const
{
    CFormView::Dump(dc);
}
CExpertDoc* CExpertView::GetDocument() // non-debug version is inline
{
    ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CExpertDoc)));
    return (CExpertDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////

// CExpertView message handlers
void CExpertView::OnChangeValue1()
{
    CExpertDoc *pDoc = GetDocument();
    if(pDoc == NULL || !IsWindowVisible()) return;
    UpdateData();
    if(pDoc->vElem.size() < m_nIndex1)
        pDoc->vElem.resize(m_nIndex1);
    pDoc->vElem[m_nIndex1 - 1].value = m_szValue1;
    pDoc->vElem[m_nIndex1 - 1].yes = m_nIndex2 - 1;
    pDoc->vElem[m_nIndex1 - 1].no = m_nIndex3 - 1;
    pDoc->vElem[m_nIndex1 - 1].answer = m_bAnswer;
    pDoc->SetModifiedFlag();
}
void CExpertView::OnChangeIndex1()
{
    CExpertDoc *pDoc = GetDocument();
    if(pDoc == NULL || !IsWindowVisible()) return;
    UpdateData();
    if(m_nIndex1<1) return;
    if(pDoc->vElem.size() < m_nIndex1)
    {
        m_nIndex2 = 0;
        m_nIndex3 = 0;
        m_szValue1 = "=v ";
        m_bAnswer = FALSE;
    }
    else
    {
        m_nIndex2 = pDoc->vElem[m_nIndex1 - 1].yes + 1;
        m_nIndex3 = pDoc->vElem[m_nIndex1 - 1].no + 1;
        m_szValue1 = pDoc->vElem[m_nIndex1 - 1].value;
        m_bAnswer = pDoc->vElem[m_nIndex1 - 1].answer;
    }
    if(m_nIndex2 > 0)
    {
        if(pDoc->vElem.size() < m_nIndex2) m_szValue2 =  "=v ";
        else m_szValue2 = pDoc->vElem[m_nIndex2 - 1].value;
    }
    else m_szValue2.Empty();
    if(m_nIndex3 > 0)
    {
        if(pDoc->vElem.size() < m_nIndex3) m_szValue3 =  "=v ";
        else m_szValue3 = pDoc->vElem[m_nIndex3 - 1].value;
    }
    else m_szValue3.Empty();
    UpdateData(FALSE);
}
void CExpertView::OnChangeIndex2()
{
    CExpertDoc *pDoc = GetDocument();
    if(pDoc == NULL || !IsWindowVisible()) return;
    OnChangeValue1();
    if(m_nIndex2 > 0)
    {
        if(pDoc->vElem.size() < m_nIndex2) m_szValue2 =  "=v ";
        else m_szValue2 = pDoc->vElem[m_nIndex2 - 1].value;
    }
    else m_szValue2.Empty();
    UpdateData(FALSE);
}
void CExpertView::OnChangeIndex3()
{
    CExpertDoc *pDoc = GetDocument();
    if(pDoc == NULL || !IsWindowVisible()) return;
    OnChangeValue1();
    if(m_nIndex3 > 0)
    {
        if(pDoc->vElem.size() < m_nIndex3) m_szValue3 =  "=v ";
        else m_szValue3 = pDoc->vElem[m_nIndex3 - 1].value;
    }
    else m_szValue3.Empty();
    UpdateData(FALSE);
}
void CExpertView::OnAnswer()
{
    OnChangeValue1();
}
#if !defined(AFX_TESTVIEW_H__CF9B27C0_EB68_45B3_93B4_318133213600__INCLUDED_)
#define AFX_TESTVIEW_H__CF9B27C0_EB68_45B3_93B4_318133213600__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TestView.h : header file
//

/////////////////////////////////////////////////////////////////////////////

// CTestView form view
#ifndef __AFXEXT_H__
#include 
#endif
#include "ExpertDoc.h"
class CTestView : public CFormView
{
protected:
    CTestView();           // protected constructor used by dynamic creation
    DECLARE_DYNCREATE(CTestView)
// Form Data
public:
    //{{AFX_DATA(CTestView)
    enum { IDD = IDD_TEST_FORM };
    CButton m_BtnNo;
    CButton m_BtnYes;
    CString m_szValue;
    CString m_szLabel;
    //}}AFX_DATA
// Attributes
public:
    int nIndex;
// Operations
public:
    void UpdateValue();
inline CExpertDoc* CTestView::GetDocument()
   { return (CExpertDoc*)m_pDocument; }
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CTestView)
    public:
    virtual void OnInitialUpdate();
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL
// Implementation
protected:
    virtual ~CTestView();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif
    // Generated message map functions
    //{{AFX_MSG(CTestView)
    afx_msg void OnBtnYes();
    afx_msg void OnBtnNo();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TESTVIEW_H__CF9B27C0_EB68_45B3_93B4_318133213600__INCLUDED_)
// TestView.cpp : implementation file
//
#include "stdafx.h"
#include "Expert.h"
#include "TestView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////

// CTestView
IMPLEMENT_DYNCREATE(CTestView, CFormView)
CTestView::CTestView()
    : CFormView(CTestView::IDD)
{
    //{{AFX_DATA_INIT(CTestView)
    m_szValue = _T("");
    m_szLabel = _T("");
    //}}AFX_DATA_INIT
}
CTestView::~CTestView()
{
}
void CTestView::DoDataExchange(CDataExchange* pDX)
{
    CFormView::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CTestView)
    DDX_Control(pDX, IDC_BTN_NO, m_BtnNo);
    DDX_Control(pDX, IDC_BTN_YES, m_BtnYes);
    DDX_Text(pDX, IDC_VALUE, m_szValue);
    DDX_Text(pDX, IDC_STATIC1, m_szLabel);
    //}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestView, CFormView)
    //{{AFX_MSG_MAP(CTestView)
    ON_BN_CLICKED(IDC_BTN_YES, OnBtnYes)
    ON_BN_CLICKED(IDC_BTN_NO, OnBtnNo)
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

// CTestView diagnostics
#ifdef _DEBUG
void CTestView::AssertValid() const
{
    CFormView::AssertValid();
}
void CTestView::Dump(CDumpContext& dc) const
{
    CFormView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////

// CTestView message handlers
void CTestView::OnInitialUpdate()
{
    CFormView::OnInitialUpdate();
    // TODO: Add your specialized code here and/or call the base class
    nIndex = 0;
    m_szLabel = "T";
    UpdateValue();
}
void CTestView::OnBtnYes()
{
    nIndex = GetDocument()->vElem[nIndex].yes;
    UpdateValue(); 
}
void CTestView::UpdateValue()
{
    if(!GetDocument()->vElem[nIndex].yes) return;
    m_szValue = GetDocument()->vElem[nIndex].value;
    if(GetDocument()->vElem[nIndex].answer)
    {
        m_szLabel = "v";
        m_BtnYes.EnableWindow(FALSE);
        m_BtnNo.EnableWindow(FALSE);
    }
    UpdateData(FALSE);
}
void CTestView::OnBtnNo()
{
    nIndex = GetDocument()->vElem[nIndex].no;
    UpdateValue();     
}
// ChildFrm.h : interface of the CChildFrame class
//

/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CHILDFRM_H__7E05287F_8F30_4F00_82D2_F5C1CBF0942D__INCLUDED_)
#define AFX_CHILDFRM_H__7E05287F_8F30_4F00_82D2_F5C1CBF0942D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CChildFrame : public CMDIChildWnd
{
    DECLARE_DYNCREATE(CChildFrame)
public:
   CChildFrame();
// Attributes
public:
// Operations
public:
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CChildFrame)
    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
    //}}AFX_VIRTUAL
// Implementation
public:
    virtual ~CChildFrame();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
    //{{AFX_MSG(CChildFrame)
        // NOTE - the ClassWizard will add and remove member functions here.
        //    DO NOT EDIT what you see in these blocks of generated code!
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CHILDFRM_H__7E05287F_8F30_4F00_82D2_F5C1CBF0942D__INCLUDED_)
// ChildFrm.cpp : implementation of the CChildFrame class
//
#include "stdafx.h"
#include "Expert.h"
#include "ChildFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////

// CChildFrame
IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
    //{{AFX_MSG_MAP(CChildFrame)
        // NOTE - the ClassWizard will add and remove mapping macros here.
        //    DO NOT EDIT what you see in these blocks of generated code !
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

// CChildFrame construction/destruction
CChildFrame::CChildFrame()
{
    // TODO: add member initialization code here
}
CChildFrame::~CChildFrame()
{
}
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    // TODO: Modify the Window class or styles here by modifying
    //  the CREATESTRUCT cs
    cs.cx = 492;
    cs.cy = 440;
    if( !CMDIChildWnd::PreCreateWindow(cs) )
        return FALSE;
    return TRUE;
}

/////////////////////////////////////////////////////////////////////////////

// CChildFrame diagnostics #ifdef _DEBUG void CChildFrame::AssertValid() const { CMDIChildWnd::AssertValid(); } void CChildFrame::Dump(CDumpContext& dc) const { CMDIChildWnd::Dump(dc); } #endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////

 // CChildFrame message handlers
#if !defined(AFX_TESTVIEW_H__CF9B27C0_EB68_45B3_93B4_318133213600__INCLUDED_)
#define AFX_TESTVIEW_H__CF9B27C0_EB68_45B3_93B4_318133213600__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TestView.h : header file
//

/////////////////////////////////////////////////////////////////////////////

 // CTestView form view
#ifndef __AFXEXT_H__
#include 
#endif
#include "ExpertDoc.h"
class CTestView : public CFormView
{
protected:
    CTestView();           // protected constructor used by dynamic creation
    DECLARE_DYNCREATE(CTestView)
// Form Data
public:
    //{{AFX_DATA(CTestView)
    enum { IDD = IDD_TEST_FORM };
    CButton m_BtnNo;
    CButton m_BtnYes;
    CString m_szValue;
    CString m_szLabel;
    //}}AFX_DATA
// Attributes
public:
    int nIndex;
// Operations
public:
    void UpdateValue();
inline CExpertDoc* CTestView::GetDocument()
   { return (CExpertDoc*)m_pDocument; }
// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CTestView)
    public:
    virtual void OnInitialUpdate();
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL
// Implementation
protected:
    virtual ~CTestView();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif
    // Generated message map functions
    //{{AFX_MSG(CTestView)
    afx_msg void OnBtnYes();
    afx_msg void OnBtnNo();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

 //{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TESTVIEW_H__CF9B27C0_EB68_45B3_93B4_318133213600__INCLUDED_)
// TestFrame.cpp : implementation file
//
#include "stdafx.h"
#include "Expert.h"
#include "TestFrame.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////

// CTestFrame
IMPLEMENT_DYNCREATE(CTestFrame, CMDIChildWnd)
CTestFrame::CTestFrame()
{
}
CTestFrame::~CTestFrame()
{
}
BEGIN_MESSAGE_MAP(CTestFrame, CMDIChildWnd)
    //{{AFX_MSG_MAP(CTestFrame)
        // NOTE - the ClassWizard will add and remove mapping macros here.
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

 // CTestFrame message handlers
BOOL CTestFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    // TODO: Add your specialized code here and/or call the base class
    cs.cx = 492;
    cs.cy = 205;
    return CMDIChildWnd::PreCreateWindow(cs);
}
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//
#if !defined(AFX_STDAFX_H__C53AEF46_9141_4A64_99BD_2CEA04514C1A__INCLUDED_)
#define AFX_STDAFX_H__C53AEF46_9141_4A64_99BD_2CEA04514C1A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
#include          // MFC core and standard components
#include          // MFC extensions
#include        // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include          // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__C53AEF46_9141_4A64_99BD_2CEA04514C1A__INCLUDED_)
// stdafx.cpp : source file that includes just the standard includes
//  Expert.pch will be the pre-compiled header
//  stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
.         3GL   4GL   5GL  

, , Statechart diagram - - , .




 10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _.
10.11.2021 - 12:36: - Conscience -> . ? - _.
10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _.
10.11.2021 - 12:35: - Ecology -> - _.
10.11.2021 - 12:34: , - War, Politics and Science -> - _.
10.11.2021 - 12:34: , - War, Politics and Science -> . - _.
10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _.
10.11.2021 - 09:18: - New Technologies -> , 5G- - _.
10.11.2021 - 09:18: - Ecology -> - _.
10.11.2021 - 09:16: - Ecology -> - _.
10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _.
10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _.
Bourabai Research -  XXI Bourabai Research Institution