📄 olemrdlg.cpp
字号:
/*********************************************************
@author Chandar
@version 1.0
Development Environment : Visual C++ 6.0
Name of the File : OLEMRDlg.cpp
Creation/Modification History :
07-Aug-2001 Created
File Overview:
OLEMRDlg.cpp : implementation file
This file defines the start up dialog box of the application.
It gives the user two option
1. To view the product information .
2. To insertor update product details .
************************************************************/
#include "stdafx.h"
#include "OleMR.h"
#include "OleMRDlg.h"
#include "InsertDlg.h"
#include "PInfo.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COleMRDlg dialog
COleMRDlg::COleMRDlg(CWnd* pParent /*=NULL*/)
: CDialog(COleMRDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(COleMRDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_select=true;
}
void COleMRDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(COleMRDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(COleMRDlg, CDialog)
//{{AFX_MSG_MAP(COleMRDlg)
ON_BN_CLICKED(IDC_RADIO_INSERT, OnRadioInsert)
ON_BN_CLICKED(IDC_RADIO_PINFO, OnRadioPinfo)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COleMRDlg message handlers
/********************************************************************
This function is called just before displaying the dialog box to
initialize dialog box
********************************************************************/
BOOL COleMRDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CheckRadioButton(IDC_RADIO_PINFO,IDC_RADIO_INSERT,IDC_RADIO_PINFO);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
/****************************************************************************
This function defines the message handler for click event of radio button
'Insert Product Details'
****************************************************************************/
void COleMRDlg::OnRadioInsert()
{
m_select=false;
}
/****************************************************************************
This function defines the message handler for click event of radio button
'View Product Information'
****************************************************************************/
void COleMRDlg::OnRadioPinfo()
{
m_select=true;
}
/********************************************************************************
This function handles the click event of OK button. It displays the appropriate
dialog as per user selection
*********************************************************************************/
void COleMRDlg::OnOK()
{
if(m_select==false) //User selected 'Insert Product Details'
{
CInsertDlg insDlg;
insDlg.DoModal();
}
if(m_select==true) //User selected 'View Product Information'
{
CPInfo infoDlg;
infoDlg.DoModal();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -