/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/MEMDLG.CPP   1.2.1.4   17 Apr 1997 15:56:20   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/MEMDLG.CPP  $
** 
**    Rev 1.2.1.4   17 Apr 1997 15:56:20   ZJRD
** No change.
** 
**    Rev 1.2.1.3   16 Apr 1997 10:27:32   ZJRD
** No change.
** 
**    Rev 1.2.1.2   10 Apr 1997 15:38:08   ZJRD
** No change.
** 
**    Rev 1.2.1.1   03 Apr 1997 15:17:20   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:22:22   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:32:28   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:48:00   ZJRD
** Initial revision.
** 
**    Rev 1.7.1.0.1.2   09 Dec 1996 10:14:34   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.7.1.0.1.0   11 Nov 1996 12:57:50   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.7.1.4   09 Sep 1996 13:14:24   ZJRD
** No change.
** 
**    Rev 1.7.1.3   05 Sep 1996 11:25:56   ZJRD
** No change.
** 
**    Rev 1.7.1.2   02 Sep 1996 09:53:02   ZJRD
** No change.
** 
**    Rev 1.7.1.1   28 Aug 1996 15:45:48   ZJRD
** EasyPack/SLD Version 1.9b
** 
**    Rev 1.7.1.0   12 Aug 1996 10:50:48   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.5   05 Jun 1996 14:52:56   ZJRD
** No change.
** 
**    Rev 1.4   29 May 1996 09:34:12   ZJRD
** No change.
** 
**    Rev 1.3   16 May 1996 09:02:46   ZJRD
** No change.
** 
**    Rev 1.2   10 May 1996 09:14:20   ZJRD
** No change.
** 
**    Rev 1.1   02 May 1996 10:29:10   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.31   18 Apr 1996 12:58:24   Shirley
** No change.
** 
**    Rev 1.30   12 Apr 1996 10:42:02   Shirley
** EasyPack/SLD Version 1.90
** 
**    Rev 1.28   15 Feb 1996 08:57:02   Shirley
** No change.
** 
**    Rev 1.27   12 Feb 1996 14:08:24   Shirley
** No change.
** 
**    Rev 1.26   06 Feb 1996 15:34:50   Shirley
** No change.
** 
**    Rev 1.25   06 Feb 1996 13:49:08   Shirley
** No change.
** 
**    Rev 1.24   01 Feb 1996 10:15:10   Shirley
** No change.
** 
**    Rev 1.23   26 Jan 1996 09:18:34   Shirley
** No change.
** 
**    Rev 1.22   25 Jan 1996 13:18:28   Shirley
** No change.
** 
**    Rev 1.21   24 Jan 1996 10:36:04   Shirley
** No change.
** 
**    Rev 1.20   23 Jan 1996 11:24:26   Shirley
** EasypPack/SLD Version 0.34c
** 
**    Rev 1.19   18 Jan 1996 10:11:12   Shirley
** EasyPack/SLD Version 0.34b
** 
**    Rev 1.18   15 Jan 1996 16:12:48   Shirley
** No change.
** 
**    Rev 1.17   04 Jan 1996 11:10:50   Shirley
** No change.
** 
**    Rev 1.16   30 Nov 1995 09:14:42   Shirley
** EasyPack/SLD Version 0.33
** 
**    Rev 1.15   28 Nov 1995 15:29:14   Shirley
** EasyPack/SLD Version 0.32
** 
**    Rev 1.14   21 Nov 1995 11:21:28   Shirley
** No change.
** 
**    Rev 1.13   13 Nov 1995 09:27:10   Shirley
** No change.
** 
**    Rev 1.12   12 Nov 1995 11:31:46   Shirley
** EasyPack/SLD Version 0.24
** 
**    Rev 1.11   08 Nov 1995 16:33:50   Shirley
** No change.
** 
**    Rev 1.10   08 Nov 1995 12:44:36   Shirley
** EasyPack/SLD Version 0.22
**
**    Rev 1.4   13 Oct 1995 13:20:42   Shirley
** No change.
**
**    Rev 1.3   29 Sep 1995 09:52:30   Shirley
** EasyPack/SLD Version 0.1c
**
**    Rev 1.0   07 Sep 1995 09:54:46   Shirley
** Initial revision.
**
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name:  MEMDLG.CPP
//
//  Description:The implement file for the class: CMemDlg
//
//  Author:     Lane Li         &       Daniel Lin
//
//  Date:       09/10/95
//
//  Modification:
//      5. 04/05/96 ~           1.0 version               Daniel Lin
//          All changed for no useing VBX
//          Use the CPropertySheet for the main dialog and the CPropertyPage
//          for the CPropertyPage for every process dialog
//          Relative file is MEMPAGE.CPP(All page dialog file)
//
//      4. 03/06/96 ~ 03/??/96  1.0  version               Daniel Lin
//          Change any input field by Address Server.
//          For all input index will change to C convention format and
//          the address will be processed by Address server
//
//          Change function:
//                   OnTestButton1();      
//                   OnSearchButton1();
//                   OnCopyButton1()
//                   OnFillButton1()
//                   OnChecksumButton1()
//                   OnCompareButton1()
//                   CMemDlg::CMemDlg
//
//          All data input radix is modified to have head leading '0x'(hex)
//             
//
//      3. 11/03/95, 0.1h version.              Daniel Lin
//                 modify function:     OnTestButton1()
//                 modify function:     OnCopyButton1()
//                 modify function:     OnFillButton1()
//                 modify function:     OnSearchButton1()
//                 modify function:     OnChecksumButton1()
//                 modify function:     OnCompareButton1()
//
//      2. 10/31/95, 0.1g version.              Daniel Lin
//                 modify function:     OnTestButton1()
//                 modify function:     OnCopyButton1()
//                 modify function:     OnFillButton1()
//                 modify function:     OnSearchButton1()
//                 modify function:     OnChecksumButton1()
//                 modify function:     OnCompare()
//
//
//  Modification:
//
//      1. 09/10/95, Initial version
//
//
//  Copyright (C) 1995 Microtek International. All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "resource.h"
#include "mempage.h"
#include "memdlg.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
                   
