• 手机版

    扫码体验手机版

  • 微信公众号

    扫码关注公众号

国内首家协议开发

软芯音视解码保护平台

在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

谁帮我改一改。希望来个大神。老同学问我,可我没学过c++。。不胜感激。

/////////////////////////////////////////////////////////////////////////////   
// CMainFrame   
   
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)   
   
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)   
    //{{AFX_MSG_MAP(CMainFrame)   
        // NOTE - the ClassWizard will add and remove mapping macros here.   
        //    DO NOT EDIT what you see in these blocks of generated code !   
    ON_WM_CREATE()   
    //}}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 (CFrameWnd::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( !CFrameWnd::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   
{   
    CFrameWnd::AssertValid();   
}   
   
void CMainFrame::Dump(CDumpContext& dc) const   
{   
    CFrameWnd::Dump(dc);   
}   
   
#endif //_DEBUG   
   
/////////////////////////////////////////////////////////////////////////////   
// CMainFrame message handlers   
// Prop1.cpp : implementation file   
//   
   
#include "stdafx.h"   
#include "Test.h"   
#include "Prop1.h"   
   
#ifdef _DEBUG   
#define new DEBUG_NEW   
#undef THIS_FILE   
static char THIS_FILE[] = __FILE__;   
#endif   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp1 property page   
   
IMPLEMENT_DYNCREATE(CProp1, CPropertyPage)   
   
CProp1::CProp1() : CPropertyPage(CProp1::IDD)   
{   
    //{{AFX_DATA_INIT(CProp1)   
    m_question1 = -1;   
    m_question2 = -1;   
    //}}AFX_DATA_INIT   
}   
   
CProp1::~CProp1()   
{   
}   
   
void CProp1::DoDataExchange(CDataExchange* pDX)   
{   
    CPropertyPage::DoDataExchange(pDX);   
    //{{AFX_DATA_MAP(CProp1)   
    DDX_Radio(pDX, IDC_RADIO1, m_question1);   
    DDX_Radio(pDX, IDC_RADIO4, m_question2);   
    //}}AFX_DATA_MAP   
}   
   
   
BEGIN_MESSAGE_MAP(CProp1, CPropertyPage)   
    //{{AFX_MSG_MAP(CProp1)   
        // NOTE: the ClassWizard will add message map macros here   
    //}}AFX_MSG_MAP   
END_MESSAGE_MAP()   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp1 message handlers   
   
