Old fashion design for PC-104
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.
 
 
 
 
 

103 lines
2.4 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: LgSubEventDlg.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of LgSubEventDlg.cpp
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "lglibreport.h"
#include "LgSubEventDlg.h"
#include "LgReportDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLgSubEventDlg dialog
CLgSubEventDlg::CLgSubEventDlg(CWnd* pParent /*=NULL*/)
: CDialog(CLgSubEventDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CLgSubEventDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_bListUpdate = FALSE;
m_pReportDlg = NULL;
}
void CLgSubEventDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLgSubEventDlg)
DDX_Control(pDX, IDC_LIST_EVENT, m_ListEvent);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CLgSubEventDlg, CDialog)
//{{AFX_MSG_MAP(CLgSubEventDlg)
ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_EVENT, OnItemchangedListEvent)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLgSubEventDlg message handlers
void CLgSubEventDlg::OnItemchangedListEvent(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
if( !m_bListUpdate )
{
m_bListUpdate = TRUE;
m_pReportDlg->OnChangeEvent( pNMListView->iItem );
m_bListUpdate = FALSE;
}
*pResult = 0;
}
BOOL CLgSubEventDlg::Create(CLgReportDlg *pReportDlg, CWnd *pParentWnd, CRect *pRect )
{
m_pReportDlg = pReportDlg;
if( !CDialog::Create( IDD, pParentWnd ) )
return FALSE;
ShowWindow( SW_SHOW );
CRect rect;
if( pRect )
rect = *pRect;
else
pParentWnd->GetClientRect( &rect );
MoveWindow( &rect );
return TRUE;
}
void CLgSubEventDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
if( m_ListEvent.GetSafeHwnd() )
m_ListEvent.MoveWindow( 0, 0, cx, cy );
}