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.
 
 
 
 
 

98 lines
2.2 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 01/01/2000
// Last modification: 08/10/2003
// PROJECT:
// SUBSYSTEM:
// FILE: VideoListWnd.cpp
// AUTHOR: Sergey Chizhevskiy
// OVERVIEW
// ~~~~~~~~
// Source file of VideoListWnd.cpp
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "chicago.h"
#include "VideoListWnd.h"
#include "..\..\LgLib\Version.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
BEGIN_MESSAGE_MAP(CVideoListWnd, CLgListWnd)
//{{AFX_MSG_MAP(CVideoListWnd)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CVideoListWnd::CVideoListWnd()
{
// log info
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CVideoListWnd::CVideoListWnd" );
}
CVideoListWnd::~CVideoListWnd()
{
// log info
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CVideoListWnd::~CVideoListWnd" );
}
BOOL CVideoListWnd::Create( CWnd *pParentWnd, int x, int y, int nWidth, int nHeight )
{
if( !CLgListWnd::Create( pParentWnd, x, y, nWidth, nHeight ) )
{
LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CVideoFrameWnd::Create"), _T("CLgListWnd::Create failed") );
return FALSE;
}
CWnd::ModifyStyle( 0, WS_DLGFRAME | WS_CLIPSIBLINGS );
if( !SetItemSize( CSize(160,120) ) )
{
LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CVideoFrameWnd::Create"), _T("SetItemSize failed") );
return FALSE;
}
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CVideoListWnd::Create", _T("Succeeded") );
return TRUE;
}
void CVideoListWnd::OnItemMove( void* pItem, CRect *pRect, BOOL bShow, BOOL bActive )
{
CWnd *pWnd = (CWnd*)pItem;
if( !pWnd )
return;
if( bShow )
{
pWnd->ShowWindow( SW_SHOW );
pWnd->MoveWindow( pRect );
}
else
pWnd->ShowWindow( SW_HIDE );
}
void CVideoListWnd::OnItemAdd( void* pItem )
{
CWnd *pWnd = (CWnd*)pItem;
if( !pWnd )
return;
pWnd->SetParent( this );
pWnd->ShowWindow( SW_SHOW );
}
void CVideoListWnd::OnItemRemove( void *pItem )
{
CWnd *pWnd = (CWnd*)pItem;
if( !pWnd )
return;
pWnd->ShowWindow( SW_HIDE );
}