/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/ABICOM.CPP   1.2.1.5   17 Apr 1997 15:40:32   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/ABICOM.CPP  $
** 
**    Rev 1.2.1.5   17 Apr 1997 15:40:32   ZJRD
** No change.
** 
**    Rev 1.2.1.4   16 Apr 1997 10:10:44   ZJRD
** No change.
** 
**    Rev 1.2.1.3   10 Apr 1997 15:26:16   ZJRD
** 2.09F
** 
**    Rev 1.2.1.1   03 Apr 1997 15:08:26   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:13:26   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:24:46   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:44:04   ZJRD
** Initial revision.
** 
**    Rev 1.7.1.0.1.2   09 Dec 1996 10:17:16   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.7.1.0.1.0   11 Nov 1996 13:00:30   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.7.1.4   09 Sep 1996 13:21:14   ZJRD
** No change.
** 
**    Rev 1.7.1.3   05 Sep 1996 11:32:42   ZJRD
** EasyPack/SLD Version 1.9e
** 
**    Rev 1.7.1.1   28 Aug 1996 15:46:42   ZJRD
** No change.
** 
**    Rev 1.7.1.0   12 Aug 1996 10:51:36   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.8   20 Jun 1996 09:25:00   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.6   10 Jun 1996 10:19:40   ZJRD
** EasyPack/SLD Version 1.20
** 
**    Rev 1.4   29 May 1996 09:28:50   ZJRD
** EasyPack/SLD Version 1.95
** 
****************************************************************************/

// abicom.cpp : implementation file
//
//author: Frank Chang

#include "stdafx.h"
#include "abicom.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAbiComDlg dialog
int OpenAbiComDlg(int fHelpComm);

int OpenAbiComDlg(int fHelpComm)
{ 
	int nYesNo; 
	
   	CAbiComDlg abiComDlg(fHelpComm);
   	nYesNo = abiComDlg.DoModal();
    return nYesNo;
}

CAbiComDlg::CAbiComDlg(int fHelp, CWnd* pParent /*=NULL*/)
    : CDialog(CAbiComDlg::IDD, pParent)
{
    //{{AFX_DATA_INIT(CAbiComDlg)                    
	//}}AFX_DATA_INIT
	m_fHelp = fHelp;
}

void CAbiComDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(CAbiComDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAbiComDlg, CDialog)
    //{{AFX_MSG_MAP(CAbiComDlg)
	ON_WM_PAINT()
	ON_BN_CLICKED(ID_RELINK, OnRelink)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CAbiComDlg message handlers

void CAbiComDlg::OnPaint()
{
       /* CPaintDC dc(this); // device context for painting
	dc.SetBkMode(TRANSPARENT);
	dc.TextOut(12,16, "Please Check these items:"); 
	dc.SetTextColor(RGB(0,255,0));
	
	dc.TextOut(11,15, "Please Check these items:"); 

	dc.MoveTo(15, 200); 
	dc.SelectStockObject(WHITE_PEN);
	dc.LineTo(250, 200); 
	dc.LineTo(250, 40);
	dc.SelectStockObject(BLACK_PEN);
	dc.LineTo(15,40); 
	dc.LineTo(15, 200);       
	
//	dc.SelectObject(&m_redPen);
	dc.SelectObject(&m_brush);
	dc.Ellipse(23, 52, 31, 60);   
	dc.Ellipse(23, 70, 31, 78);   
	dc.Ellipse(23, 107, 31, 115);   
	dc.Ellipse(23, 127, 31, 135);   
   	dc.Ellipse(23, 147, 31, 155);   
  	dc.Ellipse(23, 167, 31, 175);   

        // TODO: Add your message handler code here*/
	
        CDialog::OnPaint();
}

BOOL CAbiComDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	//m_redPen.CreatePen(PS_SOLID, 2, RGB(255, 0, 0));
	//m_greyPen.CreatePen(PS_SOLID, 2, RGB(0, 0, 0));

//	RECT rect;
//	GetWindowRect(&rect);
	
//    MoveWindow(150, 150, 
//    	rect.right-rect.left, rect.bottom-rect.top, TRUE);
    CenterWindow();
	
//    m_brush.CreateSolidBrush(RGB(255,0,0));

    
    if (m_fHelp == 0) {
    	GetDlgItem(ID_RELINK)->EnableWindow(FALSE);
    	GetDlgItem(IDOK)->EnableWindow(TRUE);
    }
    else {
    	GetDlgItem(ID_RELINK)->EnableWindow(TRUE);
    	GetDlgItem(IDOK)->EnableWindow(FALSE);
    }

	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CAbiComDlg::OnRelink()
{
	// TODO: Add your control notification handler code here
	EndDialog(IDOK);
	
}