IMPLEMENT_DYNAMIC(CMemDlg, CPropertySheet)

BEGIN_MESSAGE_MAP(CMemDlg, CPropertySheet)
   //{{AFX_MSG_MAP(CMemDlg)
   ON_WM_CREATE()
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
                   
/////////////////////////////////////////////////////////////////////////////
// CMemDlg dialog construct
//    Add six pape to the memory diaolg sheet
//
/////////////////////////////////////////////////////////////////////////////

CMemDlg::CMemDlg(CWnd* pParent /*=NULL*/)
   : CPropertySheet(IDS_MEMORY_GROUP/*CMemDlg::IDD*/, pParent)
{   
   // Add six page to the memory sheet
   //
   AddPage (&m_searchPage);   
   AddPage (&m_comparePage);
   AddPage (&m_checksumPage);
   AddPage (&m_copyPage);
   AddPage (&m_fillPage);
   AddPage (&m_testPage);   
}

/*
void CMemDlg::DoDataExchange(CDataExchange* pDX)
{
   CDialog::DoDataExchange(pDX);
   //{{AFX_DATA_MAP(CMemDlg)
      // NOTE: the ClassWizard will add DDX and DDV calls here
   //}}AFX_DATA_MAP
}
*/

/////////////////////////////////////////////////////////////////////////////
// CMemDlg message handlers
//

////////////////////////////////////////////////////////////////////////////
// OnCreate
//
//    Create the memory dialog use property sheet
//    Disable and invisible the OK, Cancel, Apply, Help button
//
////////////////////////////////////////////////////////////////////////////

void CMemDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
    // TODO: Add your message handler code here and/or call default

    // Disable to move or restore main frame window.
    switch ( nID & 0x0FFF0 ) {
        case SC_MOVE:
            return;
        default:
            break;
    }
        
    CPropertySheet::OnSysCommand(nID,lParam);
}

int CMemDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
   if (CPropertySheet::OnCreate(lpCreateStruct) == -1)
      return -1;
   
   // TODO: Add your specialized creation code here
   CWnd *ctrl = NULL;
   ctrl = GetDlgItem(IDOK);
   ctrl->ShowWindow(FALSE);
   ctrl = GetDlgItem(IDCANCEL);
   ctrl->ShowWindow(FALSE);
   ctrl = GetDlgItem(ID_APPLY_NOW);
   ctrl->ShowWindow(FALSE);
   ctrl = GetDlgItem(ID_HELP);
   ctrl->ShowWindow(FALSE);
   
   // TODO: Add your specialized creation code here
   CenterWindow();   
   
   return 0;
}

void CMemDlg::SetModal(BOOL bModeless)
{
   m_bModeless = bModeless;
}

///////////////////////////(EOF MEMDLG.CPP)//////////////////////////////////





void CMemDlg::OnClose()
{
	// TODO: Add your message handler code here and/or call default
	SetModal(FALSE);	
	CPropertySheet::OnClose();
}