BOOL CProp1::OnSetActive()   
{   
    // TODO: Add your specialized code here and/or call the base class   
    ((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_NEXT);   
    return CPropertyPage::OnSetActive();   
}   
   
LRESULT CProp1::OnWizardNext()   
{   
    UpdateData();   
    // TODO: Add your specialized code here and/or call the base class   
    if(m_question1 == -1)   
    {   
        MessageBox("请选择第一道题目!");   
        return -1;      
    }   
    if(m_question2 == -1)   
    {   
     MessageBox("请选择第二道题目!");   
     return -1;   
      
    }   
    return CPropertyPage::OnWizardNext();   
}   
// Prop2.cpp : implementation file   
//   
   
#include "stdafx.h"   
#include "Test.h"   
#include "Prop2.h"   
   
#ifdef _DEBUG   
#define new DEBUG_NEW   
#undef THIS_FILE   
static char THIS_FILE[] = __FILE__;   
#endif   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp2 property page   
   
IMPLEMENT_DYNCREATE(CProp2, CPropertyPage)   
   
CProp2::CProp2() : CPropertyPage(CProp2::IDD)   
{   
    //{{AFX_DATA_INIT(CProp2)   
    m_question3 = -1;   
    m_question4 = -1;   
    //}}AFX_DATA_INIT   
}   
   
CProp2::~CProp2()   
{   
}   
   
void CProp2::DoDataExchange(CDataExchange* pDX)   
{   
    CPropertyPage::DoDataExchange(pDX);   
    //{{AFX_DATA_MAP(CProp2)   
    DDX_Radio(pDX, IDC_RADIO1, m_question3);   
    DDX_Radio(pDX, IDC_RADIO4, m_question4);   
    //}}AFX_DATA_MAP   
}   
   
   
BEGIN_MESSAGE_MAP(CProp2, CPropertyPage)   
    //{{AFX_MSG_MAP(CProp2)   
        // NOTE: the ClassWizard will add message map macros here   
    //}}AFX_MSG_MAP   
END_MESSAGE_MAP()   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp2 message handlers   
   
BOOL CProp2::OnSetActive()   
{   
    // TODO: Add your specialized code here and/or call the base class   
    ((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);   
    return CPropertyPage::OnSetActive();   
}   
   
LRESULT CProp2::OnWizardNext()   
{   
    // TODO: Add your specialized code here and/or call the base class   
    UpdateData();   
      
    if(m_question3 == -1)   
    {   
        MessageBox("请选择第三道题目!");   
        return -1;      
    }   
    if(m_question4 == -1)   
    {   
     MessageBox("请选择第四道题目!");   
     return -1;   
      
    }   
   
    return CPropertyPage::OnWizardNext();   
}   
// Prop3.cpp : implementation file   
//   
   
#include "stdafx.h"   
#include "Test.h"   
#include "Prop3.h"   
   
#ifdef _DEBUG   
#define new DEBUG_NEW   
#undef THIS_FILE   
static char THIS_FILE[] = __FILE__;   
#endif   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp3 property page   
   
IMPLEMENT_DYNCREATE(CProp3, CPropertyPage)   
   
CProp3::CProp3() : CPropertyPage(CProp3::IDD)   
{   
    //{{AFX_DATA_INIT(CProp3)   
    m_question5 = -1;   
    m_question6 = -1;   
    //}}AFX_DATA_INIT   
}   
   
CProp3::~CProp3()   
{   
}   
   
void CProp3::DoDataExchange(CDataExchange* pDX)   
{   
    CPropertyPage::DoDataExchange(pDX);   
    //{{AFX_DATA_MAP(CProp3)   
    DDX_Radio(pDX, IDC_RADIO1, m_question5);   
    DDX_Radio(pDX, IDC_RADIO4, m_question6);   
    //}}AFX_DATA_MAP   
}   
   
   
BEGIN_MESSAGE_MAP(CProp3, CPropertyPage)   
    //{{AFX_MSG_MAP(CProp3)   
        // NOTE: the ClassWizard will add message map macros here   
    //}}AFX_MSG_MAP   
END_MESSAGE_MAP()   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp3 message handlers   
   
BOOL CProp3::OnSetActive()   
{   
    // TODO: Add your specialized code here and/or call the base class   
    ((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);   
    return CPropertyPage::OnSetActive();   
}   
   
LRESULT CProp3::OnWizardNext()   
{   
    // TODO: Add your specialized code here and/or call the base class   
    UpdateData();   
      
    if(m_question5 == -1)   
    {   
        MessageBox("请选择第五道题目!");   
        return -1;      
    }   
    if(m_question6 == -1)   
    {   
     MessageBox("请选择第六道题目!");   
     return -1;   
      
    }   
    return CPropertyPage::OnWizardNext();   
}   
// Prop4.cpp : implementation file   
//   
   
#include "stdafx.h"   
#include "Test.h"   
#include "Prop4.h"   
   
#ifdef _DEBUG   
#define new DEBUG_NEW   
#undef THIS_FILE   
static char THIS_FILE[] = __FILE__;   
#endif   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp4 property page   
   
IMPLEMENT_DYNCREATE(CProp4, CPropertyPage)   
   
CProp4::CProp4() : CPropertyPage(CProp4::IDD)   
{   
    //{{AFX_DATA_INIT(CProp4)   
    m_question7 = -1;   
    m_question8 = -1;   
    //}}AFX_DATA_INIT   
}   
   
CProp4::~CProp4()   
{   
}   
   
void CProp4::DoDataExchange(CDataExchange* pDX)   
{   
    CPropertyPage::DoDataExchange(pDX);   
    //{{AFX_DATA_MAP(CProp4)   
    DDX_Radio(pDX, IDC_RADIO1, m_question7);   
    DDX_Radio(pDX, IDC_RADIO4, m_question8);   
    //}}AFX_DATA_MAP   
}   
   
   
BEGIN_MESSAGE_MAP(CProp4, CPropertyPage)   
    //{{AFX_MSG_MAP(CProp4)   
        // NOTE: the ClassWizard will add message map macros here   
    //}}AFX_MSG_MAP   
END_MESSAGE_MAP()   
   
/////////////////////////////////////////////////////////////////////////////   
// CProp4 message handlers   
   
BOOL CProp4::OnSetActive()   
{   
    // TODO: Add your specialized code here and/or call the base class   
    ((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK|PSWIZB_FINISH);   
    return CPropertyPage::OnSetActive();   
}   
   
BOOL CProp4::OnWizardFinish()   
{   
    // TODO: Add your specialized code here and/or call the base class   
//  int index;   
//  index=((CComboBox*)GetDlgItem(IDC_COMBO1))->GetCurSel();//GetCurSel()函数是用来获得一个索引值   
//  ((CComboBox*)GetDlgItem(IDC_COMBO1))->GetLBText(index,m_strSalary);   
UpdateData();   
      
    if(m_question7 == -1)   
    {   
        MessageBox("请选择第七道题目!");   
      
        return -1;      
    }   
    if(m_question8 == -1)   
    {   
     MessageBox("请选择第八道题目!");   
      
     return -1;   
      
    }   
      
    return CPropertyPage::OnWizardFinish();   
}

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

发新帖

发布任务需求已有1031167位用户正在使用天盟网服务

发布分类: *
任务预算: *
需求内容: *
手机号码: *
任务商家报价为
  • 预算价 :
  • 成交价 :
  • 完工期 :
  • 质保期 :

* 最终任务项目以服务商报价、双方协商为准!