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.
|
|
//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright � 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: LgSubTreeDlg.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of LgSubTreeDlg.cpp
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "lglibreport.h"
#include "LgSubTreeDlg.h"
#include "LgReportDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;#endif
CLgSubTreeDlg::CLgSubTreeDlg(CWnd* pParent /*=NULL*/) : CDialog(CLgSubTreeDlg::IDD, pParent){ //{{AFX_DATA_INIT(CLgSubTreeDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_bTreeUpdate = FALSE; m_pReportDlg = NULL;}
void CLgSubTreeDlg::DoDataExchange(CDataExchange* pDX){ CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CLgSubTreeDlg)
DDX_Control(pDX, IDC_TREE_REPORT, m_TreeReport); //}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CLgSubTreeDlg, CDialog) //{{AFX_MSG_MAP(CLgSubTreeDlg)
ON_NOTIFY(TVN_SELCHANGED, IDC_TREE_REPORT, OnSelchangedTreeReport) ON_WM_SIZE() //}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLgSubTreeDlg message handlers
void CLgSubTreeDlg::OnSelchangedTreeReport(NMHDR* pNMHDR, LRESULT* pResult) { NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
if( !m_bTreeUpdate ) { m_bTreeUpdate = TRUE;
m_pReportDlg->OnChangeTree( pNMTreeView->itemNew.hItem );
m_bTreeUpdate = FALSE; } *pResult = 0;}
BOOL CLgSubTreeDlg::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 CLgSubTreeDlg::OnSize(UINT nType, int cx, int cy) { CDialog::OnSize(nType, cx, cy); if( m_TreeReport.GetSafeHwnd() ) m_TreeReport.MoveWindow( 0, 0, cx, cy );}
|