리크 테스트 gui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

857 lines
17 KiB

// Util7258Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "Util7258.h"
#include "Util7258Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
enum { IDD = IDD_ABOUTBOX };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
END_MESSAGE_MAP()
// CUtil7258Dlg dialog
CUtil7258Dlg::CUtil7258Dlg(I16 hCard, CWnd* pParent /*=NULL*/)
: CDialog(CUtil7258Dlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_nTimer = -1;
m_hCard = hCard;
m_dwInData = 0x00000000;
m_dwOutData0 = m_dwOutData1 = 0x00000000;
}
void CUtil7258Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_ICON_DI00, m_Icon_DI00);
DDX_Control(pDX, IDC_ICON_DI01, m_Icon_DI01);
}
BEGIN_MESSAGE_MAP(CUtil7258Dlg, CDialog)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_CHECK_DO00, &CUtil7258Dlg::OnOut00)
ON_BN_CLICKED(IDC_CHECK_DO01, &CUtil7258Dlg::OnOut01)
ON_BN_CLICKED(IDC_CHECK_DO02, &CUtil7258Dlg::OnOut02)
ON_BN_CLICKED(IDC_CHECK_DO03, &CUtil7258Dlg::OnOut03)
ON_BN_CLICKED(IDC_CHECK_DO04, &CUtil7258Dlg::OnOut04)
ON_BN_CLICKED(IDC_CHECK_DO05, &CUtil7258Dlg::OnOut05)
ON_BN_CLICKED(IDC_CHECK_DO06, &CUtil7258Dlg::OnOut06)
ON_BN_CLICKED(IDC_CHECK_DO07, &CUtil7258Dlg::OnOut07)
ON_BN_CLICKED(IDC_CHECK_DO08, &CUtil7258Dlg::OnOut08)
ON_BN_CLICKED(IDC_CHECK_DO09, &CUtil7258Dlg::OnOut09)
ON_BN_CLICKED(IDC_CHECK_DO10, &CUtil7258Dlg::OnOut10)
ON_BN_CLICKED(IDC_CHECK_DO11, &CUtil7258Dlg::OnOut11)
ON_BN_CLICKED(IDC_CHECK_DO12, &CUtil7258Dlg::OnOut12)
ON_BN_CLICKED(IDC_CHECK_DO13, &CUtil7258Dlg::OnOut13)
ON_BN_CLICKED(IDC_CHECK_DO14, &CUtil7258Dlg::OnOut14)
ON_BN_CLICKED(IDC_CHECK_DO15, &CUtil7258Dlg::OnOut15)
ON_BN_CLICKED(IDC_CHECK_DO16, &CUtil7258Dlg::OnOut16)
ON_BN_CLICKED(IDC_CHECK_DO17, &CUtil7258Dlg::OnOut17)
ON_BN_CLICKED(IDC_CHECK_DO18, &CUtil7258Dlg::OnOut18)
ON_BN_CLICKED(IDC_CHECK_DO19, &CUtil7258Dlg::OnOut19)
ON_BN_CLICKED(IDC_CHECK_DO20, &CUtil7258Dlg::OnOut20)
ON_BN_CLICKED(IDC_CHECK_DO21, &CUtil7258Dlg::OnOut21)
ON_BN_CLICKED(IDC_CHECK_DO22, &CUtil7258Dlg::OnOut22)
ON_BN_CLICKED(IDC_CHECK_DO23, &CUtil7258Dlg::OnOut23)
ON_BN_CLICKED(IDC_CHECK_DO24, &CUtil7258Dlg::OnOut24)
ON_BN_CLICKED(IDC_CHECK_DO25, &CUtil7258Dlg::OnOut25)
ON_BN_CLICKED(IDC_CHECK_DO26, &CUtil7258Dlg::OnOut26)
ON_BN_CLICKED(IDC_CHECK_DO27, &CUtil7258Dlg::OnOut27)
ON_BN_CLICKED(IDC_CHECK_DO28, &CUtil7258Dlg::OnOut28)
ON_BN_CLICKED(IDC_CHECK_DO29, &CUtil7258Dlg::OnOut29)
ON_BN_CLICKED(IDC_CHECK_DO30, &CUtil7258Dlg::OnOut30)
ON_BN_CLICKED(IDC_CHECK_DO31, &CUtil7258Dlg::OnOut31)
ON_WM_DESTROY()
ON_WM_TIMER()
END_MESSAGE_MAP()
// CUtil7258Dlg message handlers
BOOL CUtil7258Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
BOOL bNameValid;
CString strAboutMenu;
bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
ASSERT(bNameValid);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
m_nTimer = SetTimer( 1, 50, NULL );
return TRUE; // return TRUE unless you set the focus to a control
}
void CUtil7258Dlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CUtil7258Dlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this function to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CUtil7258Dlg::OnQueryDragIcon()
{
return static_cast<HCURSOR>(m_hIcon);
}
void CUtil7258Dlg::OnDestroy()
{
CDialog::OnDestroy();
// TODO: Add your message handler code here
if( m_nTimer != -1 )
KillTimer( m_nTimer );
}
void CUtil7258Dlg::OnTimer(UINT_PTR nIDEvent)
{
// TODO: Add your message handler code here and/or call default
U32 dwPortData, dwChangeMask;
DI_ReadPort(m_hCard, 0 ,&dwPortData);
dwChangeMask = dwPortData ^ m_dwInData;
if( dwChangeMask != 0x00 ) // Input had been changed
{
m_dwInData = dwPortData; // update the DI data
if( (dwChangeMask & 0x01) == 0x01 ) // if the target bit is changed
{
if( (dwPortData & 0x01) == 0x01 )
{
m_Icon_DI00.SetIcon( AfxGetApp()->LoadIcon(IDI_ICON_RED) ) ;
}
else
{
m_Icon_DI00.SetIcon( AfxGetApp()->LoadIcon(IDI_ICON_BLACK) ) ;
}
}
if( (dwChangeMask & 0x02) == 0x02 ) // if the target bit is changed
{
if( (dwPortData & 0x02) == 0x02 )
{
m_Icon_DI01.SetIcon( AfxGetApp()->LoadIcon(IDI_ICON_RED) ) ;
}
else
{
m_Icon_DI01.SetIcon( AfxGetApp()->LoadIcon(IDI_ICON_BLACK) ) ;
}
}
}
CDialog::OnTimer(nIDEvent);
}
void CUtil7258Dlg::OnOut00()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO00 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x01;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x01);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut01()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO01 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x02;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x02);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut02()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO02 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x04;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x04);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut03()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO03 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x08;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x08);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut04()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO04 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x10;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x10);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut05()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO05 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x20;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x20);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut06()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO06 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x40;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x40);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut07()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO07 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x80;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x80);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut08()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO08 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x100;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x100);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut09()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO09 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x200;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x200);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut10()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO10 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x400;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x400);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut11()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO11 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x800;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x800);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut12()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO12 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x1000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x1000);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut13()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO13 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x2000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x2000);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut14()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO14 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x4000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x4000);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut15()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO15 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData0 |= 0x8000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData0 &= (~0x8000);
}
DO_WritePort( m_hCard, 0, m_dwOutData0 );
}
void CUtil7258Dlg::OnOut16()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO16 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x01;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x01);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut17()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO17 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x02;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x02);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut18()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO18 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x04;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x04);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut19()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO19 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x08;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x08);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut20()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO20 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x10;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x10);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut21()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO21 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x20;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x20);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut22()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO22 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x40;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x40);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut23()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO23 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x80;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x80);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut24()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO24 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x100;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x100);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut25()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO25 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x200;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x200);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut26()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO26 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x400;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x400);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut27()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO27 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x800;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x800);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut28()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO28 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x1000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x1000);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut29()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO29 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x2000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x2000);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut30()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO30 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x4000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x4000);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}
void CUtil7258Dlg::OnOut31()
{
// TODO: Add your control notification handler code here
int CheckSts;
CheckSts = ((CButton*)GetDlgItem( IDC_CHECK_DO31 ))->GetCheck();
if( CheckSts == BST_CHECKED )
{
m_dwOutData1 |= 0x8000;
}
else if( CheckSts == BST_UNCHECKED )
{
m_dwOutData1 &= (~0x8000);
}
DO_WritePort( m_hCard, 1, m_dwOutData1 );
}