www.pudn.com > SCIDE.rar > OutputBar.cpp


// OutputBar.cpp : implementation file 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#include "StdAfx.h" 
#include "SCIDE.h" 
#include "OutputBar.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// COutputBar 
 
COutputBar::COutputBar() 
{ 
	 
} 
 
COutputBar::~COutputBar() 
{ 
	// TODO: add destruction code here. 
} 
 
IMPLEMENT_DYNAMIC(COutputBar, baseCMyBar) 
 
BEGIN_MESSAGE_MAP(COutputBar, baseCMyBar) 
	//{{AFX_MSG_MAP(COutputBar) 
	ON_WM_CREATE() 
	ON_WM_SIZE() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// COutputBar message handlers 
 
int COutputBar::OnCreate(LPCREATESTRUCT lpCreateStruct)  
{ 
	if (baseCMyBar::OnCreate(lpCreateStruct) == -1) 
		return -1; 
 
	if (!m_font.CreateStockObject(DEFAULT_GUI_FONT)) 
        if (!m_font.CreatePointFont(100, "MS Sans Serif")) 
            return -1; 
	 
	DWORD dwStyle = WS_CHILD | WS_VISIBLE | LBS_NOINTEGRALHEIGHT | WS_BORDER |   
		WS_VSCROLL|WS_HSCROLL| WS_TABSTOP; 
 
 
	// create the build list. 
	if (!m_InfoList.Create( dwStyle, CRect(0,0,0,0), this, ID_INFOLIST )) 
	{ 
		TRACE( "Failed to create output window.\n" ); 
		return -1; 
	} 
	m_InfoList.SetFont( &m_font ); 
 
	// set the current tab. 
 
	return 0; 
} 
void COutputBar::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler) 
{ 
    baseCMyBar::OnUpdateCmdUI(pTarget, bDisableIfNoHndler); 
 
    UpdateDialogControls(pTarget, bDisableIfNoHndler); 
} 
 
 
void COutputBar::OnSize(UINT nType, int cx, int cy)  
{ 
	baseCMyBar::OnSize(nType, cx, cy); 
 
    // TODO: Add your message handler code here 
    CRect rc; 
    GetClientRect(rc); 
//	CString sz; 
//	sz.Format("%d,%d",cx,cy); 
//	AfxMessageBox(sz); 
	m_InfoList.MoveWindow(rc); 
}