www.pudn.com > editpad_src > bcgmainclientareawnd.cpp, change:1999-11-18,size:1945b


//******************************************************************************* 
// COPYRIGHT NOTES 
// --------------- 
// This source code is a part of BCGControlBar library. 
// You may use, compile or redistribute it as part of your application  
// for free. You cannot redistribute it as a part of a software development  
// library without the agreement of the author. If the sources are  
// distributed along with the application, you should leave the original  
// copyright notes in the source code without any changes. 
// This code can be used WITHOUT ANY WARRANTIES on your own risk. 
//  
// Stas Levin <stas@iet.co.il> 
//******************************************************************************* 
 
// BCGMainClientAreaWnd.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "BCGMainClientAreaWnd.h" 
#include "BCGMDIFrameWnd.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CBCGMainClientAreaWnd 
 
CBCGMainClientAreaWnd::CBCGMainClientAreaWnd() 
{ 
} 
 
CBCGMainClientAreaWnd::~CBCGMainClientAreaWnd() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CBCGMainClientAreaWnd, CWnd) 
	//{{AFX_MSG_MAP(CBCGMainClientAreaWnd) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
	//}}AFX_MSG_MAP 
	ON_MESSAGE(WM_MDISETMENU,OnSetMenu) 
END_MESSAGE_MAP() 
 
 
///////////////////////////////////////////////////////////////////////////// 
// CBCGMainClientAreaWnd message handlers 
 
afx_msg LRESULT CBCGMainClientAreaWnd::OnSetMenu (WPARAM wp, LPARAM lp) 
{ 
	CBCGMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST (CBCGMDIFrameWnd, GetParentFrame ()); 
	if (pMainFrame != NULL && ::IsWindow (pMainFrame->GetSafeHwnd ())) 
	{ 
		if (pMainFrame->OnSetMenu ((HMENU) wp)) 
		{ 
			wp = NULL; 
		} 
	} 
	else 
	{ 
		wp = NULL; 
	} 
 
	return DefWindowProc (WM_MDISETMENU, wp, lp); 
}