// DDrawWindow.cpp : implementation file
//

#include "stdafx.h"
#include "DDrawWindow.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDDrawWindow

CDDrawWindow::CDDrawWindow()
{
}

CDDrawWindow::~CDDrawWindow()
{
}


BEGIN_MESSAGE_MAP(CDDrawWindow, CWnd)
	ON_WM_SETFOCUS()
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDDrawWindow message handlers


void CDDrawWindow::OnSetFocus(CWnd *pOldWnd)
{
	CWnd::OnSetFocus(pOldWnd);
	AfxGetMainWnd()->SetFocus();
}


BOOL CDDrawWindow::PreCreateWindow(CREATESTRUCT &cs)
{
	cs.style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
	cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_OWNDC | CS_SAVEBITS,
	                                   ::LoadCursor(nullptr, IDC_ARROW), HBRUSH(::GetStockObject(BLACK_BRUSH)), nullptr);
	return CWnd::PreCreateWindow(cs);
}
