/*
*******************************************************************************
* Copyright (c) 1996-97 Digi International Inc., All Rights Reserved          *
*                                                                             *
* This  software  contains  proprietary  and  confidential   information   of *
* Digi International  Inc.   By  accepting  transfer  of this copy, Recipient *
* agrees to retain this software in  confidence,  to  prevent  disclosure  to *
* others,  and  to make no  use of this software other than that for which it *
* was delivered.  This is an unpublished copyright work  Digi   International *
* Inc.    Except   as   permitted   by  federal  law,  17 USC 117, copying is *
* strictly prohibited.                                                        *
*                                                                             *
* Digi  International  Inc.  CONFIDENTIAL  -   (Digi    International    Inc. *
* Confidential  when   combined   with   the   aggregated  modules  for  this *
* product) OBJECT CODE ONLY SOURCE MATERIALS                                  *
*                                                                             *
* (C) COPYRIGHT Digi International Inc. 1996-97                               *
*                                                                             *
* All Rights Reserved                                                         *
*                                                                             *
* US   Government   Users   Restricted   Rights   -   Use,   duplication   or *
* disclosure  restricted by GSA ADP Schedule Contract with Digi International *
* Inc.                                                                        *
*                                                                             *
*******************************************************************************
*/
// TraceChildFrame.cpp : implementation file
//

/*
	Frame windows for all Summary windows. MFC likes to use frame windows
	even if they don't do anything at all

Revision History:

   $History: TraceChildFrame.cpp $
 * 
 * *****************  Version 33  *****************
 * User: Mikez        Date: 7/11/97    Time: 5:03p
 * Branched in $/Components/Windows/NT/Sync/Build/Diag
 * 
 * *****************  Version 32  *****************
 * User: Rodgerb      Date: 2/14/97    Time: 9:52a
 * Updated in $/Components/Windows/NT/Sync/rev2diag
 * 1) added refresh thread 
 * 2) remember window positions of summay and capture windows
 * 
 * *****************  Version 31  *****************
 * User: Rodgerb      Date: 1/27/97    Time: 1:19p
 * Updated in $/Components/Windows/NT/Sync/rev2diag
 * 1) documentation
 * 2) added some new params to Physical layer stats
*/

#include "stdafx.h"
#include "Diagnostic.h"
#include "TraceChildFrame.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CTraceChildFrame

IMPLEMENT_DYNCREATE(CTraceChildFrame, CMDIChildWnd)

CTraceChildFrame::CTraceChildFrame()
{
}

CTraceChildFrame::~CTraceChildFrame()
{
}


BEGIN_MESSAGE_MAP(CTraceChildFrame, CMDIChildWnd)
	//{{AFX_MSG_MAP(CTraceChildFrame)
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTraceChildFrame message handlers

BOOL CTraceChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	BOOL bCreate = CMDIChildWnd::OnCreateClient(lpcs, pContext);

	if (bCreate)
	{
		CWindowPlacement wp;

		wp.Restore(c_pszKeyDSWndPlacement, this);

		RecalcLayout();

		if ((lpcs->style & WS_MAXIMIZE) == 0 && (lpcs->style & WS_MINIMIZE) == 0)
			SetWindowPos(NULL, lpcs->x, lpcs->y, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
	}
		
	return bCreate;
}

void CTraceChildFrame::OnDestroy() 
{
	CMDIChildWnd::OnDestroy();
	
	// TODO: Add your message handler code here
	CWindowPlacement wp;

	wp.Save(c_pszKeyDSWndPlacement, this);
	wp.showCmd = SW_HIDE;
	wp.WriteProfileWP(c_pszKeyDSWndPlacement);
}
